Skip to contentSkip to conversation

drm/i915/ttm: Rework object initialization slightly

PATCH In review Thomas Hellström 3 participants 4 messages Sep 30, 2021 – Oct 1, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 drm/i915/ttm: Rework object initialization slightly

We may end up in i915_ttm_bo_destroy() in an error path before the object is fully initialized. In that case it's not correct to call __i915_gem_free_object(), because that function
a) Assumes the gem object refcount is 0, which it isn't.
b) frees the placements which are owned by the caller until the init_object() region ops returns successfully. Fix this by providing a lightweight cleanup function __i915_gem_object_fini() which is also called by __i915_gem_free_object().

While doing this, also make sure we call dma_resv_fini() as part of ordinary object destruction and not from the RCU callback that frees the object. This will help track down bugs where the object is incorrectly locked from an RCU lookup.

Finally, make sure the object isn't put on the region list until it's either locked or fully initialized in order to block list processing of partially initialized objects.

v2:
- The TTM object backend memory was freed before the gem pages were put. Separate this functionality into __i915_gem_object_pages_fini() and call it from the TTM delete_mem_notify() callback.
v3:
- Include i915_gem_object_free_mmaps() in __i915_gem_object_pages_fini() to make sure we don't inadvertedly introduce a race.

---
 drivers/gpu/drm/i915/gem/i915_gem_object.c | 43 +++++++++++++++++++---
 drivers/gpu/drm/i915/gem/i915_gem_object.h |  5 +++
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c    | 36 +++++++++++-------
 3 files changed, 64 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_object.c +37 -6
index 6fb9afb65034..b88b121e244a 100644
@@ -89,6 +89,22 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
 	mutex_init(&obj->mm.get_dma_page.lock);
 }
 
+/**
+ * i915_gem_object_fini - Clean up a GEM object initialization
+ * @obj: The gem object to cleanup
+ *
+ * This function cleans up gem object fields that are set up by
+ * drm_gem_private_object_init() and i915_gem_object_init().
+ * It's primarily intended as a helper for backends that need to
+ * clean up the gem object in separate steps.
+ */
+void __i915_gem_object_fini(struct drm_i915_gem_object *obj)
+{
+	mutex_destroy(&obj->mm.get_page.lock);
+	mutex_destroy(&obj->mm.get_dma_page.lock);
+	dma_resv_fini(&obj->base._resv);
+}
+
 /**
  * Mark up the object's coherency levels for a given cache_level
  * @obj: #drm_i915_gem_object
@@ -174,7 +190,6 @@ void __i915_gem_free_object_rcu(struct rcu_head *head)
 		container_of(head, typeof(*obj), rcu);
 	struct drm_i915_private *i915 = to_i915(obj->base.dev);
 
-	dma_resv_fini(&obj->base._resv);
 	i915_gem_object_free(obj);
 
 	GEM_BUG_ON(!atomic_read(&i915->mm.free_count));
@@ -204,10 +219,17 @@ static void __i915_gem_object_free_mmaps(struct drm_i915_gem_object *obj)
 	}
 }
 
-void __i915_gem_free_object(struct drm_i915_gem_object *obj)
+/**
+ * __i915_gem_object_pages_fini - Clean up pages use of a gem object
+ * @obj: The gem object to clean up
+ *
+ * This function cleans up usage of the object mm.pages member. It
+ * is intended for backends that need to clean up a gem object in
+ * separate steps and needs to be called when the object is idle before
+ * the object's backing memory is freed.
+ */
+void __i915_gem_object_pages_fini(struct drm_i915_gem_object *obj)
 {
-	trace_i915_gem_object_destroy(obj);
-
 	if (!list_empty(&obj->vma.list)) {
 		struct i915_vma *vma;
 
@@ -233,11 +255,17 @@ void __i915_gem_free_object(struct drm_i915_gem_object *obj)
 
 	__i915_gem_object_free_mmaps(obj);
 
-	GEM_BUG_ON(!list_empty(&obj->lut_list));
-
 	atomic_set(&obj->mm.pages_pin_count, 0);
 	__i915_gem_object_put_pages(obj);
 	GEM_BUG_ON(i915_gem_object_has_pages(obj));
+}
+
+void __i915_gem_free_object(struct drm_i915_gem_object *obj)
+{
+	trace_i915_gem_object_destroy(obj);
+
+	GEM_BUG_ON(!list_empty(&obj->lut_list));
+
 	bitmap_free(obj->bit_17);
 
 	if (obj->base.import_attach)
@@ -253,6 +281,8 @@ void __i915_gem_free_object(struct drm_i915_gem_object *obj)
 
 	if (obj->shares_resv_from)
 		i915_vm_resv_put(obj->shares_resv_from);
+
+	__i915_gem_object_fini(obj);
 }
 
 static void __i915_gem_free_objects(struct drm_i915_private *i915,
@@ -266,6 +296,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
 			obj->ops->delayed_free(obj);
 			continue;
 		}
+		__i915_gem_object_pages_fini(obj);
 		__i915_gem_free_object(obj);
 
 		/* But keep the pointer alive for RCU-protected lookups */
drivers/gpu/drm/i915/gem/i915_gem_object.h +5 -0
index 3043fcbd31bd..7f9f2e5ba0ec 100644
@@ -58,6 +58,9 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
 			  const struct drm_i915_gem_object_ops *ops,
 			  struct lock_class_key *key,
 			  unsigned alloc_flags);
