Skip to contentSkip to conversation

drm/i915/gem: Clarify seemingly unaccounted obj refcount inc

PATCH In review Nirmoy Das 4 participants 5 messages Mar 15, 2023 – Mar 16, 2023

Subsystems (2)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 drm/i915/gem: Clarify seemingly unaccounted obj refcount inc

Add a comment why there is a obj refcount inc before installing the vm_ops for the mmap call. Also remove the invalid older comment as drm API(drm_gem_prime_mmap()) will hold an obj reference before calling this driver mmap callback so we can't have 0-refcnted object here.

Cc Matthew Auld <[email protected]>
Cc Andi Shyti <[email protected]>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +4 -3
index d3c1dee16af2..0bc8c3818443 100644
@@ -952,9 +952,10 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
 						  vma_pages(vma));
 	if (node && drm_vma_node_is_allowed(node, priv)) {
 		/*
-		 * Skip 0-refcnted objects as it is in the process of being
-		 * destroyed and will be invalid when the vma manager lock
-		 * is released.
+		 * When we install vm_ops for mmap we are too late for
+		 * the vm_ops->open() which increases the ref_count of
+		 * this obj and then it gets decreased by the vm_ops->close().
+		 * To balance this increase the obj ref_count here.
 		 */
 		if (!node->driver_private) {
 			mmo = container_of(node, struct i915_mmap_offset, vma_node);
Signature · 1 line
2.39.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Nirmoy,

Quoted 9 lines · Nirmoy Das

Add a comment why there is a obj refcount inc before installing the vm_ops for the mmap call. Also remove the invalid older comment as drm API(drm_gem_prime_mmap()) will hold an obj reference before calling this driver mmap callback so we can't have 0-refcnted object here.

Cc Matthew Auld <[email protected]>
Cc Andi Shyti <[email protected]>

fine with me!

Andi

Quoted 24 lines
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +4 -3
index d3c1dee16af2..0bc8c3818443 100644
@@ -952,9 +952,10 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
 						  vma_pages(vma));
 	if (node && drm_vma_node_is_allowed(node, priv)) {
 		/*
-		 * Skip 0-refcnted objects as it is in the process of being
-		 * destroyed and will be invalid when the vma manager lock
-		 * is released.
+		 * When we install vm_ops for mmap we are too late for
+		 * the vm_ops->open() which increases the ref_count of
+		 * this obj and then it gets decreased by the vm_ops->close().
+		 * To balance this increase the obj ref_count here.
 		 */
 		if (!node->driver_private) {
 			mmo = container_of(node, struct i915_mmap_offset, vma_node);
Signature · 1 line
2.39.0
#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gem: Clarify seemingly unaccounted obj refcount inc

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/i915/gem: Clarify seemingly unaccounted obj refcount inc
URL : https://patchwork.freedesktop.org/series/115182/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12864 -> Patchwork_115182v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/index.html

Participating hosts (38 -> 36)
------------------------------

Missing (2): fi-kbl-soraka fi-snb-2520m

Known issues
------------

Here are the changes found in Patchwork_115182v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3@smem:
- bat-rpls-1: NOTRUN -> [ABORT][1] ([i915#6687] / [i915#7978])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/bat-rpls-1/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@migrate:
- bat-adlp-9: [PASS][2] -> [DMESG-FAIL][3] ([i915#7699])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/bat-adlp-9/igt@i915_selftest@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/bat-adlp-9/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@reset:
- bat-rpls-1: [ABORT][4] ([i915#4983]) -> [PASS][5]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/bat-rpls-1/igt@i915_selftest@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/bat-rpls-1/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_selftest@live@execlists:
- fi-bsw-n3050: [ABORT][6] ([i915#7911]) -> [INCOMPLETE][7] ([i915#6972])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/fi-bsw-n3050/igt@i915_selftest@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/fi-bsw-n3050/igt@i915_selftest@[email protected]

[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#6972]: https://gitlab.freedesktop.org/drm/intel/issues/6972
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978

Build changes
-------------

* Linux: CI_DRM_12864 -> Patchwork_115182v1

CI-20190529: 20190529
CI_DRM_12864: efb4d3263a1932187dd525628e8b35d327f17a6f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7196: 9b8c5dbe8cd82163ee198c43b81222d2b9b75fd4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115182v1: efb4d3263a1932187dd525628e8b35d327f17a6f @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

e9e2aac14d20 drm/i915/gem: Clarify seemingly unaccounted obj refcount inc

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/index.html

#3 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gem: Clarify seemingly unaccounted obj refcount inc

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/i915/gem: Clarify seemingly unaccounted obj refcount inc
URL : https://patchwork.freedesktop.org/series/115182/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12864_full -> Patchwork_115182v1_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (8 -> 7)
------------------------------

Missing (1): shard-rkl0

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_115182v1_full:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* {igt@kms_plane_scaling@planes-downscale-factor-0-5-upscale-0-25}:
- {shard-tglu}: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-10/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_115182v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_eio@in-flight-suspend:
- shard-apl: [PASS][2] -> [ABORT][3] ([i915#180])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl3/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl3/igt@[email protected]

* igt@gem_exec_fair@basic-none-vip@rcs0:
- shard-glk: [PASS][4] -> [FAIL][5] ([i915#2842])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-glk5/igt@gem_exec_fair@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: NOTRUN -> [FAIL][6] ([i915#2842])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk3/igt@gem_exec_fair@[email protected]

* igt@gem_lmem_swapping@verify:
- shard-apl: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl2/igt@[email protected]

* igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a:
- shard-glk: NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#1937])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk3/igt@i915_pm_lpsp@[email protected]

* igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#3886]) +2 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl3/igt@kms_ccs@pipe-a-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#3886]) +1 similar issue
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk3/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

* igt@kms_chamelium_color@ctm-0-75:
- shard-apl: NOTRUN -> [SKIP][11] ([fdo#109271]) +49 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl2/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-apl: [PASS][12] -> [FAIL][13] ([i915#2346])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl4/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
- shard-glk: [PASS][14] -> [DMESG-FAIL][15] ([i915#118])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-glk1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-draw-mmap-wc:
- shard-glk: NOTRUN -> [SKIP][16] ([fdo#109271]) +38 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk3/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-draw-mmap-wc.html

* igt@kms_psr2_sf@cursor-plane-move-continuous-sf:
- shard-apl: NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#658])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl2/igt@[email protected]

* igt@kms_psr2_sf@plane-move-sf-dmg-area:
- shard-glk: NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#658])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk3/igt@[email protected]

#### Possible fixes ####

* igt@drm_fdinfo@most-busy-idle-check-all@rcs0:
- {shard-rkl}: [FAIL][19] ([i915#7742]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-rkl-3/igt@drm_fdinfo@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-rkl-2/igt@drm_fdinfo@[email protected]

* igt@fbdev@info:
- {shard-tglu}: [SKIP][21] ([i915#2582]) -> [PASS][22] +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-9/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-2/igt@[email protected]

* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-glk: [FAIL][23] ([i915#2842]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-glk2/igt@gem_exec_fair@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk7/igt@gem_exec_fair@[email protected]
- shard-apl: [SKIP][25] ([fdo#109271]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl2/igt@gem_exec_fair@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl4/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [FAIL][27] ([i915#2842]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl3/igt@gem_exec_fair@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl2/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none-vip@rcs0:
- {shard-rkl}: [FAIL][29] ([i915#2842]) -> [PASS][30] +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-rkl-4/igt@gem_exec_fair@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-rkl-5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_reloc@basic-wc-read-noreloc:
- {shard-rkl}: [SKIP][31] ([i915#3281]) -> [PASS][32] +13 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-rkl-1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-rkl-5/igt@[email protected]

* igt@gem_mmap_wc@set-cache-level:
- {shard-tglu}: [SKIP][33] ([i915#1850]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-9/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-6/igt@[email protected]

* igt@gem_ppgtt@shrink-vs-evict-any:
- {shard-rkl}: [ABORT][35] -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-rkl-2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-rkl-5/igt@[email protected]

* igt@gem_tiled_partial_pwrite_pread@writes:
- {shard-rkl}: [SKIP][37] ([i915#3282]) -> [PASS][38] +5 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-rkl-2/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-rkl-5/igt@[email protected]

* igt@gem_workarounds@suspend-resume-fd:
- {shard-tglu}: [ABORT][39] ([i915#5122]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-10/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-8/igt@[email protected]

* igt@gen9_exec_parse@allowed-single:
- shard-apl: [ABORT][41] ([i915#5566]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl2/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl2/igt@[email protected]

* igt@gen9_exec_parse@bb-start-far:
- {shard-rkl}: [SKIP][43] ([i915#2527]) -> [PASS][44] +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-rkl-1/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-rkl-5/igt@[email protected]

* igt@i915_pm_rpm@modeset-non-lpsp:
- {shard-dg1}: [SKIP][45] ([i915#1397]) -> [PASS][46] +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-dg1-14/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-dg1-15/igt@[email protected]

* igt@i915_pm_rpm@system-suspend-modeset:
- {shard-tglu}: [SKIP][47] ([i915#3547]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-10/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-7/igt@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- shard-apl: [DMESG-FAIL][49] ([i915#5334]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl2/igt@i915_selftest@live@gt_heartbeat.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl4/igt@i915_selftest@live@gt_heartbeat.html

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [FAIL][51] ([i915#2346]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-glk8/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-glk1/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-apl: [FAIL][53] ([i915#2346]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

* igt@kms_draw_crc@fill-fb:
- {shard-tglu}: [SKIP][55] ([i915#1845]) -> [PASS][56] +29 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-9/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-2/igt@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [FAIL][57] ([i915#4767]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl6/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- {shard-tglu}: [SKIP][59] ([i915#1849]) -> [PASS][60] +16 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-9/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render.html

* igt@kms_plane@pixel-format-source-clamping@pipe-b-planes:
- {shard-tglu}: [SKIP][61] ([i915#1849] / [i915#3558]) -> [PASS][62] +1 similar issue
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-10/igt@kms_plane@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-1/igt@kms_plane@[email protected]

* igt@kms_universal_plane@disable-primary-vs-flip-pipe-a:
- {shard-tglu}: [SKIP][63] ([fdo#109274]) -> [PASS][64] +2 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-10/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-1/igt@[email protected]

* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-apl: [ABORT][65] ([i915#180]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-apl2/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-apl3/igt@[email protected]

* igt@kms_vblank@pipe-d-wait-forked-busy:
- {shard-tglu}: [SKIP][67] ([i915#1845] / [i915#7651]) -> [PASS][68] +20 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-9/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-6/igt@[email protected]

* igt@perf@gen12-oa-tlb-invalidate:
- {shard-rkl}: [SKIP][69] ([fdo#109289]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-rkl-5/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-rkl-4/igt@[email protected]

* igt@perf@polling-small-buf:
- {shard-tglu}: [FAIL][71] ([i915#1722]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-tglu-10/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-tglu-1/igt@[email protected]
- {shard-rkl}: [FAIL][73] ([i915#1722]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12864/shard-rkl-4/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/shard-rkl-5/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
[i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
[i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2876]: https://gitlab.freedesktop.org/drm/intel/issues/2876
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3547]: https://gitlab.freedesktop.org/drm/intel/issues/3547
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3639]: https://gitlab.freedesktop.org/drm/intel/issues/3639
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5115]: https://gitlab.freedesktop.org/drm/intel/issues/5115
[i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
[i915#6258]: https://gitlab.freedesktop.org/drm/intel/issues/6258
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6530]: https://gitlab.freedesktop.org/drm/intel/issues/6530
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
[i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178
[i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949
[i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957
[i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#8152]: https://gitlab.freedesktop.org/drm/intel/issues/8152
[i915#8228]: https://gitlab.freedesktop.org/drm/intel/issues/8228
[i915#8282]: https://gitlab.freedesktop.org/drm/intel/issues/8282

Build changes
-------------

* Linux: CI_DRM_12864 -> Patchwork_115182v1

CI-20190529: 20190529
CI_DRM_12864: efb4d3263a1932187dd525628e8b35d327f17a6f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7196: 9b8c5dbe8cd82163ee198c43b81222d2b9b75fd4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115182v1: efb4d3263a1932187dd525628e8b35d327f17a6f @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115182v1/index.html

#4 lore raw
In reply to Nirmoy Das
Quoted 18 lines · Nirmoy Das

Add a comment why there is a obj refcount inc before installing the vm_ops for the mmap call. Also remove the invalid older comment as drm API(drm_gem_prime_mmap()) will hold an obj reference before calling this driver mmap callback so we can't have 0-refcnted object here.

Cc Matthew Auld <[email protected]>
Cc Andi Shyti <[email protected]>
---
  drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_mman.c +0 -0
index d3c1dee16af2..0bc8c3818443 100644

drivers/gpu/drm/i915/gem/i915_gem_mman.c int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma) · line 957

Quoted 6 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +0 -3
@@ -952,9 +952,10 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
  						  vma_pages(vma));
  	if (node && drm_vma_node_is_allowed(node, priv)) {
  		/*
-		 * Skip 0-refcnted objects as it is in the process of being
-		 * destroyed and will be invalid when the vma manager lock
-		 * is released.

This valid. Matt pointed out a case when user close the obj and call mmap and driver only have the fake offset to refer the object

and can end up calling this while driver is freeing the obj.

I will resend with keeping the valid comment.

Nirmoy

Quoted 7 lines
drivers/gpu/drm/i915/gem/i915_gem_mman.c +4 -0
+		 * When we install vm_ops for mmap we are too late for
+		 * the vm_ops->open() which increases the ref_count of
+		 * this obj and then it gets decreased by the vm_ops->close().
+		 * To balance this increase the obj ref_count here.
  		 */
  		if (!node->driver_private) {
  			mmo = container_of(node, struct i915_mmap_offset, vma_node);