+
+void __i915_gem_object_fini(struct drm_i915_gem_object *obj);
+
 struct drm_i915_gem_object *
 i915_gem_object_create_shmem(struct drm_i915_private *i915,
 			     resource_size_t size);
@@ -582,6 +585,8 @@ bool i915_gem_object_is_shmem(const struct drm_i915_gem_object *obj);
 
 void __i915_gem_free_object_rcu(struct rcu_head *head);
 
+void __i915_gem_object_pages_fini(struct drm_i915_gem_object *obj);
+
 void __i915_gem_free_object(struct drm_i915_gem_object *obj);
 
 bool i915_gem_object_evictable(struct drm_i915_gem_object *obj);
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +22 -14
index b94497989995..a0ab5c44627b 100644
@@ -367,8 +367,10 @@ static void i915_ttm_delete_mem_notify(struct ttm_buffer_object *bo)
 {
 	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
 
-	if (likely(obj))
+	if (likely(obj)) {
+		__i915_gem_object_pages_fini(obj);
 		i915_ttm_free_cached_io_st(obj);
+	}
 }
 
 static struct intel_memory_region *
@@ -813,12 +815,9 @@ static void i915_ttm_adjust_lru(struct drm_i915_gem_object *obj)
  */
 static void i915_ttm_delayed_free(struct drm_i915_gem_object *obj)
 {
-	if (obj->ttm.created) {
-		ttm_bo_put(i915_gem_to_ttm(obj));
-	} else {
-		__i915_gem_free_object(obj);
-		call_rcu(&obj->rcu, __i915_gem_free_object_rcu);
-	}
+	GEM_BUG_ON(!obj->ttm.created);
+
+	ttm_bo_put(i915_gem_to_ttm(obj));
 }
 
 static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
@@ -898,16 +897,19 @@ void i915_ttm_bo_destroy(struct ttm_buffer_object *bo)
 {
 	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
 
-	i915_ttm_backup_free(obj);
-
-	/* This releases all gem object bindings to the backend. */
-	__i915_gem_free_object(obj);
-
 	i915_gem_object_release_memory_region(obj);
 	mutex_destroy(&obj->ttm.get_io_page.lock);
 
-	if (obj->ttm.created)
+	if (obj->ttm.created) {
+		i915_ttm_backup_free(obj);
+
+		/* This releases all gem object bindings to the backend. */
+		__i915_gem_free_object(obj);
+
 		call_rcu(&obj->rcu, __i915_gem_free_object_rcu);
+	} else {
+		__i915_gem_object_fini(obj);
+	}
 }
 
 /**
@@ -936,7 +938,11 @@ int __i915_gem_ttm_object_init(struct intel_memory_region *mem,
 
 	drm_gem_private_object_init(&i915->drm, &obj->base, size);
 	i915_gem_object_init(obj, &i915_gem_ttm_obj_ops, &lock_class, flags);
-	i915_gem_object_init_memory_region(obj, mem);
+
+	/* Don't put on a region list until we're either locked or fully initialized. */
+	obj->mm.region = intel_memory_region_get(mem);
+	INIT_LIST_HEAD(&obj->mm.region_link);
+
 	i915_gem_object_make_unshrinkable(obj);
 	INIT_RADIX_TREE(&obj->ttm.get_io_page.radix, GFP_KERNEL | __GFP_NOWARN);
 	mutex_init(&obj->ttm.get_io_page.lock);
@@ -963,6 +969,8 @@ int __i915_gem_ttm_object_init(struct intel_memory_region *mem,
 		return i915_ttm_err_to_gem(ret);
 
 	obj->ttm.created = true;
+	i915_gem_object_release_memory_region(obj);
+	i915_gem_object_init_memory_region(obj, mem);
 	i915_ttm_adjust_domains_after_move(obj);
 	i915_ttm_adjust_gem_after_move(obj);
 	i915_gem_object_unlock(obj);
Signature · 1 line
2.31.1
#1 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/ttm: Rework object initialization slightly (rev4)

== Series Details ==

== Series Details ==

Series: drm/i915/ttm: Rework object initialization slightly (rev4)
URL : https://patchwork.freedesktop.org/series/95107/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10666 -> Patchwork_21203
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_basic@query-info:
- fi-kbl-soraka: NOTRUN -> [SKIP][1] ([fdo#109271])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/fi-kbl-soraka/igt@amdgpu/[email protected]

* igt@amdgpu/amd_cs_nop@sync-gfx0:
- fi-bsw-n3050: NOTRUN -> [SKIP][2] ([fdo#109271]) +17 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/fi-bsw-n3050/igt@amdgpu/[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@execlists:
- fi-bsw-n3050: [INCOMPLETE][3] ([i915#2940]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/fi-bsw-n3050/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/fi-bsw-n3050/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- {fi-tgl-dsi}: [DMESG-FAIL][5] ([i915#541]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/fi-tgl-dsi/igt@i915_selftest@live@gt_heartbeat.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/fi-tgl-dsi/igt@i915_selftest@live@gt_heartbeat.html

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

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#2940]: https://gitlab.freedesktop.org/drm/intel/issues/2940
[i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541

Participating hosts (33 -> 28)
------------------------------

Missing (5): fi-rkl-11600 bat-dg1-6 fi-bsw-cyan bat-adlp-4 bat-jsl-1

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

* Linux: CI_DRM_10666 -> Patchwork_21203

CI-20190529: 20190529
CI_DRM_10666: fb718bc531fbe5ccecf5a100280860ce07c25476 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6228: 22643ce4014a0b2dc52ce7916b2f657e2a7757c3 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_21203: 5a2a2de92896566537bb1e4b9cc642abf0995f82 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

5a2a2de92896 drm/i915/ttm: Rework object initialization slightly

== Logs ==

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

#2 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/ttm: Rework object initialization slightly (rev4)

In reply to Thomas Hellström
== Series Details ==

== Series Details ==

Series: drm/i915/ttm: Rework object initialization slightly (rev4)
URL : https://patchwork.freedesktop.org/series/95107/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10666_full -> Patchwork_21203_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

### IGT changes ###

#### Issues hit ####

* igt@feature_discovery@psr2:
- shard-iclb: [PASS][1] -> [SKIP][2] ([i915#658])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-iclb2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb5/igt@[email protected]

* igt@gem_ctx_persistence@smoketest:
- shard-tglb: [PASS][3] -> [FAIL][4] ([i915#2896])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-tglb1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb7/igt@[email protected]

* igt@gem_eio@in-flight-suspend:
- shard-tglb: [PASS][5] -> [INCOMPLETE][6] ([i915#456]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-tglb1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb7/igt@[email protected]

* igt@gem_eio@unwedge-stress:
- shard-tglb: NOTRUN -> [TIMEOUT][7] ([i915#2369] / [i915#3063] / [i915#3648])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-apl: [PASS][8] -> [SKIP][9] ([fdo#109271])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-apl7/igt@gem_exec_fair@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl2/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none-vip@rcs0:
- shard-kbl: [PASS][10] -> [SKIP][11] ([fdo#109271])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-kbl4/igt@gem_exec_fair@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none@vecs0:
- shard-apl: [PASS][12] -> [FAIL][13] ([i915#2842] / [i915#3468])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-apl8/igt@gem_exec_fair@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: [PASS][14] -> [FAIL][15] ([i915#2842])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-iclb4/igt@gem_exec_fair@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb4/igt@gem_exec_fair@[email protected]
- shard-kbl: [PASS][16] -> [FAIL][17] ([i915#2842]) +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-kbl3/igt@gem_exec_fair@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_params@no-bsd:
- shard-tglb: NOTRUN -> [SKIP][18] ([fdo#109283])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@gem_exec_params@secure-non-master:
- shard-tglb: NOTRUN -> [SKIP][19] ([fdo#112283])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@gem_exec_whisper@basic-queues-forked-all:
- shard-glk: [PASS][20] -> [DMESG-WARN][21] ([i915#118] / [i915#95]) +1 similar issue
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-glk6/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk8/igt@[email protected]

* igt@gem_userptr_blits@dmabuf-sync:
- shard-apl: NOTRUN -> [SKIP][22] ([fdo#109271] / [i915#3323])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl2/igt@[email protected]

* igt@gem_userptr_blits@unsync-unmap-after-close:
- shard-tglb: NOTRUN -> [SKIP][23] ([i915#3297])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@gem_userptr_blits@vma-merge:
- shard-apl: NOTRUN -> [FAIL][24] ([i915#3318])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl3/igt@[email protected]

* igt@gen9_exec_parse@allowed-all:
- shard-skl: [PASS][25] -> [DMESG-WARN][26] ([i915#1436] / [i915#716])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-skl8/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl4/igt@[email protected]

* igt@gen9_exec_parse@bb-start-out:
- shard-tglb: NOTRUN -> [SKIP][27] ([i915#2856]) +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb8/igt@[email protected]

* igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
- shard-kbl: NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#1937])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl3/igt@i915_pm_lpsp@[email protected]

* igt@i915_pm_rc6_residency@rc6-fence:
- shard-tglb: NOTRUN -> [WARN][29] ([i915#2681])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@i915_pm_rpm@modeset-non-lpsp-stress:
- shard-tglb: NOTRUN -> [SKIP][30] ([fdo#111644] / [i915#1397] / [i915#2411])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@kms_big_fb@x-tiled-16bpp-rotate-270:
- shard-tglb: NOTRUN -> [SKIP][31] ([fdo#111614])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-0-async-flip:
- shard-tglb: [PASS][32] -> [FAIL][33] ([i915#3722])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-tglb6/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb6/igt@[email protected]

* igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-0-hflip:
- shard-skl: NOTRUN -> [SKIP][34] ([fdo#109271] / [i915#3777])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip:
- shard-apl: NOTRUN -> [SKIP][35] ([fdo#109271] / [i915#3777]) +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl2/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip:
- shard-kbl: NOTRUN -> [SKIP][36] ([fdo#109271] / [i915#3777])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl4/igt@[email protected]

* igt@kms_big_fb@yf-tiled-addfb-size-overflow:
- shard-tglb: NOTRUN -> [SKIP][37] ([fdo#111615]) +3 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_ccs:
- shard-tglb: NOTRUN -> [SKIP][38] ([i915#3689]) +6 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@kms_ccs@pipe-a-bad-pixel-format-y_tiled_ccs.html

* igt@kms_ccs@pipe-a-bad-rotation-90-y_tiled_gen12_mc_ccs:
- shard-kbl: NOTRUN -> [SKIP][39] ([fdo#109271] / [i915#3886]) +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl1/igt@kms_ccs@pipe-a-bad-rotation-90-y_tiled_gen12_mc_ccs.html

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

* igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][41] ([fdo#109271] / [i915#3886]) +4 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk1/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

* igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
- shard-skl: NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#3886]) +4 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][43] ([i915#3689] / [i915#3886])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_mc_ccs.html

* igt@kms_chamelium@vga-edid-read:
- shard-apl: NOTRUN -> [SKIP][44] ([fdo#109271] / [fdo#111827]) +24 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl7/igt@[email protected]

* igt@kms_color@pipe-a-ctm-0-75:
- shard-skl: [PASS][45] -> [DMESG-WARN][46] ([i915#1982])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-skl9/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl8/igt@[email protected]

* igt@kms_color_chamelium@pipe-b-ctm-0-5:
- shard-skl: NOTRUN -> [SKIP][47] ([fdo#109271] / [fdo#111827]) +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@[email protected]

* igt@kms_color_chamelium@pipe-b-ctm-green-to-red:
- shard-glk: NOTRUN -> [SKIP][48] ([fdo#109271] / [fdo#111827]) +1 similar issue
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk1/igt@[email protected]

* igt@kms_color_chamelium@pipe-b-ctm-limited-range:
- shard-tglb: NOTRUN -> [SKIP][49] ([fdo#109284] / [fdo#111827]) +6 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@kms_color_chamelium@pipe-b-degamma:
- shard-kbl: NOTRUN -> [SKIP][50] ([fdo#109271] / [fdo#111827]) +3 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl3/igt@[email protected]

* igt@kms_content_protection@dp-mst-type-0:
- shard-tglb: NOTRUN -> [SKIP][51] ([i915#3116])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@kms_content_protection@lic:
- shard-apl: NOTRUN -> [TIMEOUT][52] ([i915#1319])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl7/igt@[email protected]
- shard-kbl: NOTRUN -> [TIMEOUT][53] ([i915#1319])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl4/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-32x32-offscreen:
- shard-tglb: NOTRUN -> [SKIP][54] ([i915#3319]) +2 similar issues
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-alpha-opaque:
- shard-skl: NOTRUN -> [FAIL][55] ([i915#3444])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-32x10-sliding:
- shard-tglb: NOTRUN -> [SKIP][56] ([i915#3359]) +4 similar issues
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-skl: NOTRUN -> [INCOMPLETE][57] ([i915#300])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-512x512-random:
- shard-tglb: NOTRUN -> [SKIP][58] ([fdo#109279] / [i915#3359]) +4 similar issues
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-tglb: [PASS][59] -> [INCOMPLETE][60] ([i915#2411] / [i915#456])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-tglb6/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb7/igt@[email protected]

* igt@kms_cursor_crc@pipe-d-cursor-suspend:
- shard-kbl: NOTRUN -> [SKIP][61] ([fdo#109271]) +67 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl4/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [PASS][62] -> [FAIL][63] ([i915#2346])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-glk2/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk4/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-skl: [PASS][64] -> [FAIL][65] ([i915#2346] / [i915#533])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-skl10/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

* igt@kms_cursor_legacy@pipe-d-torture-bo:
- shard-skl: NOTRUN -> [SKIP][66] ([fdo#109271] / [i915#533])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl6/igt@[email protected]

* igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size:
- shard-tglb: NOTRUN -> [SKIP][67] ([i915#4103])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size.html

* igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1:
- shard-glk: [PASS][68] -> [FAIL][69] ([i915#79])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-glk2/igt@kms_flip@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk5/igt@kms_flip@[email protected]

* igt@kms_flip@plain-flip-ts-check@a-edp1:
- shard-skl: [PASS][70] -> [FAIL][71] ([i915#2122])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-skl10/igt@kms_flip@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl3/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs:
- shard-tglb: NOTRUN -> [SKIP][72] ([i915#2587])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb8/igt@[email protected]

* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile:
- shard-iclb: [PASS][73] -> [SKIP][74] ([i915#3701])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-iclb8/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-render:
- shard-tglb: NOTRUN -> [SKIP][75] ([fdo#111825]) +25 similar issues
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb8/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-render.html

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-pwrite:
- shard-iclb: NOTRUN -> [SKIP][76] ([fdo#109280]) +4 similar issues
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@fbcpsr-1p-shrfb-fliptrack-mmap-gtt:
- shard-skl: NOTRUN -> [SKIP][77] ([fdo#109271]) +65 similar issues
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-render:
- shard-glk: NOTRUN -> [SKIP][78] ([fdo#109271]) +36 similar issues
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk1/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-render.html

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- shard-apl: NOTRUN -> [SKIP][79] ([fdo#109271] / [i915#533]) +5 similar issues
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl3/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence:
- shard-kbl: NOTRUN -> [SKIP][80] ([fdo#109271] / [i915#533])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl4/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [PASS][81] -> [INCOMPLETE][82] ([i915#155] / [i915#794])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-kbl7/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl4/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-kbl: [PASS][83] -> [DMESG-WARN][84] ([i915#180]) +1 similar issue
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-kbl4/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl7/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-apl: NOTRUN -> [FAIL][85] ([fdo#108145] / [i915#265]) +2 similar issues
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl2/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
- shard-kbl: NOTRUN -> [FAIL][86] ([i915#265])
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl3/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
- shard-kbl: NOTRUN -> [FAIL][87] ([fdo#108145] / [i915#265])
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl1/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
- shard-skl: NOTRUN -> [FAIL][88] ([i915#265])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][89] -> [FAIL][90] ([fdo#108145] / [i915#265]) +1 similar issue
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-skl5/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl5/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-alpha-transparent-fb:
- shard-apl: NOTRUN -> [FAIL][91] ([i915#265])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl1/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-max:
- shard-skl: NOTRUN -> [FAIL][92] ([fdo#108145] / [i915#265]) +1 similar issue
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-none:
- shard-tglb: NOTRUN -> [SKIP][93] ([i915#3536])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb8/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1:
- shard-kbl: NOTRUN -> [SKIP][94] ([fdo#109271] / [i915#658])
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl3/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4:
- shard-tglb: NOTRUN -> [SKIP][95] ([i915#2920])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb8/igt@[email protected]

* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-4:
- shard-apl: NOTRUN -> [SKIP][96] ([fdo#109271] / [i915#658]) +8 similar issues
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl2/igt@[email protected]

* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3:
- shard-glk: NOTRUN -> [SKIP][97] ([fdo#109271] / [i915#658])
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk1/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][98] -> [SKIP][99] ([fdo#109642] / [fdo#111068] / [i915#658])
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-iclb2/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb5/igt@[email protected]

* igt@kms_psr2_su@page_flip:
- shard-skl: NOTRUN -> [SKIP][100] ([fdo#109271] / [i915#658])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@kms_psr2_su@page_flip.html

* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-tglb: NOTRUN -> [FAIL][101] ([i915#132] / [i915#3467]) +2 similar issues
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@kms_psr@psr2_cursor_plane_onoff.html

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [PASS][102] -> [SKIP][103] ([fdo#109441]) +2 similar issues
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb5/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@kms_sysfs_edid_timing:
- shard-kbl: NOTRUN -> [FAIL][104] ([IGT#2])
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl3/igt@kms_sysfs_edid_timing.html

* igt@kms_universal_plane@cursor-fb-leak-pipe-d:
- shard-iclb: NOTRUN -> [SKIP][105] ([fdo#109278])
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb6/igt@[email protected]

* igt@kms_writeback@writeback-check-output:
- shard-apl: NOTRUN -> [SKIP][106] ([fdo#109271] / [i915#2437])
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl7/igt@[email protected]

* igt@kms_writeback@writeback-fb-id:
- shard-tglb: NOTRUN -> [SKIP][107] ([i915#2437])
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@nouveau_crc@pipe-a-ctx-flip-detection:
- shard-tglb: NOTRUN -> [SKIP][108] ([i915#2530])
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@perf@unprivileged-single-ctx-counters:
- shard-tglb: NOTRUN -> [SKIP][109] ([fdo#109289])
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
- shard-apl: NOTRUN -> [SKIP][110] ([fdo#109271]) +294 similar issues
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl7/igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name.html

* igt@prime_nv_test@i915_blt_fill_nv_read:
- shard-tglb: NOTRUN -> [SKIP][111] ([fdo#109291])
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@prime_nv_test@i915_blt_fill_nv_read.html

* igt@sysfs_clients@busy:
- shard-kbl: NOTRUN -> [SKIP][112] ([fdo#109271] / [i915#2994])
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl4/igt@[email protected]

* igt@sysfs_clients@fair-1:
- shard-apl: NOTRUN -> [SKIP][113] ([fdo#109271] / [i915#2994]) +3 similar issues
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-apl8/igt@[email protected]

* igt@sysfs_clients@pidname:
- shard-tglb: NOTRUN -> [SKIP][114] ([i915#2994])
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@sysfs_heartbeat_interval@precise@vecs0:
- shard-iclb: [PASS][115] -> [FAIL][116] ([i915#1755])
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-iclb6/igt@sysfs_heartbeat_interval@[email protected]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb6/igt@sysfs_heartbeat_interval@[email protected]

#### Possible fixes ####

* igt@gem_ctx_isolation@preservation-s3@vcs0:
- shard-kbl: [DMESG-WARN][117] ([i915#180]) -> [PASS][118] +2 similar issues
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-kbl7/igt@gem_ctx_isolation@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl4/igt@gem_ctx_isolation@[email protected]

* igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk: [FAIL][119] ([i915#2842]) -> [PASS][120]
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-glk7/igt@gem_exec_fair@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none@vcs0:
- shard-kbl: [FAIL][121] ([i915#2842]) -> [PASS][122] +1 similar issue
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-kbl1/igt@gem_exec_fair@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-kbl3/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-tglb: [FAIL][123] ([i915#2842]) -> [PASS][124]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-tglb5/igt@gem_exec_fair@[email protected]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb1/igt@gem_exec_fair@[email protected]

* igt@gem_workarounds@suspend-resume:
- shard-tglb: [INCOMPLETE][125] ([i915#456]) -> [PASS][126] +1 similar issue
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-tglb7/igt@[email protected]
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-tglb3/igt@[email protected]

* igt@gen9_exec_parse@allowed-single:
- shard-skl: [DMESG-WARN][127] ([i915#1436] / [i915#716]) -> [PASS][128]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-skl1/igt@[email protected]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][129] ([i915#454]) -> [PASS][130]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-iclb3/igt@[email protected]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-iclb8/igt@[email protected]

* igt@i915_suspend@fence-restore-untiled:
- shard-skl: [INCOMPLETE][131] ([i915#198] / [i915#4173]) -> [PASS][132]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-skl6/igt@[email protected]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-skl10/igt@[email protected]

* igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
- shard-glk: [FAIL][133] ([i915#72]) -> [PASS][134]
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10666/shard-glk3/igt@[email protected]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21203/shard-glk7/igt@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-kbl: [INCOMPLETE][135] ([i915#155] / [i915#636]) -> [PASS][136]
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1066

== Logs ==

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

#3 lore raw
In reply to Thomas Hellström
Quoted 26 lines · Thomas Hellström

We may end up in i915_ttm_bo_destroy() in an error path before the object is fully initialized. In that case it's not correct to call __i915_gem_free_object(), because that function
a) Assumes the gem object refcount is 0, which it isn't.
b) frees the placements which are owned by the caller until the init_object() region ops returns successfully. Fix this by providing a lightweight cleanup function __i915_gem_object_fini() which is also called by __i915_gem_free_object().

While doing this, also make sure we call dma_resv_fini() as part of ordinary object destruction and not from the RCU callback that frees the object. This will help track down bugs where the object is incorrectly locked from an RCU lookup.

Finally, make sure the object isn't put on the region list until it's either locked or fully initialized in order to block list processing of partially initialized objects.

v2:
- The TTM object backend memory was freed before the gem pages were put. Separate this functionality into __i915_gem_object_pages_fini() and call it from the TTM delete_mem_notify() callback.
v3:
- Include i915_gem_object_free_mmaps() in __i915_gem_object_pages_fini() to make sure we don't inadvertedly introduce a race.

Quoted 2 lines

R-b still stands.

Quoted 203 lines
---
  drivers/gpu/drm/i915/gem/i915_gem_object.c | 43 +++++++++++++++++++---
  drivers/gpu/drm/i915/gem/i915_gem_object.h |  5 +++
  drivers/gpu/drm/i915/gem/i915_gem_ttm.c    | 36 +++++++++++-------
  3 files changed, 64 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_object.c +37 -6
index 6fb9afb65034..b88b121e244a 100644
@@ -89,6 +89,22 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
  	mutex_init(&obj->mm.get_dma_page.lock);
  }
 
+/**
+ * i915_gem_object_fini - Clean up a GEM object initialization
+ * @obj: The gem object to cleanup
+ *
+ * This function cleans up gem object fields that are set up by
+ * drm_gem_private_object_init() and i915_gem_object_init().
+ * It's primarily intended as a helper for backends that need to
+ * clean up the gem object in separate steps.
+ */
+void __i915_gem_object_fini(struct drm_i915_gem_object *obj)
+{
+	mutex_destroy(&obj->mm.get_page.lock);
+	mutex_destroy(&obj->mm.get_dma_page.lock);
+	dma_resv_fini(&obj->base._resv);
+}
+
  /**
   * Mark up the object's coherency levels for a given cache_level
   * @obj: #drm_i915_gem_object
@@ -174,7 +190,6 @@ void __i915_gem_free_object_rcu(struct rcu_head *head)
  		container_of(head, typeof(*obj), rcu);
  	struct drm_i915_private *i915 = to_i915(obj->base.dev);
 
-	dma_resv_fini(&obj->base._resv);
  	i915_gem_object_free(obj);
 
  	GEM_BUG_ON(!atomic_read(&i915->mm.free_count));
@@ -204,10 +219,17 @@ static void __i915_gem_object_free_mmaps(struct drm_i915_gem_object *obj)
  	}
  }
 
-void __i915_gem_free_object(struct drm_i915_gem_object *obj)
+/**
+ * __i915_gem_object_pages_fini - Clean up pages use of a gem object
+ * @obj: The gem object to clean up
+ *
+ * This function cleans up usage of the object mm.pages member. It
+ * is intended for backends that need to clean up a gem object in
+ * separate steps and needs to be called when the object is idle before
+ * the object's backing memory is freed.
+ */
+void __i915_gem_object_pages_fini(struct drm_i915_gem_object *obj)
  {
-	trace_i915_gem_object_destroy(obj);
-
  	if (!list_empty(&obj->vma.list)) {
  		struct i915_vma *vma;
 
@@ -233,11 +255,17 @@ void __i915_gem_free_object(struct drm_i915_gem_object *obj)
 
  	__i915_gem_object_free_mmaps(obj);
 
-	GEM_BUG_ON(!list_empty(&obj->lut_list));
-
  	atomic_set(&obj->mm.pages_pin_count, 0);
  	__i915_gem_object_put_pages(obj);
  	GEM_BUG_ON(i915_gem_object_has_pages(obj));
+}
+
+void __i915_gem_free_object(struct drm_i915_gem_object *obj)
+{
+	trace_i915_gem_object_destroy(obj);
+
+	GEM_BUG_ON(!list_empty(&obj->lut_list));
+
  	bitmap_free(obj->bit_17);
 
  	if (obj->base.import_attach)
@@ -253,6 +281,8 @@ void __i915_gem_free_object(struct drm_i915_gem_object *obj)
 
  	if (obj->shares_resv_from)
  		i915_vm_resv_put(obj->shares_resv_from);
+
+	__i915_gem_object_fini(obj);
  }
 
  static void __i915_gem_free_objects(struct drm_i915_private *i915,
@@ -266,6 +296,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
  			obj->ops->delayed_free(obj);
  			continue;
  		}
+		__i915_gem_object_pages_fini(obj);
  		__i915_gem_free_object(obj);
 
  		/* But keep the pointer alive for RCU-protected lookups */
drivers/gpu/drm/i915/gem/i915_gem_object.h +5 -0
index 3043fcbd31bd..7f9f2e5ba0ec 100644
@@ -58,6 +58,9 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
  			  const struct drm_i915_gem_object_ops *ops,
  			  struct lock_class_key *key,
  			  unsigned alloc_flags);
+
+void __i915_gem_object_fini(struct drm_i915_gem_object *obj);
+
  struct drm_i915_gem_object *
  i915_gem_object_create_shmem(struct drm_i915_private *i915,
  			     resource_size_t size);
@@ -582,6 +585,8 @@ bool i915_gem_object_is_shmem(const struct drm_i915_gem_object *obj);
 
  void __i915_gem_free_object_rcu(struct rcu_head *head);
 
+void __i915_gem_object_pages_fini(struct drm_i915_gem_object *obj);
+
  void __i915_gem_free_object(struct drm_i915_gem_object *obj);
 
  bool i915_gem_object_evictable(struct drm_i915_gem_object *obj);
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +22 -14
index b94497989995..a0ab5c44627b 100644
@@ -367,8 +367,10 @@ static void i915_ttm_delete_mem_notify(struct ttm_buffer_object *bo)
  {
  	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
 
-	if (likely(obj))
+	if (likely(obj)) {
+		__i915_gem_object_pages_fini(obj);
  		i915_ttm_free_cached_io_st(obj);
+	}
  }
 
  static struct intel_memory_region *
@@ -813,12 +815,9 @@ static void i915_ttm_adjust_lru(struct drm_i915_gem_object *obj)
   */
  static void i915_ttm_delayed_free(struct drm_i915_gem_object *obj)
  {
-	if (obj->ttm.created) {
-		ttm_bo_put(i915_gem_to_ttm(obj));
-	} else {
-		__i915_gem_free_object(obj);
-		call_rcu(&obj->rcu, __i915_gem_free_object_rcu);
-	}
+	GEM_BUG_ON(!obj->ttm.created);
+
+	ttm_bo_put(i915_gem_to_ttm(obj));
  }
 
  static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
@@ -898,16 +897,19 @@ void i915_ttm_bo_destroy(struct ttm_buffer_object *bo)
  {
  	struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
 
-	i915_ttm_backup_free(obj);
-
-	/* This releases all gem object bindings to the backend. */
-	__i915_gem_free_object(obj);
-
  	i915_gem_object_release_memory_region(obj);
  	mutex_destroy(&obj->ttm.get_io_page.lock);
 
-	if (obj->ttm.created)
+	if (obj->ttm.created) {
+		i915_ttm_backup_free(obj);
+
+		/* This releases all gem object bindings to the backend. */
+		__i915_gem_free_object(obj);
+
  		call_rcu(&obj->rcu, __i915_gem_free_object_rcu);
+	} else {
+		__i915_gem_object_fini(obj);
+	}
  }
 
  /**
@@ -936,7 +938,11 @@ int __i915_gem_ttm_object_init(struct intel_memory_region *mem,
 
  	drm_gem_private_object_init(&i915->drm, &obj->base, size);
  	i915_gem_object_init(obj, &i915_gem_ttm_obj_ops, &lock_class, flags);
-	i915_gem_object_init_memory_region(obj, mem);
+
+	/* Don't put on a region list until we're either locked or fully initialized. */
+	obj->mm.region = intel_memory_region_get(mem);
+	INIT_LIST_HEAD(&obj->mm.region_link);
+
  	i915_gem_object_make_unshrinkable(obj);
  	INIT_RADIX_TREE(&obj->ttm.get_io_page.radix, GFP_KERNEL | __GFP_NOWARN);
  	mutex_init(&obj->ttm.get_io_page.lock);
@@ -963,6 +969,8 @@ int __i915_gem_ttm_object_init(struct intel_memory_region *mem,
  		return i915_ttm_err_to_gem(ret);
 
  	obj->ttm.created = true;
+	i915_gem_object_release_memory_region(obj);
+	i915_gem_object_init_memory_region(obj, mem);
  	i915_ttm_adjust_domains_after_move(obj);
  	i915_ttm_adjust_gem_after_move(obj);
  	i915_gem_object_unlock(obj);