Skip to contentSkip to conversation

Add reclaim to the dmem cgroup controller

PATCH Superseded Thomas Hellström 6 participants 22 messages Jun 11 – Jul 3

Subsystems (8)

v6 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Thomas Hellström

author maintainer
#0 lore raw

v6 cover Add reclaim to the dmem cgroup controller

When writing a "max" limit lower than the current usage, the existing code silently failed. This series aims to improve on that by returning -EBUSY on failure and also attempt to synchronously reclaim device memory to push the usage under the new max limit to avoid the error.

Patch 1 fixes a pre-existing amdgpu_vram_mgr_init() error path Patch 2 introduces struct dmem_cgroup_init for extensible region
registration.
Patch 3 implements and documents a reclaim callback interface
for the dmem controller.
Patch 4 implements a TTM reclaim callback.
Patches 5-6 hook up the reclaim callback to the dmem cgroup-aware
drivers xe and amdgpu.

v2:
- Remove the error propagation that was in a previous series (Maarten)
- A number of updates in patch 1. See its commit message for details (Maarten)

v3:
- Add patch 1 fixing a pre-existing amdgpu_vram_mgr_init() error path bug where drmm_cgroup_register_region() was called before INIT_LIST_HEAD() and gpu_buddy_init(), causing a kernel panic on failure. (Sashiko-bot)
- Use an rwsem to protect reclaim callback registration and region unregister against concurrent reclaim invocations. (Sashiko-bot)
- Fix ttm_resource_manager_set_dmem_region() storing an error pointer in man->cg unconditionally. (Sashiko-bot)
- Fix kernel-doc function name format for ttm_bo_evict_cgroup() and ttm_resource_manager_set_dmem_region().

v4:
- Rebased on drm-tip; dropped the XE_PL_STOLEN guard in the xe patch as stolen memory uses a separate TTM manager.

v5:
- Add patch 2 introducing struct dmem_cgroup_init to make the dmem_cgroup_register_region() API extensible without adding positional arguments in the future.
- Use nonblock=true in reset_all_resource_limits() to avoid sleeping inside rcu_read_lock() in dmemcs_offline(). (Sashiko-bot)
- Compare usage against the truncated limit stored in cnt.max, not the original u64. (Sashiko-bot)
- Use DMEM_MAX_RECLAIM_RETRIES (16) retry budget instead of 5, matching the memcg controller; only -ENOSPC (no progress) counts against the budget, other errors abort immediately.
- Handle NULL region in ttm_resource_manager_set_dmem_region() to clear the reclaim callback, preventing use-after-free when the manager is torn down while the dmem region outlives it. (Sashiko-bot)
- Return 0 on any eviction progress; reserve -ENOSPC for zero progress.
- Clear the reclaim callback in xe and amdgpu fini paths to prevent use-after-free after driver unbind with open DRM file descriptors. (Sashiko-bot)
- Register xe fini devres action before drmm_cgroup_register_region() so LIFO teardown runs unregister first, draining callbacks before the manager is destroyed. (Sashiko-bot)
- Switch amdgpu to explicit dmem_cgroup_unregister_region() at the top of amdgpu_vram_mgr_fini() before any manager teardown, since amdgpu's fini is called explicitly during driver unbind before drmm cleanup. (Sashiko-bot)
- Wrap the xe reclaim callback with drm_dev_enter()/drm_dev_exit() to prevent TTM reclaim from running after driver unbind.

v6:
- Move the ops check inside down_read() in set_resource_max(), guarded by region->unregistered, to close a UAF race against dmem_cgroup_unregister_region(). (Sashiko-bot)
- Fix dmem_cgroup_ops->reclaim docstring: -ENOSPC is retried up to DMEM_MAX_RECLAIM_RETRIES times, not an immediate stop. (Sashiko-bot)
- Fix mgr->cg_region never being assigned in amdgpu_vram_mgr_init(), causing dmem_cgroup_unregister_region() in fini to silently no-op. (Sashiko-bot)
- Reorder amdgpu_vram_mgr_fini() to call set_used(false) and evict_all() before dmem_cgroup_unregister_region(), so ttm_resource_free() can uncharge via man->cg during eviction; clear man->cg after unregister. (Sashiko-bot)

User-space tests are at
https://patchwork.freedesktop.org/series/163935/

Test-with: [email protected]

Thomas Hellström (6):
drm/amdgpu: Fix init ordering in amdgpu_vram_mgr_init() cgroup/dmem: Introduce struct dmem_cgroup_init for region initialization cgroup/dmem: Add reclaim callback for lowering max below current usage drm/ttm: Hook up a cgroup-aware reclaim callback for the dmem
controller
drm/xe: Wire up dmem cgroup reclaim for VRAM manager drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c      |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c |  30 ++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h |   2 +
 drivers/gpu/drm/drm_drv.c                    |   8 +-
 drivers/gpu/drm/ttm/ttm_bo.c                 |  95 +++++++++++++++++++-
 drivers/gpu/drm/ttm/ttm_bo_util.c            |   3 +-
 drivers/gpu/drm/ttm/ttm_resource.c           |  50 +++++++++++
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c         |  53 +++++++++--
 include/drm/drm_drv.h                        |   4 +-
 include/drm/ttm/ttm_bo.h                     |  10 +++
 include/drm/ttm/ttm_resource.h               |   7 ++
 include/linux/cgroup_dmem.h                  |  38 +++++++-
 kernel/cgroup/dmem.c                         | 129 ++++++++++++++++++++++++---
 13 files changed, 396 insertions(+), 35 deletions(-)
Signature · 29 lines
2.54.0

Thomas Hellström (6):
  drm/amdgpu: Fix init ordering in amdgpu_vram_mgr_init()
  cgroup/dmem: Introduce struct dmem_cgroup_init for region
    initialization
  cgroup/dmem: Add reclaim callback for lowering max below current usage
  drm/ttm: Hook up a cgroup-aware reclaim callback for the dmem
    controller
  drm/xe: Wire up dmem cgroup reclaim for VRAM manager
  drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c      |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c |  30 ++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h |   2 +
 drivers/gpu/drm/drm_drv.c                    |   8 +-
 drivers/gpu/drm/ttm/ttm_bo.c                 |  95 +++++++++++++-
 drivers/gpu/drm/ttm/ttm_bo_util.c            |   3 +-
 drivers/gpu/drm/ttm/ttm_resource.c           |  50 +++++++
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c         |  53 +++++++-
 include/drm/drm_drv.h                        |   4 +-
 include/drm/ttm/ttm_bo.h                     |  10 ++
 include/drm/ttm/ttm_resource.h               |   7 +
 include/linux/cgroup_dmem.h                  |  38 +++++-
 kernel/cgroup/dmem.c                         | 129 +++++++++++++++++--
 13 files changed, 396 insertions(+), 35 deletions(-)

-- 
2.54.0
author maintainer
#1 lore raw

PATCH v6 1/6 drm/amdgpu: Fix init ordering in amdgpu_vram_mgr_init()

drmm_cgroup_register_region() is called before INIT_LIST_HEAD() and gpu_buddy_init() in amdgpu_vram_mgr_init(). If it fails, the function returns early and bypasses those initializations.

Since adev->mman.initialized is set to true before amdgpu_vram_mgr_init() is called, a failure triggers amdgpu_ttm_fini(), which calls amdgpu_vram_mgr_fini(), which then:

- Calls list_for_each_entry_safe() on reservations_pending and reserved_pages, whose list_head::next pointers are zero-initialized (NULL). The loop does not recognize them as empty and dereferences NULL.

- Calls gpu_buddy_fini(), which iterates free_trees[] unconditionally via for_each_free_tree(). Since mm->free_trees is NULL (never allocated), this dereferences NULL.

Both result in a kernel panic on the module load error path.

Fix by moving drmm_cgroup_register_region() to after the list and buddy allocator are fully initialized, so the teardown path is safe to run.

Fixes 2b624a2c1865 ("drm/ttm: Handle cgroup based eviction in TTM")
Cc Friedrich Vock <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Christian König <[email protected]>
Cc Alex Deucher <[email protected]>
Cc <[email protected]> # v6.14+
Assisted-by GitHub_Copilot:claude-sonnet-4.6
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4 -3
index 2a241a5b12c4..ac3f71d77140 100644
@@ -918,9 +918,6 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 	struct ttm_resource_manager *man = &mgr->manager;
 	int err;
 
-	man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram", adev->gmc.real_vram_size);
-	if (IS_ERR(man->cg))
-		return PTR_ERR(man->cg);
 	ttm_resource_manager_init(man, &adev->mman.bdev,
 				  adev->gmc.real_vram_size);
 
@@ -935,6 +932,10 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 	if (err)
 		return err;
 
+	man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram", adev->gmc.real_vram_size);
+	if (IS_ERR(man->cg))
+		return PTR_ERR(man->cg);
+
 	ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_VRAM, &mgr->manager);
 	ttm_resource_manager_set_used(man, true);
 	return 0;
Signature · 1 line
2.54.0
author maintainer
#3 lore raw

PATCH v6 2/6 cgroup/dmem: Introduce struct dmem_cgroup_init for region initialization

In reply to Thomas Hellström

Replace the bare u64 size argument to dmem_cgroup_register_region() and drmm_cgroup_register_region() with a const struct dmem_cgroup_init * pointer. The struct currently carries only the size field, but using a struct makes the API extensible: future callers can supply additional initialization parameters without adding more positional arguments.

Update all in-tree callers (amdgpu, xe) to use a compound-literal initializer.

v5:
- Commit introduced.

Assisted-by GitHub_Copilot:claude-sonnet-4.6
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c |  6 +++++-
 drivers/gpu/drm/drm_drv.c                    |  8 +++++---
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c         |  7 ++++++-
 include/drm/drm_drv.h                        |  4 +++-
 include/linux/cgroup_dmem.h                  | 16 +++++++++++++---
 kernel/cgroup/dmem.c                         | 10 ++++++----
 6 files changed, 38 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +5 -1
index ac3f71d77140..08f05c3aed1d 100644
@@ -23,6 +23,7 @@
  */
 
 #include <linux/dma-mapping.h>
+#include <linux/cgroup_dmem.h>
 #include <drm/ttm/ttm_range_manager.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_buddy.h>
@@ -932,7 +933,10 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 	if (err)
 		return err;
 
-	man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram", adev->gmc.real_vram_size);
+	man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram",
+					      &(struct dmem_cgroup_init){
+						.size = adev->gmc.real_vram_size,
+					      });
 	if (IS_ERR(man->cg))
 		return PTR_ERR(man->cg);
 
drivers/gpu/drm/drm_drv.c +5 -3
index 1ff0bf7cba6a..3c570f9393b9 100644
@@ -960,17 +960,19 @@ static void drmm_cg_unregister_region(struct drm_device *dev, void *arg)
  * drmm_cgroup_register_region - Register a region of a DRM device to cgroups
  * @dev: device for region
  * @region_name: Region name for registering
- * @size: Size of region in bytes
+ * @init: Initialization parameters for the region.
  *
  * This decreases the ref-count of @dev by one. The device is destroyed if the
  * ref-count drops to zero.
  */
-struct dmem_cgroup_region *drmm_cgroup_register_region(struct drm_device *dev, const char *region_name, u64 size)
+struct dmem_cgroup_region *
+drmm_cgroup_register_region(struct drm_device *dev, const char *region_name,
+			    const struct dmem_cgroup_init *init)
 {
 	struct dmem_cgroup_region *region;
 	int ret;
 
-	region = dmem_cgroup_register_region(size, "drm/%s/%s", dev->unique, region_name);
+	region = dmem_cgroup_register_region(init, "drm/%s/%s", dev->unique, region_name);
 	if (IS_ERR_OR_NULL(region))
 		return region;
 
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c +6 -1
index b518f7dec680..308fda4248eb 100644
@@ -4,6 +4,8 @@
  * Copyright (C) 2021-2022 Red Hat
  */
 
+#include <linux/cgroup_dmem.h>
+
 #include <drm/drm_managed.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_buddy.h>
@@ -303,7 +305,10 @@ int __xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_ttm_vram_mgr *mgr,
 	int err;
 
 	name = mem_type == XE_PL_VRAM0 ? "vram0" : "vram1";
-	man->cg = drmm_cgroup_register_region(&xe->drm, name, size);
+	man->cg = drmm_cgroup_register_region(&xe->drm, name,
+					      &(struct dmem_cgroup_init){
+						.size = size,
+					      });
 	if (IS_ERR(man->cg))
 		return PTR_ERR(man->cg);
 
include/drm/drm_drv.h +3 -1
index e09559495c5b..b23830494ed4 100644
@@ -34,6 +34,7 @@
 
 #include <drm/drm_device.h>
 
+struct dmem_cgroup_init;
 struct dmem_cgroup_region;
 struct drm_fb_helper;
 struct drm_fb_helper_surface_size;
@@ -433,7 +434,8 @@ void *__devm_drm_dev_alloc(struct device *parent,
 
 struct dmem_cgroup_region *
 drmm_cgroup_register_region(struct drm_device *dev,
-			    const char *region_name, u64 size);
+			    const char *region_name,
+			    const struct dmem_cgroup_init *init);
 
 /**
  * devm_drm_dev_alloc - Resource managed allocation of a &drm_device instance
include/linux/cgroup_dmem.h +13 -3
index dd4869f1d736..d9eab8a2c1ee 100644
@@ -14,8 +14,18 @@ struct dmem_cgroup_pool_state;
 /* Opaque definition of a cgroup region, used internally */
 struct dmem_cgroup_region;
 
+/**
+ * struct dmem_cgroup_init - Initialization parameters for a dmem cgroup region.
+ * @size: Size of the region in bytes.
+ */
+struct dmem_cgroup_init {
+	u64 size;
+};
+
 #if IS_ENABLED(CONFIG_CGROUP_DMEM)
-struct dmem_cgroup_region *dmem_cgroup_register_region(u64 size, const char *name_fmt, ...) __printf(2,3);
+struct dmem_cgroup_region *
+dmem_cgroup_register_region(const struct dmem_cgroup_init *init,
+			    const char *name_fmt, ...) __printf(2, 3);
 void dmem_cgroup_unregister_region(struct dmem_cgroup_region *region);
 int dmem_cgroup_try_charge(struct dmem_cgroup_region *region, u64 size,
 			   struct dmem_cgroup_pool_state **ret_pool,
@@ -27,8 +37,8 @@ bool dmem_cgroup_state_evict_valuable(struct dmem_cgroup_pool_state *limit_pool,
 
 void dmem_cgroup_pool_state_put(struct dmem_cgroup_pool_state *pool);
 #else
-static inline __printf(2,3) struct dmem_cgroup_region *
-dmem_cgroup_register_region(u64 size, const char *name_fmt, ...)
+static inline __printf(2, 3) struct dmem_cgroup_region *
+dmem_cgroup_register_region(const struct dmem_cgroup_init *init, const char *name_fmt, ...)
 {
 	return NULL;
 }
kernel/cgroup/dmem.c +6 -4
index 6430c7ce1e03..d12c8543f3fe 100644
@@ -502,7 +502,7 @@ EXPORT_SYMBOL_GPL(dmem_cgroup_unregister_region);
 
 /**
  * dmem_cgroup_register_region() - Register a regions for dev cgroup.
- * @size: Size of region to register, in bytes.
+ * @init: Initialization parameters for the region.
  * @fmt: Region parameters to register
  *
  * This function registers a node in the dmem cgroup with the
@@ -511,13 +511,15 @@ EXPORT_SYMBOL_GPL(dmem_cgroup_unregister_region);
  *
  * Return: NULL or a struct on success, PTR_ERR on failure.
  */
-struct dmem_cgroup_region *dmem_cgroup_register_region(u64 size, const char *fmt, ...)
+struct dmem_cgroup_region *
+dmem_cgroup_register_region(const struct dmem_cgroup_init *init,
+			    const char *fmt, ...)
 {
 	struct dmem_cgroup_region *ret;
 	char *region_name;
 	va_list ap;
 
-	if (!size)
+	if (!init || !init->size)
 		return NULL;
 
 	va_start(ap, fmt);
@@ -534,7 +536,7 @@ struct dmem_cgroup_region *dmem_cgroup_register_region(u64 size, const char *fmt
 
 	INIT_LIST_HEAD(&ret->pools);
 	ret->name = region_name;
-	ret->size = size;
+	ret->size = init->size;
 	kref_init(&ret->ref);
 
 	spin_lock(&dmemcg_lock);
Signature · 1 line
2.54.0
author maintainer
#4 lore raw

PATCH v6 3/6 cgroup/dmem: Add reclaim callback for lowering max below current usage

In reply to Thomas Hellström

Add an optional reclaim callback to struct dmem_cgroup_region. When dmem.max is set below the current usage of a cgroup pool, the new limit is applied immediately (so that concurrent allocations are throttled while reclaim is in progress) and then the driver is asked to evict memory to bring usage back below the limit.

Reclaim is attempted up to a bounded number of times. No error is returned to userspace if usage remains above the limit after reclaim, and a pending signal will abort the reclaim loop early. This matches the behavior of memory.max in the memory cgroup controller.

Also honor O_NONBLOCK so that if that flag is set during the max value write, no reclaim is initiated. The idea is to avoid charging the reclaim cost to the writer of the max value.

v2:
- Write max before reclaim is attempted (Maarten)
- Let signals abort the reclaim without error (Maarten)
- If a new max value is written with the O_NONBLOCK flag, reclaim is not attempted (Maarten)
- Extract region from the pool parameter rather than passing it explicitly to set_resource_xxx().

v3:
- Use an rwsem to protect reclaim callback registration and region unregister against concurrent reclaim invocations, ensuring reclaim_priv is visible when the callback is invoked. (Sashiko-bot)

v5:
- Rebased on the introduction of struct dmem_cgroup_init.
- Use nonblock=true in reset_all_resource_limits() to avoid sleeping inside rcu_read_lock() in dmemcs_offline(). (Sashiko-bot)
- Compare usage against the truncated limit value stored in cnt.max, not the original u64. (Sashiko-bot)
- Use a DMEM_MAX_RECLAIM_RETRIES (16) retry budget instead of 5, matching the memcg controller's MAX_RECLAIM_RETRIES. Only -ENOSPC (no progress) counts against the retry budget; other errors terminate the loop immediately.

v6:
- Fix dmem_cgroup_ops->reclaim docstring: -ENOSPC does not stop reclaim immediately but is retried up to DMEM_MAX_RECLAIM_RETRIES times; only other negative errors terminate the loop. (Sashiko-bot)

Assisted-by GitHub_Copilot:claude-sonnet-4.6
---
 include/linux/cgroup_dmem.h |  22 +++++++
 kernel/cgroup/dmem.c        | 119 +++++++++++++++++++++++++++++++++---
 2 files changed, 131 insertions(+), 10 deletions(-)
include/linux/cgroup_dmem.h +22 -0
index d9eab8a2c1ee..8664321fa9f7 100644
@@ -14,12 +14,34 @@ struct dmem_cgroup_pool_state;
 /* Opaque definition of a cgroup region, used internally */
 struct dmem_cgroup_region;
 
+/**
+ * struct dmem_cgroup_ops - Operations for a dmem cgroup region.
+ * @reclaim: Optional callback invoked when dmem.max is set below the current
+ *           usage of a pool. The driver should attempt to free at least
+ *           @target_bytes from @pool. May be called multiple times if usage
+ *           remains above the limit after returning.
+ *
+ *           Return: 0 if some progress was made (even if less than
+ *           @target_bytes was freed), -ENOSPC if no progress could be made
+ *           (the caller will retry up to a bounded number of times), or
+ *           another negative error code if a fatal error occurred (stops
+ *           further reclaim attempts immediately).
+ */
+struct dmem_cgroup_ops {
+	int (*reclaim)(struct dmem_cgroup_pool_state *pool,
+		       u64 target_bytes, void *priv);
+};
+
 /**
  * struct dmem_cgroup_init - Initialization parameters for a dmem cgroup region.
  * @size: Size of the region in bytes.
+ * @ops: Optional operations for this region. May be NULL.
+ * @reclaim_priv: Opaque pointer passed to @ops->reclaim. May be NULL.
  */
 struct dmem_cgroup_init {
 	u64 size;
+	const struct dmem_cgroup_ops *ops;
+	void *reclaim_priv;
 };
 
 #if IS_ENABLED(CONFIG_CGROUP_DMEM)
kernel/cgroup/dmem.c +109 -10

193 lines not on this page · raw message

Signature · 1 line
2.54.0
author maintainer
#6 lore raw

PATCH v6 4/6 drm/ttm: Hook up a cgroup-aware reclaim callback for the dmem controller

In reply to Thomas Hellström

Add ttm_bo_evict_cgroup() to evict buffer objects charged to a specific dmem cgroup pool from a resource manager's LRU until a byte target is met. Add ttm_resource_manager_set_dmem_region() to associate a dmem cgroup region with a resource manager; drivers supply their own dmem_cgroup_ops with ttm_resource_manager_dmem_reclaim as the reclaim function and the manager pointer as reclaim_priv in the dmem_cgroup_init to wire up TTM eviction as the reclaim callback.

The eviction context is interruptible; signals abort the operation and propagate back through the write() syscall.

Introduce a new mode for the bo LRU walker so that sleeping locks can be taken. This can be used when the caller doesn't hold any previous dma_resv locks, and where it intends to hold at most one lock at a time.

Like the rest of the TTM eviction this should sooner than later be converted to full WW transactions.

v3:
- Fix ttm_resource_manager_set_dmem_region() storing an error pointer in man->cg unconditionally. (Sashiko-bot)
- Fix kernel-doc function name format for ttm_bo_evict_cgroup() and ttm_resource_manager_set_dmem_region().

v5:
- Rebased on the introduction of struct dmem_cgroup_init.
- Handle NULL region in ttm_resource_manager_set_dmem_region() to clear the reclaim callback, preventing use-after-free when the manager is torn down while the dmem region outlives it. (Sashiko-bot)
- Return 0 on any progress (even partial eviction), -ENOSPC only when nothing was freed; fixes callers that expected 0 on partial success.
- Document that the reclaim callback should return 0 if some progress was made, -ENOSPC if no progress at all, or another error for fatal failures.

Assisted-by GitHub_Copilot:claude-sonnet-4.6
---
 drivers/gpu/drm/ttm/ttm_bo.c       | 95 +++++++++++++++++++++++++++++-
 drivers/gpu/drm/ttm/ttm_bo_util.c  |  3 +-
 drivers/gpu/drm/ttm/ttm_resource.c | 50 ++++++++++++++++
 include/drm/ttm/ttm_bo.h           | 10 ++++
 include/drm/ttm/ttm_resource.h     |  7 +++
 5 files changed, 161 insertions(+), 4 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +92 -3
index bcd76f6bb7f0..db0e38bd8a43 100644
@@ -515,12 +515,20 @@ static s64 ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *
 {
 	struct ttm_bo_evict_walk *evict_walk =
 		container_of(walk, typeof(*evict_walk), walk);
+	/* Capture size before eviction in case res is cleared. */
+	s64 bo_size = bo->base.size;
 	s64 lret;
 
 	if (!dmem_cgroup_state_evict_valuable(evict_walk->limit_pool, bo->resource->css,
 					      evict_walk->try_low, &evict_walk->hit_low))
 		return 0;
 
+	/*
+	 * evict_walk->place is NULL in cgroup drain mode.  Drivers'
+	 * eviction_valuable() callbacks must handle a NULL place, treating it
+	 * as "any placement": the TTM base implementation already does so via
+	 * ttm_resource_intersects().
+	 */
 	if (bo->pin_count || !bo->bdev->funcs->eviction_valuable(bo, evict_walk->place))
 		return 0;
 
@@ -536,11 +544,15 @@ static s64 ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *
 		goto out;
 
 	evict_walk->evicted++;
-	if (evict_walk->res)
+	if (evict_walk->res) {
 		lret = ttm_resource_alloc(evict_walk->evictor, evict_walk->place,
 					  evict_walk->res, NULL);
-	if (lret == 0)
-		return 1;
+		if (lret == 0)
+			return 1;
+	} else {
+		/* Cgroup drain: return bytes freed for byte-denominated progress. */
+		return bo_size;
+	}
 out:
 	/* Errors that should terminate the walk. */
 	if (lret == -ENOSPC)
@@ -614,6 +626,83 @@ static int ttm_bo_evict_alloc(struct ttm_device *bdev,
 	return 0;
 }
 
+/**
+ * ttm_bo_evict_cgroup() - Evict buffer objects charged to a specific cgroup.
+ * @bdev: The TTM device.
+ * @man: The resource manager whose LRU to walk.
+ * @limit_pool: The cgroup pool state whose members should be evicted.
+ * @target_bytes: Number of bytes to free.
+ * @ctx: The TTM operation context.
+ *
+ * Walk the LRU of @man and evict buffer objects that are charged to the
+ * cgroup identified by @limit_pool, until at least @target_bytes have been
+ * freed.  Mirrors the two-pass (trylock -> sleeping-lock, low-watermark)
+ * strategy used by ttm_bo_evict_alloc().
+ *
+ * Return: >= @target_bytes on full success, 0..target_bytes-1 if partial,
+ *         negative error code on fatal error.
+ */
+s64 ttm_bo_evict_cgroup(struct ttm_device *bdev,
+			struct ttm_resource_manager *man,
+			struct dmem_cgroup_pool_state *limit_pool,
+			s64 target_bytes,
+			struct ttm_operation_ctx *ctx)
+{
+	struct ttm_bo_evict_walk evict_walk = {
+		.walk = {
+			.ops = &ttm_evict_walk_ops,
+			.arg = { .ctx = ctx },
+		},
+		.limit_pool = limit_pool,
+		/* place, evictor, res left NULL: selects cgroup drain mode */
+	};
+	s64 lret, pass;
+
+	evict_walk.walk.arg.trylock_only = true;
+	lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, target_bytes);
+	if (lret < 0 || lret >= target_bytes)
+		return lret;
+
+	/* Second pass: also evict BOs at the low watermark. */
+	if (evict_walk.hit_low) {
+		evict_walk.try_low = true;
+		pass = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man,
+					      target_bytes - lret);
+		if (pass < 0)
+			return pass;
+		lret += pass;
+		if (lret >= target_bytes)
+			return lret;
+	}
+
+	/* Full sleeping-lock pass for remaining target. */
+	evict_walk.try_low = evict_walk.hit_low = false;
+	evict_walk.walk.arg.trylock_only = false;
+
+retry:
+	evict_walk.walk.arg.sleeping_lock = true;
+	do {
+		evict_walk.evicted = 0;
+		pass = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man,
+					      target_bytes - lret);
+		if (pass < 0) {
+			lret = pass;
+			goto out;
+		}
+		lret += pass;
+	} while (lret < target_bytes && evict_walk.evicted);
+
+	/* One more attempt if we hit the low limit during sleeping-lock pass. */
+	if (lret < target_bytes && evict_walk.hit_low && !evict_walk.try_low) {
+		evict_walk.try_low = true;
+		goto retry;
+	}
+
+out:
+	return lret;
+}
+EXPORT_SYMBOL(ttm_bo_evict_cgroup);
+
 /**
  * ttm_bo_pin - Pin the buffer object.
  * @bo: The buffer object to pin
drivers/gpu/drm/ttm/ttm_bo_util.c +2 -1
index 3e3c201a0222..bd0b23ac2cc4 100644
@@ -999,7 +999,8 @@ __ttm_bo_lru_cursor_next(struct ttm_bo_lru_cursor *curs)
 		bo = res->bo;
 		if (ttm_lru_walk_trylock(curs, bo))
 			bo_locked = true;
-		else if (!arg->ticket || arg->ctx->no_wait_gpu || arg->trylock_only)
+		else if ((!arg->ticket && !arg->sleeping_lock) || arg->ctx->no_wait_gpu ||
+			 arg->trylock_only)
 			continue;
 
 		if (!ttm_bo_get_unless_zero(bo)) {
drivers/gpu/drm/ttm/ttm_resource.c +50 -0

53 lines not on this page · raw message

include/drm/ttm/ttm_bo.h +10 -0
index 8310bc3d55f9..32791c4db2a9 100644
@@ -226,6 +226,11 @@ struct ttm_lru_walk_arg {
 	struct ww_acquire_ctx *ticket;
 	/** @trylock_only: Only use trylock for locking. */
 	bool trylock_only;
+	/**
+	 * @sleeping_lock: Use sleeping locks even with %NULL @ticket.
+	 * @trylock_only has precedence over this field.
+	 */
+	bool sleeping_lock;
 };
 
 /**
@@ -431,6 +436,11 @@ void ttm_bo_unpin(struct ttm_buffer_object *bo);
 int ttm_bo_evict_first(struct ttm_device *bdev,
 		       struct ttm_resource_manager *man,
 		       struct ttm_operation_ctx *ctx);
+s64 ttm_bo_evict_cgroup(struct ttm_device *bdev,
+			struct ttm_resource_manager *man,
+			struct dmem_cgroup_pool_state *limit_pool,
+			s64 target_bytes,
+			struct ttm_operation_ctx *ctx);
 int ttm_bo_access(struct ttm_buffer_object *bo, unsigned long offset,
 		  void *buf, int len, int write);
 vm_fault_t ttm_bo_vm_reserve(struct ttm_buffer_object *bo,
include/drm/ttm/ttm_resource.h +7 -0
index a5d386583fb6..32e485fdce9a 100644
@@ -39,6 +39,7 @@
 
 struct dentry;
 struct dmem_cgroup_device;
+struct dmem_cgroup_region;
 struct drm_printer;
 struct ttm_device;
 struct ttm_resource_manager;
@@ -477,6 +478,12 @@ void ttm_resource_manager_init(struct ttm_resource_manager *man,
 			       struct ttm_device *bdev,
 			       uint64_t size);
 
+void ttm_resource_manager_set_dmem_region(struct ttm_resource_manager *man,
+					  struct dmem_cgroup_region *region);
+
+int ttm_resource_manager_dmem_reclaim(struct dmem_cgroup_pool_state *pool,
+				      u64 target_bytes, void *priv);
+
 int ttm_resource_manager_evict_all(struct ttm_device *bdev,
 				   struct ttm_resource_manager *man);
 
Signature · 1 line
2.54.0
author maintainer
#7 lore raw

PATCH v6 5/6 drm/xe: Wire up dmem cgroup reclaim for VRAM manager

In reply to Thomas Hellström

Register the VRAM manager with the dmem cgroup reclaim infrastructure so that lowering dmem.max below current VRAM usage triggers TTM eviction rather than failing with -EBUSY.

v4:
- Rebased on drm-tip; dropped the XE_PL_STOLEN guard as stolen memory uses a separate TTM manager and never calls __xe_ttm_vram_mgr_init().

v5:
- Rebased on the introduction of struct dmem_cgroup_init.
- Register the fini drmm action before drmm_cgroup_register_region() so that devres LIFO teardown runs unregister_region() first (draining any in-flight reclaim callbacks via the rwsem) and xe_ttm_vram_mgr_fini() second, ensuring the manager is never accessed by a reclaim callback after teardown. (Sashiko-bot)
- Wrap the reclaim callback in xe_ttm_vram_mgr_dmem_reclaim() using drm_dev_enter()/drm_dev_exit() to prevent TTM reclaim from running after driver unbind.

Assisted-by GitHub_Copilot:claude-sonnet-4.6
---
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 54 +++++++++++++++++++++++-----
 1 file changed, 45 insertions(+), 9 deletions(-)
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c +45 -9
index 308fda4248eb..b2500344cd57 100644
@@ -276,6 +276,28 @@ static const struct ttm_resource_manager_func xe_ttm_vram_mgr_func = {
 	.debug	= xe_ttm_vram_mgr_debug
 };
 
+static const struct dmem_cgroup_ops xe_ttm_vram_mgr_dmem_ops;
+
+static int xe_ttm_vram_mgr_dmem_reclaim(struct dmem_cgroup_pool_state *pool,
+					 u64 target_bytes, void *priv)
+{
+	struct ttm_resource_manager *man = priv;
+	struct xe_device *xe = ttm_to_xe_device(man->bdev);
+	int ret, idx;
+
+	if (!drm_dev_enter(&xe->drm, &idx))
+		return -ENODEV;
+
+	ret = ttm_resource_manager_dmem_reclaim(pool, target_bytes, priv);
+
+	drm_dev_exit(idx);
+	return ret;
+}
+
+static const struct dmem_cgroup_ops xe_ttm_vram_mgr_dmem_ops = {
+	.reclaim = xe_ttm_vram_mgr_dmem_reclaim,
+};
+
 static void xe_ttm_vram_mgr_fini(struct drm_device *dev, void *arg)
 {
 	struct xe_device *xe = to_xe_device(dev);
@@ -301,17 +323,10 @@ int __xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_ttm_vram_mgr *mgr,
 			   u64 default_page_size)
 {
 	struct ttm_resource_manager *man = &mgr->manager;
+	struct dmem_cgroup_region *cg;
 	const char *name;
 	int err;
 
-	name = mem_type == XE_PL_VRAM0 ? "vram0" : "vram1";
-	man->cg = drmm_cgroup_register_region(&xe->drm, name,
-					      &(struct dmem_cgroup_init){
-						.size = size,
-					      });
-	if (IS_ERR(man->cg))
-		return PTR_ERR(man->cg);
-
 	man->func = &xe_ttm_vram_mgr_func;
 	mgr->mem_type = mem_type;
 	err = drmm_mutex_init(&xe->drm, &mgr->lock);
@@ -330,7 +345,28 @@ int __xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_ttm_vram_mgr *mgr,
 	ttm_set_driver_manager(&xe->ttm, mem_type, &mgr->manager);
 	ttm_resource_manager_set_used(&mgr->manager, true);
 
-	return drmm_add_action_or_reset(&xe->drm, xe_ttm_vram_mgr_fini, mgr);
+	/*
+	 * Register the fini action before the cgroup region so that devres
+	 * LIFO teardown runs unregister_region first (draining any in-flight
+	 * reclaim callbacks) and the manager fini second.
+	 */
+	err = drmm_add_action_or_reset(&xe->drm, xe_ttm_vram_mgr_fini, mgr);
+	if (err)
+		return err;
+
+	name = mem_type == XE_PL_VRAM0 ? "vram0" : "vram1";
+	cg = drmm_cgroup_register_region(&xe->drm, name,
+					 &(struct dmem_cgroup_init){
+						.size = size,
+						.ops = &xe_ttm_vram_mgr_dmem_ops,
+						.reclaim_priv = man,
+					 });
+	if (IS_ERR(cg))
+		return PTR_ERR(cg);
+
+	ttm_resource_manager_set_dmem_region(man, cg);
+
+	return 0;
 }
 
 /**
Signature · 1 line
2.54.0
author maintainer
#8 lore raw

PATCH v6 6/6 drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

In reply to Thomas Hellström

Register the VRAM manager with the dmem cgroup reclaim infrastructure so that lowering dmem.max below current VRAM usage triggers TTM eviction rather than failing with -EBUSY.

Guard place->flags in amdgpu_ttm_bo_eviction_valuable() against NULL, as the TTM reclaim path passes a NULL place in cgroup drain mode.

v3:
- Rebased on fix for uninitialized list and buddy allocator on the drmm_cgroup_register_region() error path.

v5:
- Rebased on the introduction of struct dmem_cgroup_init.
- Clear the reclaim callback in amdgpu_vram_mgr_fini() to prevent use-after-free if cgroup reclaim is triggered after driver unbind while userspace holds an open DRM file descriptor. (Sashiko-bot)
- Switch from drmm_cgroup_register_region() to the raw dmem_cgroup_register_region() and store the region in amdgpu_vram_mgr.cg_region. Call dmem_cgroup_unregister_region() in amdgpu_vram_mgr_fini() after ttm_resource_manager_evict_all() to drain in-flight reclaim callbacks, and clear man->cg afterwards. This is required because amdgpu's vram manager fini is called explicitly during driver unbind, which may precede the DRM device release and thus precede any drmm-based cleanup. (Sashiko-bot)

v6:
- Fix mgr->cg_region never being assigned, so dmem_cgroup_unregister_region() in fini silently no-ops on NULL and leaks the region. (Sashiko-bot)
- Reorder fini to call set_used(false) and evict_all() before dmem_cgroup_unregister_region(), so ttm_resource_free() can uncharge via man->cg during eviction; clear man->cg after unregister. (Sashiko-bot)

Assisted-by GitHub_Copilot:claude-sonnet-4.6
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 31 ++++++++++++++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h |  2 ++
 3 files changed, 28 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
index 2740de94e93c..8cbcd33f51a5 100644
@@ -1488,7 +1488,7 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
 	dma_resv_for_each_fence(&resv_cursor, bo->base.resv,
 				DMA_RESV_USAGE_BOOKKEEP, f) {
 		if (amdkfd_fence_check_mm(f, current->mm) &&
-		    !(place->flags & TTM_PL_FLAG_CONTIGUOUS))
+		    !(place && (place->flags & TTM_PL_FLAG_CONTIGUOUS)))
 			return false;
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +25 -6
index 08f05c3aed1d..2250bab0970d 100644
@@ -906,6 +906,10 @@ static const struct ttm_resource_manager_func amdgpu_vram_mgr_func = {
 	.debug	= amdgpu_vram_mgr_debug
 };
 
+static const struct dmem_cgroup_ops amdgpu_vram_mgr_dmem_ops = {
+	.reclaim = ttm_resource_manager_dmem_reclaim,
+};
+
 /**
  * amdgpu_vram_mgr_init - init VRAM manager and DRM MM
  *
@@ -917,6 +921,7 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 {
 	struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr;
 	struct ttm_resource_manager *man = &mgr->manager;
+	struct dmem_cgroup_region *cg;
 	int err;
 
 	ttm_resource_manager_init(man, &adev->mman.bdev,
@@ -933,12 +938,16 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 	if (err)
 		return err;
 
-	man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram",
-					      &(struct dmem_cgroup_init){
-						.size = adev->gmc.real_vram_size,
-					      });
-	if (IS_ERR(man->cg))
-		return PTR_ERR(man->cg);
+	cg = dmem_cgroup_register_region(&(struct dmem_cgroup_init){
+					     .size = adev->gmc.real_vram_size,
+					     .ops = &amdgpu_vram_mgr_dmem_ops,
+					     .reclaim_priv = man,
+					 }, "vram");
+	if (IS_ERR(cg))
+		return PTR_ERR(cg);
+
+	mgr->cg_region = cg;
+	ttm_resource_manager_set_dmem_region(man, cg);
 
 	ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_VRAM, &mgr->manager);
 	ttm_resource_manager_set_used(man, true);
@@ -966,6 +975,16 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device *adev)
 	if (ret)
 		return;
 
+	/*
+	 * Drain any in-flight dmem cgroup reclaim callbacks and remove the
+	 * region from the global list.  This must happen after evict_all()
+	 * so that ttm_resource_free() can still uncharge via man->cg while
+	 * BOs are being evicted.
+	 */
+	dmem_cgroup_unregister_region(mgr->cg_region);
+	mgr->cg_region = NULL;
+	man->cg = NULL;
+
 	mutex_lock(&mgr->lock);
 	list_for_each_entry_safe(rsv, temp, &mgr->reservations_pending, blocks)
 		kfree(rsv);
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h +2 -0
index 429a21a2e9b2..07103cddb335 100644
@@ -36,6 +36,8 @@ struct amdgpu_vram_mgr {
 	atomic64_t vis_usage;
 	u64 default_page_size;
 	struct list_head allocated_vres_list;
+	/** @cg_region: dmem cgroup region for VRAM; unregistered in fini. */
+	struct dmem_cgroup_region *cg_region;
 };
 
 struct amdgpu_vres_task {
Signature · 1 line
2.54.0
#2 lore raw

Re: [PATCH v6 1/6] drm/amdgpu: Fix init ordering in amdgpu_vram_mgr_init()

In reply to Thomas Hellström
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Incomplete Fix / NULL Pointer Dereference or Use-After-Free on Error Path --

commit 2ee86f69ec7f41352206d6f701597e5f22e81241
Author: Thomas Hellström <[email protected]>

drm/amdgpu: Fix init ordering in amdgpu_vram_mgr_init()

drmm_cgroup_register_region() is called before INIT_LIST_HEAD() and gpu_buddy_init() in amdgpu_vram_mgr_init(). If it fails, the function returns early and bypasses those initializations.

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
index 2a241a5b12c42..ac3f71d77140a 100644

[ ... ]

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c int amdgpu_vram_mgr_init(struct amdgpu_device *adev) · line 933

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
@@ -935,6 +932,10 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 	if (err)
 		return err;

[Severity: High]
This isn't a bug introduced by this patch, but does this still leave a use-after-free or NULL pointer dereference on the error path if gpu_buddy_init() fails?

If gpu_buddy_init() fails, it cleans up its partial allocations but leaves mgr->mm.free_trees as a dangling pointer or NULL.

Because adev->mman.initialized is set to true before amdgpu_vram_mgr_init() is called, the error teardown path unconditionally calls amdgpu_ttm_fini(), which calls amdgpu_vram_mgr_fini():

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:amdgpu_vram_mgr_fini() {
    ...
	if (!adev->gmc.is_app_apu)
		gpu_buddy_fini(&mgr->mm);
    ...
}

This calls gpu_buddy_fini() which accesses mm->free_trees:

drivers/gpu/buddy.c:gpu_buddy_fini() {
    ...
	for_each_free_tree(i)
		kfree(mm->free_trees[i]);
    ...
}

Could this dereference the uninitialized or dangling mm->free_trees pointer and cause a kernel panic during module load error handling?

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4 -0
+	man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram", adev->gmc.real_vram_size);
+	if (IS_ERR(man->cg))
+		return PTR_ERR(man->cg);
+
 	ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_VRAM, &mgr->manager);
 	ttm_resource_manager_set_used(man, true);
 	return 0;
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#5 lore raw

Re: [PATCH v6 3/6] cgroup/dmem: Add reclaim callback for lowering max below current usage

In reply to Thomas Hellström
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] dmemcg_parse_limit does not clamp parsed limits to PAGE_COUNTER_MAX, leading to silent truncation and broken limits on 32-bit systems. --

commit 71a34045a2531fca277baab558f3a81add06614b
Author: Thomas Hellström <[email protected]>

cgroup/dmem: Add reclaim callback for lowering max below current usage

This patch adds an optional reclaim callback to dmem_cgroup_region to allow memory eviction when dmem.max is lowered below current usage. It handles reclaim in a bounded loop and respects O_NONBLOCK to avoid charging reclaim costs to writers.

Quoted 4 lines
kernel/cgroup/dmem.c +0 -0
index 373ad04d289d5..f7166b8255c7b 100644

[ ... ]

Quoted 1 line
kernel/cgroup/dmem.c +0 -0
@@ -145,21 +170,71 @@ static void free_cg_pool(struct dmem_cgroup_pool_state *pool)

[ ... ]

kernel/cgroup/dmem.c static void free_cg_pool(struct dmem_cgroup_pool_state *pool) · line 188

Quoted 7 lines

static void

kernel/cgroup/dmem.c +3 -2
-set_resource_max(struct dmem_cgroup_pool_state *pool, u64 val)
+set_resource_max(struct dmem_cgroup_pool_state *pool, u64 val, bool nonblock)
 {
-	page_counter_set_max(&pool->cnt, val);
+	struct dmem_cgroup_region *region = pool->region;
+	unsigned long limit = (unsigned long)val;

[Severity: High]
This isn't a bug introduced by this patch, but does casting the u64 value to unsigned long here cause issues on 32-bit systems?

It looks like dmemcg_parse_limit() parses user input into a u64 via memparse() without clamping it to PAGE_COUNTER_MAX. The dmem controller uses page_counter to track raw bytes rather than pages.

On 32-bit systems, page_counter tracks limits using unsigned long and usage using atomic_long_t (signed), meaning it can safely track at most LONG_MAX (2GB-1) bytes. If a user writes a limit larger than 4GB (e.g., 5GB), the cast to unsigned long will silently truncate it to 1GB.

Additionally, if a value between 2GB and 4GB is written, does actual usage exceeding 2GB cause atomic_long_sub_return() in page_counter_cancel() to result in a negative value, triggering a WARN_ONCE and permanently resetting the cgroup's usage to 0?

Would it be safer to clamp the parsed value to PAGE_COUNTER_MAX in dmemcg_parse_limit() before it reaches this point?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#9 lore raw

Re: [PATCH v6 6/6] drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

In reply to Thomas Hellström
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:

New issues:
- [Critical] Early return in amdgpu_vram_mgr_fini() on eviction failure skips dmem_cgroup_unregister_region(), leading to a use-after-free.
- [Medium] The cgroup region name is hardcoded to 'vram', breaking the device-specific namespace prefix and causing collisions on multi-GPU setups.

Pre-existing issues:
- [High] Unconditional cleanup of the buddy allocator causes a UAF/NULL dereference if gpu_buddy_init() fails during initialization. --

commit 869c423a8a9487b5c3e7321e4f9a0e14f69318b4
Author: Thomas Hellström <[email protected]>

drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

Register the VRAM manager with the dmem cgroup reclaim infrastructure so that lowering dmem.max below current VRAM usage triggers TTM eviction rather than failing with -EBUSY.

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
index 08f05c3aed1d5..2250bab0970dd 100644

[ ... ]

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -1
@@ -933,12 +938,16 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 	if (err)
 		return err;
 
-	man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram",

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c int amdgpu_vram_mgr_init(struct amdgpu_device *adev) · line 945

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +5 -5
-					      &(struct dmem_cgroup_init){
-						.size = adev->gmc.real_vram_size,
-					      });
-	if (IS_ERR(man->cg))
-		return PTR_ERR(man->cg);
+	cg = dmem_cgroup_register_region(&(struct dmem_cgroup_init){
+					     .size = adev->gmc.real_vram_size,
+					     .ops = &amdgpu_vram_mgr_dmem_ops,
+					     .reclaim_priv = man,
+					 }, "vram");

[Severity: Medium]
Does this hardcoded "vram" string break the device-specific namespace prefix?

Before this patch, drmm_cgroup_register_region() automatically prefixed the cgroup region name with the DRM device's unique identifier. On systems with multiple AMD GPUs, won't using just "vram" here cause all GPUs to register a region with the exact same name, breaking userspace tools' ability to distinguish between the GPUs' memory cgroups?

[ ... ]

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c void amdgpu_vram_mgr_fini(struct amdgpu_device *adev) · line 985

Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +7 -0
@@ -966,6 +975,16 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device *adev)
 	ret = ttm_resource_manager_evict_all(&adev->mman.bdev, man);
 	if (ret)
 		return;
 
+	/*
+	 * Drain any in-flight dmem cgroup reclaim callbacks and remove the
+	 * region from the global list.  This must happen after evict_all()
+	 * so that ttm_resource_free() can still uncharge via man->cg while
+	 * BOs are being evicted.
+	 */
+	dmem_cgroup_unregister_region(mgr->cg_region);

[Severity: Critical]
If ttm_resource_manager_evict_all() fails (for example, due to pinned BOs) and returns an error, the early return above skips the newly added dmem_cgroup_unregister_region() call.

Could this permanently leak the region and leave a dangling pointer as its reclaim callback argument? When the DRM device is eventually released and the amdgpu_device struct is freed, any subsequent memory pressure triggering dmem cgroup reclaim would dereference the freed man pointer, causing a kernel use-after-free.

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +3 -0
+	mgr->cg_region = NULL;
+	man->cg = NULL;
+
 	mutex_lock(&mgr->lock);
 	list_for_each_entry_safe(rsv, temp, &mgr->reservations_pending, blocks)

kfree(rsv);

[ ... ]

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
 	list_for_each_entry_safe(rsv, temp, &mgr->reserved_pages, blocks) {
 		gpu_buddy_free_list(&mgr->mm, &rsv->allocated, 0);
 		kfree(rsv);
 	}
 	if (!adev->gmc.is_app_apu)
 		gpu_buddy_fini(&mgr->mm);

[Severity: High]
This isn't a bug introduced by this patch, but does this unconditional cleanup cause a use-after-free or NULL pointer dereference if gpu_buddy_init() failed during initialization?

If gpu_buddy_init() fails, it returns an error and frees its internal arrays without setting them to NULL. The driver error path then calls amdgpu_device_fini_sw(), which triggers amdgpu_vram_mgr_fini().

Since mm->n_roots was populated before the allocation failure, won't gpu_buddy_fini() iterate over mm->n_roots and dereference the uninitialized or NULL mm->roots pointer?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
author maintainer
#10 lore raw

Re: [PATCH v6 6/6] drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

In reply to Thomas Hellström
Quoted 69 lines · Thomas Hellström

Register the VRAM manager with the dmem cgroup reclaim infrastructure so that lowering dmem.max below current VRAM usage triggers TTM eviction rather than failing with -EBUSY.

Guard place->flags in amdgpu_ttm_bo_eviction_valuable() against NULL, as the TTM reclaim path passes a NULL place in cgroup drain mode.

v3:
- Rebased on fix for uninitialized list and buddy allocator on the drmm_cgroup_register_region() error path.

v5:
- Rebased on the introduction of struct dmem_cgroup_init.
- Clear the reclaim callback in amdgpu_vram_mgr_fini() to prevent use-after-free if cgroup reclaim is triggered after driver unbind while userspace holds an open DRM file descriptor. (Sashiko-bot)
- Switch from drmm_cgroup_register_region() to the raw dmem_cgroup_register_region() and store the region in amdgpu_vram_mgr.cg_region. Call dmem_cgroup_unregister_region() in amdgpu_vram_mgr_fini() after ttm_resource_manager_evict_all() to drain in-flight reclaim callbacks, and clear man->cg afterwards. This is required because amdgpu's vram manager fini is called explicitly during driver unbind, which may precede the DRM device release and thus precede any drmm-based cleanup. (Sashiko-bot)

v6:
- Fix mgr->cg_region never being assigned, so dmem_cgroup_unregister_region() in fini silently no-ops on NULL and leaks the region. (Sashiko-bot)
- Reorder fini to call set_used(false) and evict_all() before dmem_cgroup_unregister_region(), so ttm_resource_free() can uncharge via man->cg during eviction; clear man->cg after unregister. (Sashiko-bot)

Assisted-by GitHub_Copilot:claude-sonnet-4.6

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c      |  2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 31 ++++++++++++++++-- --
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h |  2 ++

 3 files changed, 28 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -0
index 2740de94e93c..8cbcd33f51a5 100644
@@ -1488,7 +1488,7 @@ static bool
 amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
  	dma_resv_for_each_fence(&resv_cursor, bo->base.resv,
  				DMA_RESV_USAGE_BOOKKEEP, f) {

  if (amdkfd_fence_check_mm(f, current->mm) &&

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
-		    !(place->flags & TTM_PL_FLAG_CONTIGUOUS))
+		    !(place && (place->flags &

TTM_PL_FLAG_CONTIGUOUS)))
  return false;
  }

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
index 08f05c3aed1d..2250bab0970d 100644
@@ -906,6 +906,10 @@ static const struct ttm_resource_manager_func
 amdgpu_vram_mgr_func = {

  .debug = amdgpu_vram_mgr_debug
 };

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static const struct ttm_resource_manager_func amdgpu_vram_mgr_func = { · line 911

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +3 -0
+static const struct dmem_cgroup_ops amdgpu_vram_mgr_dmem_ops = {
+	.reclaim = ttm_resource_manager_dmem_reclaim,
+};

Probably might want to block reclaim after device unbind, just like xe. I'll look at that for v7.

Quoted 80 lines

+
 /**
  * amdgpu_vram_mgr_init - init VRAM manager and DRM MM *

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
@@ -917,6 +921,7 @@ int amdgpu_vram_mgr_init(struct amdgpu_device
 *adev)
  {
  	struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr;
  	struct ttm_resource_manager *man = &mgr->manager;
+	struct dmem_cgroup_region *cg;
  	int err;


  ttm_resource_manager_init(man, &adev->mman.bdev,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
@@ -933,12 +938,16 @@ int amdgpu_vram_mgr_init(struct amdgpu_device
 *adev)
  	if (err)
  		return err;

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -1
-	man->cg = drmm_cgroup_register_region(adev_to_drm(adev),

"vram",

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -1
-					      &(struct

dmem_cgroup_init){

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -1
-						.size = adev-
Quoted 1 line

gmc.real_vram_size,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +2 -3
-					      });
-	if (IS_ERR(man->cg))
-		return PTR_ERR(man->cg);
+	cg = dmem_cgroup_register_region(&(struct dmem_cgroup_init){
+					     .size = adev-
Quoted 1 line

gmc.real_vram_size,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
+					     .ops =

&amdgpu_vram_mgr_dmem_ops,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +7 -0
+					     .reclaim_priv = man,
+					 }, "vram");
+	if (IS_ERR(cg))
+		return PTR_ERR(cg);
+
+	mgr->cg_region = cg;
+	ttm_resource_manager_set_dmem_region(man, cg);


  ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_VRAM, &mgr-

Quoted 1 line

manager);

  ttm_resource_manager_set_used(man, true);

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
@@ -966,6 +975,16 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device
 *adev)
  	if (ret)
  		return;

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +2 -0
+	/*
+	 * Drain any in-flight dmem cgroup reclaim callbacks and

remove the

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
+	 * region from the global list.  This must happen after

evict_all()

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
+	 * so that ttm_resource_free() can still uncharge via man-
Quoted 1 line

cg while

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +6 -0
+	 * BOs are being evicted.
+	 */
+	dmem_cgroup_unregister_region(mgr->cg_region);
+	mgr->cg_region = NULL;
+	man->cg = NULL;
+

  mutex_lock(&mgr->lock);
  list_for_each_entry_safe(rsv, temp, &mgr-

Quoted 1 line

reservations_pending, blocks)

  kfree(rsv);

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h +1 -0
index 429a21a2e9b2..07103cddb335 100644
@@ -36,6 +36,8 @@ struct amdgpu_vram_mgr {
  	atomic64_t vis_usage;
  	u64 default_page_size;
  	struct list_head allocated_vres_list;
+	/** @cg_region: dmem cgroup region for VRAM; unregistered in

fini. */

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h +1 -0
+	struct dmem_cgroup_region *cg_region;

 };

 struct amdgpu_vres_task {

#13 lore raw

✗ CI.checkpatch: warning for Add reclaim to the dmem cgroup controller (rev6)

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

== Series Details ==

Series: Add reclaim to the dmem cgroup controller (rev6)
URL : https://patchwork.freedesktop.org/series/163970/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 061140b9bc586ae7f40abc1249c97e1cc72d1b9d
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 85e6ff634a4908a209daf61915384e395e09c1b2

Author: Thomas Hellström <[email protected]>
Date:   Thu Jun 11 19:33:01 2026 +0200

drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

Register the VRAM manager with the dmem cgroup reclaim infrastructure so that lowering dmem.max below current VRAM usage triggers TTM eviction rather than failing with -EBUSY.

Guard place->flags in amdgpu_ttm_bo_eviction_valuable() against NULL, as the TTM reclaim path passes a NULL place in cgroup drain mode.

v3:
- Rebased on fix for uninitialized list and buddy allocator on the drmm_cgroup_register_region() error path.

v5:
- Rebased on the introduction of struct dmem_cgroup_init.
- Clear the reclaim callback in amdgpu_vram_mgr_fini() to prevent use-after-free if cgroup reclaim is triggered after driver unbind while userspace holds an open DRM file descriptor. (Sashiko-bot)
- Switch from drmm_cgroup_register_region() to the raw dmem_cgroup_register_region() and store the region in amdgpu_vram_mgr.cg_region. Call dmem_cgroup_unregister_region() in amdgpu_vram_mgr_fini() after ttm_resource_manager_evict_all() to drain in-flight reclaim callbacks, and clear man->cg afterwards. This is required because amdgpu's vram manager fini is called explicitly during driver unbind, which may precede the DRM device release and thus precede any drmm-based cleanup. (Sashiko-bot)

v6:
- Fix mgr->cg_region never being assigned, so dmem_cgroup_unregister_region() in fini silently no-ops on NULL and leaks the region. (Sashiko-bot)
- Reorder fini to call set_used(false) and evict_all() before dmem_cgroup_unregister_region(), so ttm_resource_free() can uncharge via man->cg during eviction; clear man->cg after unregister. (Sashiko-bot)

Assisted-by GitHub_Copilot:claude-sonnet-4.6

+ /mt/dim checkpatch 311cbada9202146752938f54503d33980ee4f3f6 drm-intel 21668a6cc1ce drm/amdgpu: Fix init ordering in amdgpu_vram_mgr_init() 51ea374b60d9 cgroup/dmem: Introduce struct dmem_cgroup_init for region initialization 2086316dfca8 cgroup/dmem: Add reclaim callback for lowering max below current usage 40a81e3c18ae drm/ttm: Hook up a cgroup-aware reclaim callback for the dmem controller -:147: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided #147: FILE: drivers/gpu/drm/ttm/ttm_bo.c:679:
+ evict_walk.try_low = evict_walk.hit_low = false;

total: 0 errors, 0 warnings, 1 checks, 224 lines checked be08498f44d1 drm/xe: Wire up dmem cgroup reclaim for VRAM manager -:42: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #42: FILE: drivers/gpu/drm/xe/xe_ttm_vram_mgr.c:282:
+static int xe_ttm_vram_mgr_dmem_reclaim(struct dmem_cgroup_pool_state *pool,
+ u64 target_bytes, void *priv)

total: 0 errors, 0 warnings, 1 checks, 75 lines checked 85e6ff634a49 drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

#14 lore raw

✓ CI.KUnit: success for Add reclaim to the dmem cgroup controller (rev6)

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

== Series Details ==

Series: Add reclaim to the dmem cgroup controller (rev6)
URL : https://patchwork.freedesktop.org/series/163970/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [20:00:47] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[20:00:52] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25
[20:01:39] Starting KUnit Kernel (1/1)...
[20:01:39] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[20:01:40] ================== guc_buf (11 subtests) ===================
[20:01:40] [PASSED] test_smallest
[20:01:40] [PASSED] test_largest
[20:01:40] [PASSED] test_granular
[20:01:40] [PASSED] test_unique
[20:01:40] [PASSED] test_overlap
[20:01:40] [PASSED] test_reusable
[20:01:40] [PASSED] test_too_big
[20:01:40] [PASSED] test_flush
[20:01:40] [PASSED] test_lookup
[20:01:40] [PASSED] test_data
[20:01:40] [PASSED] test_class
[20:01:40] ===================== [PASSED] guc_buf =====================
[20:01:40] =================== guc_dbm (7 subtests) ===================
[20:01:40] [PASSED] test_empty
[20:01:40] [PASSED] test_default
[20:01:40] ======================== test_size  ========================
[20:01:40] [PASSED] 4
[20:01:40] [PASSED] 8
[20:01:40] [PASSED] 32
[20:01:40] [PASSED] 256
[20:01:40] ==================== [PASSED] test_size ====================
[20:01:40] ======================= test_reuse  ========================
[20:01:40] [PASSED] 4
[20:01:40] [PASSED] 8
[20:01:40] [PASSED] 32
[20:01:40] [PASSED] 256
[20:01:40] =================== [PASSED] test_reuse ====================
[20:01:40] =================== test_range_overlap  ====================
[20:01:40] [PASSED] 4
[20:01:40] [PASSED] 8
[20:01:40] [PASSED] 32
[20:01:40] [PASSED] 256
[20:01:40] =============== [PASSED] test_range_overlap ================
[20:01:40] =================== test_range_compact  ====================
[20:01:40] [PASSED] 4
[20:01:40] [PASSED] 8
[20:01:40] [PASSED] 32
[20:01:40] [PASSED] 256
[20:01:40] =============== [PASSED] test_range_compact ================
[20:01:40] ==================== test_range_spare  =====================
[20:01:40] [PASSED] 4
[20:01:40] [PASSED] 8
[20:01:40] [PASSED] 32
[20:01:40] [PASSED] 256
[20:01:40] ================ [PASSED] test_range_spare =================
[20:01:40] ===================== [PASSED] guc_dbm =====================
[20:01:40] =================== guc_idm (6 subtests) ===================
[20:01:40] [PASSED] bad_init
[20:01:40] [PASSED] no_init
[20:01:40] [PASSED] init_fini
[20:01:40] [PASSED] check_used
[20:01:40] [PASSED] check_quota
[20:01:40] [PASSED] check_all
[20:01:40] ===================== [PASSED] guc_idm =====================
[20:01:40] ================== no_relay (3 subtests) ===================
[20:01:40] [PASSED] xe_drops_guc2pf_if_not_ready
[20:01:40] [PASSED] xe_drops_guc2vf_if_not_ready
[20:01:40] [PASSED] xe_rejects_send_if_not_ready
[20:01:40] ==================== [PASSED] no_relay =====================
[20:01:40] ================== pf_relay (14 subtests) ==================
[20:01:40] [PASSED] pf_rejects_guc2pf_too_short
[20:01:40] [PASSED] pf_rejects_guc2pf_too_long
[20:01:40] [PASSED] pf_rejects_guc2pf_no_payload
[20:01:40] [PASSED] pf_fails_no_payload
[20:01:40] [PASSED] pf_fails_bad_origin
[20:01:40] [PASSED] pf_fails_bad_type
[20:01:40] [PASSED] pf_txn_reports_error
[20:01:40] [PASSED] pf_txn_sends_pf2guc
[20:01:40] [PASSED] pf_sends_pf2guc
[20:01:40] [SKIPPED] pf_loopback_nop
[20:01:40] [SKIPPED] pf_loopback_echo
[20:01:40] [SKIPPED] pf_loopback_fail
[20:01:40] [SKIPPED] pf_loopback_busy
[20:01:40] [SKIPPED] pf_loopback_retry
[20:01:40] ==================== [PASSED] pf_relay =====================
[20:01:40] ================== vf_relay (3 subtests) ===================
[20:01:40] [PASSED] vf_rejects_guc2vf_too_short
[20:01:40] [PASSED] vf_rejects_guc2vf_too_long
[20:01:40] [PASSED] vf_rejects_guc2vf_no_payload
[20:01:40] ==================== [PASSED] vf_relay =====================
[20:01:40] ================ pf_gt_config (9 subtests) =================
[20:01:40] [PASSED] fair_contexts_1vf
[20:01:40] [PASSED] fair_doorbells_1vf
[20:01:40] [PASSED] fair_ggtt_1vf
[20:01:40] ====================== fair_vram_1vf  ======================
[20:01:40] [PASSED] 3.50 GiB
[20:01:40] [PASSED] 11.5 GiB
[20:01:40] [PASSED] 15.5 GiB
[20:01:40] [PASSED] 31.5 GiB
[20:01:40] [PASSED] 63.5 GiB
[20:01:40] [PASSED] 1.91 GiB
[20:01:40] ================== [PASSED] fair_vram_1vf ==================
[20:01:40] ================ fair_vram_1vf_admin_only  =================
[20:01:40] [PASSED] 3.50 GiB
[20:01:40] [PASSED] 11.5 GiB
[20:01:40] [PASSED] 15.5 GiB
[20:01:40] [PASSED] 31.5 GiB
[20:01:40] [PASSED] 63.5 GiB
[20:01:40] [PASSED] 1.91 GiB
[20:01:40] ============ [PASSED] fair_vram_1vf_admin_only =============
[20:01:40] ====================== fair_contexts  ======================
[20:01:40] [PASSED] 1 VF
[20:01:40] [PASSED] 2 VFs
[20:01:40] [PASSED] 3 VFs
[20:01:40] [PASSED] 4 VFs
[20:01:40] [PASSED] 5 VFs
[20:01:40] [PASSED] 6 VFs
[20:01:40] [PASSED] 7 VFs
[20:01:40] [PASSED] 8 VFs
[20:01:40] [PASSED] 9 VFs
[20:01:40] [PASSED] 10 VFs
[20:01:40] [PASSED] 11 VFs
[20:01:40] [PASSED] 12 VFs
[20:01:40] [PASSED] 13 VFs
[20:01:40] [PASSED] 14 VFs
[20:01:40] [PASSED] 15 VFs
[20:01:40] [PASSED] 16 VFs
[20:01:40] [PASSED] 17 VFs
[20:01:40] [PASSED] 18 VFs
[20:01:40] [PASSED] 19 VFs
[20:01:40] [PASSED] 20 VFs
[20:01:40] [PASSED] 21 VFs
[20:01:40] [PASSED] 22 VFs
[20:01:40] [PASSED] 23 VFs
[20:01:40] [PASSED] 24 VFs
[20:01:40] [PASSED] 25 VFs
[20:01:40] [PASSED] 26 VFs
[20:01:40] [PASSED] 27 VFs
[20:01:40] [PASSED] 28 VFs
[20:01:40] [PASSED] 29 VFs
[20:01:40] [PASSED] 30 VFs
[20:01:40] [PASSED] 31 VFs
[20:01:40] [PASSED] 32 VFs
[20:01:40] [PASSED] 33 VFs
[20:01:40] [PASSED] 34 VFs
[20:01:40] [PASSED] 35 VFs
[20:01:40] [PASSED] 36 VFs
[20:01:40] [PASSED] 37 VFs
[20:01:40] [PASSED] 38 VFs
[20:01:40] [PASSED] 39 VFs
[20:01:40] [PASSED] 40 VFs
[20:01:40] [PASSED] 41 VFs
[20:01:40] [PASSED] 42 VFs
[20:01:40] [PASSED] 43 VFs
[20:01:40] [PASSED] 44 VFs
[20:01:40] [PASSED] 45 VFs
[20:01:40] [PASSED] 46 VFs
[20:01:40] [PASSED] 47 VFs
[20:01:40] [PASSED] 48 VFs
[20:01:40] [PASSED] 49 VFs
[20:01:40] [PASSED] 50 VFs
[20:01:40] [PASSED] 51 VFs
[20:01:40] [PASSED] 52 VFs
[20:01:40] [PASSED] 53 VFs
[20:01:40] [PASSED] 54 VFs
[20:01:40] [PASSED] 55 VFs
[20:01:40] [PASSED] 56 VFs
[20:01:40] [PASSED] 57 VFs
[20:01:40] [PASSED] 58 VFs
[20:01:40] [PASSED] 59 VFs
[20:01:40] [PASSED] 60 VFs
[20:01:40] [PASSED] 61 VFs
[20:01:40] [PASSED] 62 VFs
[20:01:40] [PASSED] 63 VFs
[20:01:40] ================== [PASSED] fair_contexts ==================
[20:01:40] ===================== fair_doorbells  ======================
[20:01:40] [PASSED] 1 VF
[20:01:40] [PASSED] 2 VFs
[20:01:40] [PASSED] 3 VFs
[20:01:40] [PASSED] 4 VFs
[20:01:40] [PASSED] 5 VFs
[20:01:40] [PASSED] 6 VFs
[20:01:40] [PASSED] 7 VFs
[20:01:40] [PASSED] 8 VFs
[20:01:40] [PASSED] 9 VFs
[20:01:40] [PASSED] 10 VFs
[20:01:40] [PASSED] 11 VFs
[20:01:40] [PASSED] 12 VFs
[20:01:40] [PASSED] 13 VFs
[20:01:40] [PASSED] 14 VFs
[20:01:40] [PASSED] 15 VFs
[20:01:40] [PASSED] 16 VFs
[20:01:40] [PASSED] 17 VFs
[20:01:40] [PASSED] 18 VFs
[20:01:40] [PASSED] 19 VFs
[20:01:40] [PASSED] 20 VFs
[20:01:40] [PASSED] 21 VFs
[20:01:40] [PASSED] 22 VFs
[20:01:40] [PASSED] 23 VFs
[20:01:40] [PASSED] 24 VFs
[20:01:40] [PASSED] 25 VFs
[20:01:40] [PASSED] 26 VFs
[20:01:40] [PASSED] 27 VFs
[20:01:40] [PASSED] 28 VFs
[20:01:40] [PASSED] 29 VFs
[20:01:40] [PASSED] 30 VFs
[20:01:40] [PASSED] 31 VFs
[20:01:40] [PASSED] 32 VFs
[20:01:40] [PASSED] 33 VFs
[20:01:40] [PASSED] 34 VFs
[20:01:40] [PASSED] 35 VFs
[20:01:40] [PASSED] 36 VFs
[20:01:40] [PASSED] 37 VFs
[20:01:40] [PASSED] 38 VFs
[20:01:40] [PASSED] 39 VFs
[20:01:40] [PASSED] 40 VFs
[20:01:40] [PASSED] 41 VFs
[20:01:40] [PASSED] 42 VFs
[20:01:40] [PASSED] 43 VFs
[20:01:40] [PASSED] 44 VFs
[20:01:40] [PASSED] 45 VFs
[20:01:40] [PASSED] 46 VFs
[20:01:40] [PASSED] 47 VFs
[20:01:40] [PASSED] 48 VFs
[20:01:40] [PASSED] 49 VFs
[20:01:40] [PASSED] 50 VFs
[20:01:40] [PASSED] 51 VFs
[20:01:40] [PASSED] 52 VFs
[20:01:40] [PASSED] 53 VFs
[20:01:40] [PASSED] 54 VFs
[20:01:40] [PASSED] 55 VFs
[20:01:40] [PASSED] 56 VFs
[20:01:40] [PASSED] 57 VFs
[20:01:40] [PASSED] 58 VFs
[20:01:40] [PASSED] 59 VFs
[20:01:40] [PASSED] 60 VFs
[20:01:40] [PASSED] 61 VFs
[20:01:40] [PASSED] 62 VFs
[20:01:40] [PASSED] 63 VFs
[20:01:40] ================= [PASSED] fair_doorbells ==================
[20:01:40] ======================== fair_ggtt  ========================
[20:01:40] [PASSED] 1 VF
[20:01:40] [PASSED] 2 VFs
[20:01:40] [PASSED] 3 VFs
[20:01:40] [PASSED] 4 VFs
[20:01:40] [PASSED] 5 VFs
[20:01:40] [PASSED] 6 VFs
[20:01:40] [PASSED] 7 VFs
[20:01:40] [PASSED] 8 VFs
[20:01:40] [PASSED] 9 VFs
[20:01:40] [PASSED] 10 VFs
[20:01:40] [PASSED] 11 VFs
[20:01:40] [PASSED] 12 VFs
[20:01:40] [PASSED] 13 VFs
[20:01:40] [PASSED] 14 VFs
[20:01:40] [PASSED] 15 VFs
[20:01:40] [PASSED] 16 VFs
[20:01:40] [PASSED] 17 VFs
[20:01:40] [PASSED] 18 VFs
[20:01:40] [PASSED] 19 VFs
[20:01:40] [PASSED] 20 VFs
[20:01:40] [PASSED] 21 VFs
[20:01:40] [PASSED] 22 VFs
[20:01:40] [PASSED] 23 VFs
[20:01:40] [PASSED] 24 VFs
[20:01:40] [PASSED] 25 VFs
[20:01:40] [PASSED] 26 VFs
[20:01:40] [PASSED] 27 VFs
[20:01:40] [PASSED] 28 VFs
[20:01:40] [PASSED] 29 VFs
[20:01:40] [PASSED] 30 VFs
[20:01:40] [PASSED] 31 VFs
[20:01:40] [PASSED] 32 VFs
[20:01:40] [PASSED] 33 VFs
[20:01:40] [PASSED] 34 VFs
[20:01:40] [PASSED] 35 VFs
[20:01:40] [PASSED] 36 VFs
[20:01:40] [PASSED] 37 VFs
[20:01:40] [PASSED] 38 VFs
[20:01:40] [PASSED] 39 VFs
[20:01:40] [PASSED] 40 VFs
[20:01:40] [PASSED] 41 VFs
[20:01:40] [PASSED] 42 VFs
[20:01:40] [PASSED] 43 VFs
[20:01:40] [PASSED] 44 VFs
[20:01:40] [PASSED] 45 VFs
[20:01:40] [PASSED] 46 VFs
[20:01:40] [PASSED] 47 VFs
[20:01:40] [PASSED] 48 VFs
[20:01:40] [PASSED] 49 VFs
[20:01:40] [PASSED] 50 VFs
[20:01:40] [PASSED] 51 VFs
[20:01:40] [PASSED] 52 VFs
[20:01:40] [PASSED] 53 VFs
[20:01:40] [PASSED] 54 VFs
[20:01:40] [PASSED] 55 VFs
[20:01:40] [PASSED] 56 VFs
[20:01:40] [PASSED] 57 VFs
[20:01:40] [PASSED] 58 VFs
[20:01:40] [PASSED] 59 VFs
[20:01:40] [PASSED] 60 VFs
[20:01:40] [PASSED] 61 VFs
[20:01:40] [PASSED] 62 VFs
[20:01:40] [PASSED] 63 VFs
[20:01:40] ==================== [PASSED] fair_ggtt ====================
[20:01:40] ======================== fair_vram  ========================
[20:01:40] [PASSED] 1 VF
[20:01:40] [PASSED] 2 VFs
[20:01:40] [PASSED] 3 VFs
[20:01:40] [PASSED] 4 VFs
[20:01:40] [PASSED] 5 VFs
[20:01:40] [PASSED] 6 VFs
[20:01:40] [PASSED] 7 VFs
[20:01:40] [PASSED] 8 VFs
[20:01:40] [PASSED] 9 VFs
[20:01:40] [PASSED] 10 VFs
[20:01:40] [PASSED] 11 VFs
[20:01:40] [PASSED] 12 VFs
[20:01:40] [PASSED] 13 VFs
[20:01:40] [PASSED] 14 VFs
[20:01:40] [PASSED] 15 VFs
[20:01:40] [PASSED] 16 VFs
[20:01:40] [PASSED] 17 VFs
[20:01:40] [PASSED] 18 VFs
[20:01:40] [PASSED] 19 VFs
[20:01:40] [PASSED] 20 VFs
[20:01:40] [PASSED] 21 VFs
[20:01:40] [PASSED] 22 VFs
[20:01:40] [PASSED] 23 VFs
[20:01:40] [PASSED] 24 VFs
[20:01:40] [PASSED] 25 VFs
[20:01:40] [PASSED] 26 VFs
[20:01:40] [PASSED] 27 VFs
[20:01:40] [PASSED] 28 VFs
[20:01:40] [PASSED] 29 VFs
[20:01:40] [PASSED] 30 VFs
[20:01:40] [PASSED] 31 VFs
[20:01:40] [PASSED] 32 VFs
[20:01:40] [PASSED] 33 VFs
[20:01:40] [PASSED] 34 VFs
[20:01:40] [PASSED] 35 VFs
[20:01:40] [PASSED] 36 VFs
[20:01:40] [PASSED] 37 VFs
[20:01:40] [PASSED] 38 VFs
[20:01:40] [PASSED] 39 VFs
[20:01:40] [PASSED] 40 VFs
[20:01:40] [PASSED] 41 VFs
[20:01:40] [PASSED] 42 VFs
[20:01:40] [PASSED] 43 VFs
[20:01:40] [PASSED] 44 VFs
[20:01:40] [PASSED] 45 VFs
[20:01:40] [PASSED] 46 VFs
[20:01:40] [PASSED] 47 VFs
[20:01:40] [PASSED] 48 VFs
[20:01:40] [PASSED] 49 VFs
[20:01:40] [PASSED] 50 VFs
[20:01:40] [PASSED] 51 VFs
[20:01:40] [PASSED] 52 VFs
[20:01:40] [PASSED] 53 VFs
[20:01:40] [PASSED] 54 VFs
[20:01:40] [PASSED] 55 VFs
[20:01:40] [PASSED] 56 VFs
[20:01:40] [PASSED] 57 VFs
[20:01:40] [PASSED] 58 VFs
[20:01:40] [PASSED] 59 VFs
[20:01:40] [PASSED] 60 VFs
[20:01:40] [PASSED] 61 VFs
[20:01:40] [PASSED] 62 VFs
[20:01:40] [PASSED] 63 VFs
[20:01:40] ==================== [PASSED] fair_vram ====================
[20:01:40] ================== [PASSED] pf_gt_config ===================
[20:01:40] ===================== lmtt (1 subtest) =====================
[20:01:40] ======================== test_ops  =========================
[20:01:40] [PASSED] 2-level
[20:01:40] [PASSED] multi-level
[20:01:40] ==================== [PASSED] test_ops =====================
[20:01:40] ====================== [PASSED] lmtt =======================
[20:01:40] ================= pf_service (11 subtests) =================
[20:01:40] [PASSED] pf_negotiate_any
[20:01:40] [PASSED] pf_negotiate_base_match
[20:01:40] [PASSED] pf_negotiate_base_newer
[20:01:40] [PASSED] pf_negotiate_base_next
[20:01:40] [SKIPPED] pf_negotiate_base_older
[20:01:40] [PASSED] pf_negotiate_base_prev
[20:01:40] [PASSED] pf_negotiate_latest_match
[20:01:40] [PASSED] pf_negotiate_latest_newer
[20:01:40] [PASSED] pf_negotiate_latest_next
[20:01:40] [SKIPPED] pf_negotiate_latest_older
[20:01:40] [SKIPPED] pf_negotiate_latest_prev
[20:01:40] =================== [PASSED] pf_service ====================
[20:01:40] ================= xe_guc_g2g (2 subtests) ==================
[20:01:40] ============== xe_live_guc_g2g_kunit_default  ==============
[20:01:40] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[20:01:40] ============== xe_live_guc_g2g_kunit_allmem  ===============
[20:01:40] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[20:01:40] =================== [SKIPPED] xe_guc_g2g ===================
[20:01:40] =================== xe_mocs (2 subtests) ===================
[20:01:40] ================ xe_live_mocs_kernel_kunit  ================
[20:01:40] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[20:01:40] ================ xe_live_mocs_reset_kunit  =================
[20:01:40] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[20:01:40] ==================== [SKIPPED] xe_mocs =====================
[20:01:40] ================= xe_migrate (2 subtests) ==================
[20:01:40] ================= xe_migrate_sanity_kunit  =================
[20:01:40] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[20:01:40] ================== xe_validate_ccs_kunit  ==================
[20:01:40] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[20:01:40] =================== [SKIPPED] xe_migrate ===================
[20:01:40] ================== xe_dma_buf (1 subtest) ==================
[20:01:40] ==================== xe_dma_buf_kunit  =====================
[20:01:40] ================ [SKIPPED] xe_dma_buf_kunit ================
[20:01:40] =================== [SKIPPED] xe_dma_buf ===================
[20:01:40] ================= xe_bo_shrink (1 subtest) =================
[20:01:40] =================== xe_bo_shrink_kunit  ====================
[20:01:40] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[20:01:40] ================== [SKIPPED] xe_bo_shrink ==================
[20:01:40] ==================== xe_bo (2 subtests) ====================
[20:01:40] ================== xe_ccs_migrate_kunit  ===================
[20:01:40] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[20:01:40] ==================== xe_bo_evict_kunit  ====================
[20:01:40] =============== [SKIPPED] xe_bo_evict_kunit ================
[20:01:40] ===================== [SKIPPED] xe_bo ======================
[20:01:40] ==================== args (13 subtests) ====================
[20:01:40] [PASSED] count_args_test
[20:01:40] [PASSED] call_args_example
[20:01:40] [PASSED] call_args_test
[20:01:40] [PASSED] drop_first_arg_example
[20:01:40] [PASSED] drop_first_arg_test
[20:01:40] [PASSED] first_arg_example
[20:01:40] [PASSED] first_arg_test
[20:01:40] [PASSED] last_arg_example
[20:01:40] [PASSED] last_arg_test
[20:01:40] [PASSED] pick_arg_example
[20:01:40] [PASSED] if_args_example
[20:01:40] [PASSED] if_args_test
[20:01:40] [PASSED] sep_comma_example
[20:01:40] ====================== [PASSED] args =======================
[20:01:40] =================== xe_pci (3 subtests) ====================
[20:01:40] ==================== check_graphics_ip  ====================
[20:01:40] [PASSED] 12.00 Xe_LP
[20:01:40] [PASSED] 12.10 Xe_LP+
[20:01:40] [PASSED] 12.55 Xe_HPG
[20:01:40] [PASSED] 12.60 Xe_HPC
[20:01:40] [PASSED] 12.70 Xe_LPG
[20:01:40] [PASSED] 12.71 Xe_LPG
[20:01:40] [PASSED] 12.74 Xe_LPG+
[20:01:40] [PASSED] 20.01 Xe2_HPG
[20:01:40] [PASSED] 20.02 Xe2_HPG
[20:01:40] [PASSED] 20.04 Xe2_LPG
[20:01:40] [PASSED] 30.00 Xe3_LPG
[20:01:40] [PASSED] 30.01 Xe3_LPG
[20:01:40] [PASSED] 30.03 Xe3_LPG
[20:01:40] [PASSED] 30.04 Xe3_LPG
[20:01:40] [PASSED] 30.05 Xe3_LPG
[20:01:40] [PASSED] 35.10 Xe3p_LPG
[20:01:40] [PASSED] 35.11 Xe3p_XPC
[20:01:40] ================ [PASSED] check_graphics_ip ================
[20:01:40] ===================== check_media_ip  ======================
[20:01:40] [PASSED] 12.00 Xe_M
[20:01:40] [PASSED] 12.55 Xe_HPM
[20:01:40] [PASSED] 13.00 Xe_LPM+
[20:01:40] [PASSED] 13.01 Xe2_HPM
[20:01:40] [PASSED] 20.00 Xe2_LPM
[20:01:40] [PASSED] 30.00 Xe3_LPM
[20:01:40] [PASSED] 30.02 Xe3_LPM
[20:01:40] [PASSED] 35.00 Xe3p_LPM
[20:01:40] [PASSED] 35.03 Xe3p_HPM
[20:01:40] ================= [PASSED] check_media_ip ==================
[20:01:40] =================== check_platform_desc  ===================
[20:01:40] [PASSED] 0x9A60 (TIGERLAKE)
[20:01:40] [PASSED] 0x9A68 (TIGERLAKE)
[20:01:40] [PASSED] 0x9A70 (TIGERLAKE)
[20:01:40] [PASSED] 0x9A40 (TIGERLAKE)
[20:01:40] [PASSED] 0x9A49 (TIGERLAKE)
[20:01:40] [PASSED] 0x9A59 (TIGERLAKE)
[20:01:40] [PASSED] 0x9A78 (TIGERLAKE)
[20:01:40] [PASSED] 0x9AC0 (TIGERLAKE)
[20:01:40] [PASSED] 0x9AC9 (TIGERLAKE)
[20:01:40] [PASSED] 0x9AD9 (TIGERLAKE)
[20:01:40] [PASSED] 0x9AF8 (TIGERLAKE)
[20:01:40] [PASSED] 0x4C80 (ROCKETLAKE)
[20:01:40] [PASSED] 0x4C8A (ROCKETLAKE)
[20:01:40] [PASSED] 0x4C8B (ROCKETLAKE)
[20:01:40] [PASSED] 0x4C8C (ROCKETLAKE)
[20:01:40] [PASSED] 0x4C90 (ROCKETLAKE)
[20:01:40] [PASSED] 0x4C9A (ROCKETLAKE)
[20:01:40] [PASSED] 0x4680 (ALDERLAKE_S)
[20:01:40] [PASSED] 0x4682 (ALDERLAKE_S)
[20:01:40] [PASSED] 0x4688 (ALDERLAKE_S)
[20:01:40] [PASSED] 0x468A (ALDERLAKE_S)
[20:01:40] [PASSED] 0x468B (ALDERLAKE_S)
[20:01:40] [PASSED] 0x4690 (ALDERLAKE_S)
[20:01:40] [PASSED] 0x4692 (ALDERLAKE_S)
[20:01:40] [PASSED] 0x4693 (ALDERLAKE_S)
[20:01:40] [PASSED] 0x46A0 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46A1 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46A2 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46A3 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46A6 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46A8 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46AA (ALDERLAKE_P)
[20:01:40] [PASSED] 0x462A (ALDERLAKE_P)
[20:01:40] [PASSED] 0x4626 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x4628 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46B0 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46B1 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46B2 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46B3 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46C0 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46C1 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46C2 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46C3 (ALDERLAKE_P)
[20:01:40] [PASSED] 0x46D0 (ALDERLAKE_N)
[20:01:40] [PASSED] 0x46D1 (ALDERLAKE_N)
[20:01:40] [PASSED] 0x46D2 (ALDERLAKE_N)
[20:01:40] [PASSED] 0x46D3 (ALDERLAKE_N)
[20:01:40] [PASSED] 0x46D4 (ALDERLAKE_N)
[20:01:40] [PASSED] 0xA721 (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA7A1 (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA7A9 (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA7AC (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA7AD (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA720 (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA7A0 (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA7A8 (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA7AA (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA7AB (ALDERLAKE_P)
[20:01:40] [PASSED] 0xA780 (ALDERLAKE_S)
[20:01:40] [PASSED] 0xA781 (ALDERLAKE_S)
[20:01:40] [PASSED] 0xA782 (ALDERLAKE_S)
[20:01:40] [PASSED] 0xA783 (ALDERLAKE_S)
[20:01:40] [PASSED] 0xA788 (ALDERLAKE_S)
[20:01:40] [PASSED] 0xA789 (ALDERLAKE_S)
[20:01:40] [PASSED] 0xA78A (ALDERLAKE_S)
[20:01:40] [PASSED] 0xA78B (ALDERLAKE_S)
[20:01:40] [PASSED] 0x4905 (DG1)
[20:01:40] [PASSED] 0x4906 (DG1)
[20:01:40] [PASSED] 0x4907 (DG1)
[20:01:40] [PASSED] 0x4908 (DG1)
[20:01:40] [PASSED] 0x4909 (DG1)
[20:01:40] [PASSED] 0x56C0 (DG2)
[20:01:40] [PASSED] 0x56C2 (DG2)
[20:01:40] [PASSED] 0x56C1 (DG2)
[20:01:40] [PASSED] 0x7D51 (METEORLAKE)
[20:01:40] [PASSED] 0x7DD1 (METEORLAKE)
[20:01:40] [PASSED] 0x7D41 (METEORLAKE)
[20:01:40] [PASSED] 0x7D67 (METEORLAKE)
[20:01:40] [PASSED] 0xB640 (METEORLAKE)
[20:01:40] [PASSED] 0x56A0 (DG2)
[20:01:40] [PASSED] 0x56A1 (DG2)
[20:01:40] [PASSED] 0x56A2 (DG2)
[20:01:40] [PASSED] 0x56BE (DG2)
[20:01:40] [PASSED] 0x56BF (DG2)
[20:01:40] [PASSED] 0x5690 (DG2)
[20:01:40] [PASSED] 0x5691 (DG2)
[20:01:40] [PASSED] 0x5692 (DG2)
[20:01:40] [PASSED] 0x56A5 (DG2)
[20:01:40] [PASSED] 0x56A6 (DG2)
[20:01:40] [PASSED] 0x56B0 (DG2)
[20:01:40] [PASSED] 0x56B1 (DG2)
[20:01:40] [PASSED] 0x56BA (DG2)
[20:01:40] [PASSED] 0x56BB (DG2)
[20:01:40] [PASSED] 0x56BC (DG2)
[20:01:40] [PASSED] 0x56BD (DG2)
[20:01:40] [PASSED] 0x5693 (DG2)
[20:01:40] [PASSED] 0x5694 (DG2)
[20:01:40] [PASSED] 0x5695 (DG2)
[20:01:40] [PASSED] 0x56A3 (DG2)
[20:01:40] [PASSED] 0x56A4 (DG2)
[20:01:40] [PASSED] 0x56B2 (DG2)
[20:01:40] [PASSED] 0x56B3 (DG2)
[20:01:40] [PASSED] 0x5696 (DG2)
[20:01:40] [PASSED] 0x5697 (DG2)
[20:01:40] [PASSED] 0xB69 (PVC)
[20:01:40] [PASSED] 0xB6E (PVC)
[20:01:40] [PASSED] 0xBD4 (PVC)
[20:01:40] [PASSED] 0xBD5 (PVC)
[20:01:40] [PASSED] 0xBD6 (PVC)
[20:01:40] [PASSED] 0xBD7 (PVC)
[20:01:40] [PASSED] 0xBD8 (PVC)
[20:01:40] [PASSED] 0xBD9 (PVC)
[20:01:40] [PASSED] 0xBDA (PVC)
[20:01:40] [PASSED] 0xBDB (PVC)
[20:01:40] [PASSED] 0xBE0 (PVC)
[20:01:40] [PASSED] 0xBE1 (PVC)
[20:01:40] [PASSED] 0xBE5 (PVC)
[20:01:40] [PASSED] 0x7D40 (METEORLAKE)
[20:01:40] [PASSED] 0x7D45 (METEORLAKE)
[20:01:40] [PASSED] 0x7D55 (METEORLAKE)
[20:01:40] [PASSED] 0x7D60 (METEORLAKE)
[20:01:40] [PASSED] 0x7DD5 (METEORLAKE)
[20:01:40] [PASSED] 0x6420 (LUNARLAKE)
[20:01:40] [PASSED] 0x64A0 (LUNARLAKE)
[20:01:40] [PASSED] 0x64B0 (LUNARLAKE)
[20:01:40] [PASSED] 0xE202 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE209 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE20B (BATTLEMAGE)
[20:01:40] [PASSED] 0xE20C (BATTLEMAGE)
[20:01:40] [PASSED] 0xE20D (BATTLEMAGE)
[20:01:40] [PASSED] 0xE210 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE211 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE212 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE216 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE220 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE221 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE222 (BATTLEMAGE)
[20:01:40] [PASSED] 0xE223 (BATTLEMAGE)
[20:01:40] [PASSED] 0xB080 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB081 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB082 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB083 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB084 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB085 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB086 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB087 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB08F (PANTHERLAKE)
[20:01:40] [PASSED] 0xB090 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB0A0 (PANTHERLAKE)
[20:01:40] [PASSED] 0xB0B0 (PANTHERLAKE)
[20:01:40] [PASSED] 0xFD80 (PANTHERLAKE)
[20:01:40] [PASSED] 0xFD81 (PANTHERLAKE)
[20:01:40] [PASSED] 0xD740 (NOVALAKE_S)
[20:01:40] [PASSED] 0xD741 (NOVALAKE_S)
[20:01:40] [PASSED] 0xD742 (NOVALAKE_S)
[20:01:40] [PASSED] 0xD743 (NOVALAKE_S)
[20:01:40] [PASSED] 0xD745 (NOVALAKE_S)
[20:01:40] [PASSED] 0xD74A (NOVALAKE_S)
[20:01:40] [PASSED] 0xD74B (NOVALAKE_S)
[20:01:40] [PASSED] 0x674C (CRESCENTISLAND)
[20:01:40] [PASSED] 0x674D (CRESCENTISLAND)
[20:01:40] [PASSED] 0x674E (CRESCENTISLAND)
[20:01:40] [PASSED] 0x674F (CRESCENTISLAND)
[20:01:40] [PASSED] 0x6750 (CRESCENTISLAND)
[20:01:40] [PASSED] 0xD750 (NOVALAKE_P)
[20:01:40] [PASSED] 0xD751 (NOVALAKE_P)
[20:01:40] [PASSED] 0xD752 (NOVALAKE_P)
[20:01:40] [PASSED] 0xD753 (NOVALAKE_P)
[20:01:40] [PASSED] 0xD754 (NOVALAKE_P)
[20:01:40] [PASSED] 0xD755 (NOVALAKE_P)
[20:01:40] [PASSED] 0xD756 (NOVALAKE_P)
[20:01:40] [PASSED] 0xD757 (NOVALAKE_P)
[20:01:40] [PASSED] 0xD75F (NOVALAKE_P)
[20:01:40] =============== [PASSED] check_platform_desc ===============
[20:01:40] ===================== [PASSED] xe_pci ======================
[20:01:40] ============= xe_rtp_tables_test (4 subtests) ==============
[20:01:40] ================== xe_rtp_table_gt_test  ===================
[20:01:40] [PASSED] gt_was/14011060649
[20:01:40] [PASSED] gt_was/14011059788
[20:01:40] [PASSED] gt_was/14015795083
[20:01:40] [PASSED] gt_was/16021867713
[20:01:40] [PASSED] gt_was/14019449301
[20:01:40] [PASSED] gt_was/16028005424
[20:01:40] [PASSED] gt_was/14026578760
[20:01:40] [PASSED] gt_was/1409420604
[20:01:40] [PASSED] gt_was/1408615072
[20:01:40] [PASSED] gt_was/22010523718
[20:01:40] [PASSED] gt_was/14011006942
[20:01:40] [PASSED] gt_was/14014830051
[20:01:40] [PASSED] gt_was/18018781329
[20:01:40] [PASSED] gt_was/1509235366
[20:01:40] [PASSED] gt_was/18018781329
[20:01:40] [PASSED] gt_was/16016694945
[20:01:40] [PASSED] gt_was/14018575942
[20:01:40] [PASSED] gt_was/22016670082
[20:01:40] [PASSED] gt_was/22016670082
[20:01:40] [PASSED] gt_was/14017421178
[20:01:40] [PASSED] gt_was/16025250150
[20:01:40] [PASSED] gt_was/14021871409
[20:01:40] [PASSED] gt_was/16021865536
[20:01:40] [PASSED] gt_was/14021486841
[20:01:40] [PASSED] gt_was/14025160223
[20:01:40] [PASSED] gt_was/14026144927, 16029437861
[20:01:40] [PASSED] gt_was/14025635424
[20:01:40] [PASSED] gt_was/16028005424
[20:01:40] ============== [PASSED] xe_rtp_table_gt_test ===============
[20:01:40] ================== xe_rtp_table_gt_test  ===================
[20:01:40] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable
[20:01:40] [PASSED] gt_tunings/Tuning: 32B Access Enable
[20:01:40] [PASSED] gt_tunings/Tuning: L3 cache
[20:01:40] [PASSED] gt_tunings/Tuning: L3 cache - media
[20:01:40] [PASSED] gt_tunings/Tuning: Compression Overfetch
[20:01:40] [PASSED] gt_tunings/Tuning: Compression Overfetch - media
[20:01:40] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3
[20:01:40] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media
[20:01:40] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only
[20:01:40] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media
[20:01:40] [PASSED] gt_tunings/Tuning: Stateless compression control
[20:01:40] [PASSED] gt_tunings/Tuning: Stateless compression control - media
[20:01:40] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache
[20:01:40] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media
[20:01:40] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB
[20:01:40] ============== [PASSED] xe_rtp_table_gt_test ===============
[20:01:40] ================== xe_rtp_table_oob_test  ==================
[20:01:40] [PASSED] oob_was/1607983814
[20:01:40] [PASSED] oob_was/16010904313
[20:01:40] [PASSED] oob_was/18022495364
[20:01:40] [PASSED] oob_was/22012773006
[20:01:40] [PASSED] oob_was/14014475959
[20:01:40] [PASSED] oob_was/22011391025
[20:01:40] [PASSED] oob_was/22012727170
[20:01:40] [PASSED] oob_was/22012727685
[20:01:40] [PASSED] oob_was/22016596838
[20:01:40] [PASSED] oob_was/18020744125
[20:01:40] [PASSED] oob_was/1409600907
[20:01:40] [PASSED] oob_was/22014953428
[20:01:40] [PASSED] oob_was/16017236439
[20:01:40] [PASSED] oob_was/14019821291
[20:01:40] [PASSED] oob_was/14015076503
[20:01:40] [PASSED] oob_was/14018913170
[20:01:40] [PASSED] oob_was/14018094691
[20:01:40] [PASSED] oob_was/18024947630
[20:01:40] [PASSED] oob_was/16022287689
[20:01:40] [PASSED] oob_was/13011645652
[20:01:40] [PASSED] oob_was/14022293748
[20:01:40] [PASSED] oob_was/22019794406
[20:01:40] [PASSED] oob_was/22019338487
[20:01:40] [PASSED] oob_was/16023588340
[20:01:40] [PASSED] oob_was/14019789679
[20:01:40] [PASSED] oob_was/14022866841
[20:01:40] [PASSED] oob_was/16021333562
[20:01:40] [PASSED] oob_was/14016712196
[20:01:40] [PASSED] oob_was/14015568240
[20:01:40] [PASSED] oob_was/18013179988
[20:01:40] [PASSED] oob_was/1508761755
[20:01:40] [PASSED] oob_was/16023105232
[20:01:40] [PASSED] oob_was/16026508708
[20:01:40] [PASSED] oob_was/14020001231
[20:01:40] [PASSED] oob_was/16023683509
[20:01:40] [PASSED] oob_was/14025515070
[20:01:40] [PASSED] oob_was/15015404425_disable
[20:01:40] [PASSED] oob_was/16026007364
[20:01:40] [PASSED] oob_was/14020316580
[20:01:40] [PASSED] oob_was/14025883347
[20:01:40] ============== [PASSED] xe_rtp_table_oob_test ==============
[20:01:40] ================ xe_rtp_table_dev_oob_test  ================
[20:01:40] [PASSED] device_oob_was/22010954014
[20:01:40] [PASSED] device_oob_was/15015404425
[20:01:40] [PASSED] device_oob_was/22019338487_display
[20:01:40] [PASSED] device_oob_was/14022085890
[20:01:40] [PASSED] device_oob_was/14026539277
[20:01:40] [PASSED] device_oob_was/14026633728
[20:01:40] [PASSED] device_oob_was/14026746987
[20:01:40] [PASSED] device_oob_was/14026779378
[20:01:40] ============ [PASSED] xe_rtp_table_dev_oob_test ============
[20:01:40] =============== [PASSED] xe_rtp_tables_test ================
[20:01:40] =================== xe_rtp (3 subtests) ====================
[20:01:40] =================== xe_rtp_rules_tests  ====================
[20:01:40] [PASSED] no
[20:01:40] [PASSED] yes
[20:01:40] [PASSED] no-and-no
[20:01:40] [PASSED] no-and-yes
[20:01:40] [PASSED] yes-and-no
[20:01:40] [PASSED] yes-and-yes
[20:01:40] [PASSED] no-or-no
[20:01:40] [PASSED] no-or-yes
[20:01:40] [PASSED] yes-or-no
[20:01:40] [PASSED] yes-or-yes
[20:01:40] [PASSED] no-yes-or-yes-no
[20:01:40] [PASSED] no-yes-or-yes-yes
[20:01:40] [PASSED] yes-yes-or-no-yes
[20:01:40] [PASSED] yes-yes-or-yes-yes
[20:01:40] [PASSED] no-no-or-yes-or-no
[20:01:40] [PASSED] or
[20:01:40] [PASSED] or-yes
[20:01:40] [PASSED] or-no
[20:01:40] [PASSED] yes-or
[20:01:40] [PASSED] no-or
[20:01:40] [PASSED] no-or-or-yes
[20:01:40] [PASSED] yes-or-or-no
[20:01:40] [PASSED] no-or-or-no
[20:01:40] [PASSED] missing-context-engine-class
[20:01:40] [PASSED] missing-context-engine-class-or-yes
[20:01:40] [PASSED] missing-context-engine-class-or-or-yes
[20:01:40] =============== [PASSED] xe_rtp_rules_tests ================
[20:01:40] =============== xe_rtp_process_to_sr_tests  ================
[20:01:40] [PASSED] coalesce-same-reg
[20:01:40] [PASSED] no-match-no-add
[20:01:40] [PASSED] two-regs-two-entries
[20:01:40] [PASSED] clr-one-set-other
[20:01:40] [PASSED] set-field
[20:01:40] [PASSED] conflict-duplicate
[20:01:40] [PASSED] conflict-not-disjoint
[20:01:40] [PASSED] conflict-reg-type
[20:01:40] [PASSED] bad-mcr-reg-forced-to-regular
[20:01:40] [PASSED] bad-regular-reg-forced-to-mcr
[20:01:40] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[20:01:40] ================== xe_rtp_process_tests  ===================
[20:01:40] [PASSED] active1
[20:01:40] [PASSED] active2
[20:01:40] [PASSED] active-inactive
[20:01:40] [PASSED] inactive-active
[20:01:40] [PASSED] inactive-active-inactive
[20:01:40] [PASSED] inactive-inactive-inactive
[20:01:40] ============== [PASSED] xe_rtp_process_tests ===============
[20:01:40] ===================== [PASSED] xe_rtp ======================
[20:01:40] ==================== xe_wa (1 subtest) =====================
[20:01:40] ======================== xe_wa_gt  =========================
[20:01:40] [PASSED] TIGERLAKE B0
[20:01:40] [PASSED] DG1 A0
[20:01:40] [PASSED] DG1 B0
[20:01:40] [PASSED] ALDERLAKE_S A0
[20:01:40] [PASSED] ALDERLAKE_S B0
[20:01:40] [PASSED] ALDERLAKE_S C0
[20:01:40] [PASSED] ALDERLAKE_S D0
[20:01:40] [PASSED] ALDERLAKE_P A0
[20:01:40] [PASSED] ALDERLAKE_P B0
[20:01:40] [PASSED] ALDERLAKE_P C0
[20:01:40] [PASSED] ALDERLAKE_S RPLS D0
[20:01:40] [PASSED] ALDERLAKE_P RPLU E0
[20:01:40] [PASSED] DG2 G10 C0
[20:01:40] [PASSED] DG2 G11 B1
[20:01:40] [PASSED] DG2 G12 A1
[20:01:40] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[20:01:40] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[20:01:40] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[20:01:40] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[20:01:40] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[20:01:40] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[20:01:40] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[20:01:40] ==================== [PASSED] xe_wa_gt =====================
[20:01:40] ====================== [PASSED] xe_wa ======================
[20:01:40] ============================================================
[20:01:40] Testing complete. Ran 716 tests: passed: 698, skipped: 18
[20:01:40] Elapsed time: 52.592s total, 4.500s configuring, 47.375s building, 0.669s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [20:01:40] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[20:01:42] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25
In file included from ../drivers/gpu/drm/tests/drm_bridge_test.c:21:
../drivers/gpu/drm/tests/drm_kunit_edid.h:958:28: warning: ‘test_edid_hdmi_4k_rgb_yuv420_dc_max_340mhz’ defined but not used [-Wunused-const-variable=]
  958 | static const unsigned char test_edid_hdmi_4k_rgb_yuv420_dc_max_340mhz[] = {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/tests/drm_kunit_edid.h:726:28: warning: ‘test_edid_hdmi_1080p_rgb_yuv_dc_max_340mhz’ defined but not used [-Wunused-const-variable=]
  726 | static const unsigned char test_edid_hdmi_1080p_rgb_yuv_dc_max_340mhz[] = {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/tests/drm_kunit_edid.h:612:28: warning: ‘test_edid_hdmi_1080p_rgb_yuv_dc_max_200mhz’ defined but not used [-Wunused-const-variable=]
  612 | static const unsigned char test_edid_hdmi_1080p_rgb_yuv_dc_max_200mhz[] = {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/tests/drm_kunit_edid.h:498:28: warning: ‘test_edid_hdmi_1080p_rgb_max_340mhz’ defined but not used [-Wunused-const-variable=]
  498 | static const unsigned char test_edid_hdmi_1080p_rgb_max_340mhz[] = {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/tests/drm_kunit_edid.h:390:28: warning: ‘test_edid_hdmi_1080p_rgb_max_200mhz_hdr’ defined but not used [-Wunused-const-variable=]
  390 | static const unsigned char test_edid_hdmi_1080p_rgb_max_200mhz_hdr[] = {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/tests/drm_kunit_edid.h:271:28: warning: ‘test_edid_hdmi_1080p_rgb_max_200mhz’ defined but not used [-Wunused-const-variable=]
  271 | static const unsigned char test_edid_hdmi_1080p_rgb_max_200mhz[] = {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/tests/drm_kunit_edid.h:163:28: warning: ‘test_edid_hdmi_1080p_rgb_max_100mhz’ defined but not used [-Wunused-const-variable=]
  163 | static const unsigned char test_edid_hdmi_1080p_rgb_max_100mhz[] = {
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/tests/drm_kunit_edid.h:57:28: warning: ‘test_edid_dvi_1080p’ defined but not used [-Wunused-const-variable=]
   57 | static const unsigned char test_edid_dvi_1080p[] = {
      |                            ^~~~~~~~~~~~~~~~~~~

[20:02:12] Starting KUnit Kernel (1/1)...
[20:02:12] ============================================================ Running tests with:

$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[20:02:12] ============ drm_test_pick_cmdline (2 subtests) ============
[20:02:12] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[20:02:12] =============== drm_test_pick_cmdline_named  ===============
[20:02:12] [PASSED] NTSC
[20:02:12] [PASSED] NTSC-J
[20:02:12] [PASSED] PAL
[20:02:12] [PASSED] PAL-M
[20:02:12] =========== [PASSED] drm_test_pick_cmdline_named ===========
[20:02:12] ============== [PASSED] drm_test_pick_cmdline ==============
[20:02:12] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[20:02:12] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[20:02:12] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[20:02:12] =========== drm_validate_clone_mode (2 subtests) ===========
[20:02:12] ============== drm_test_check_in_clone_mode  ===============
[20:02:12] [PASSED] in_clone_mode
[20:02:12] [PASSED] not_in_clone_mode
[20:02:12] ========== [PASSED] drm_test_check_in_clone_mode ===========
[20:02:12] =============== drm_test_check_valid_clones  ===============
[20:02:12] [PASSED] not_in_clone_mode
[20:02:12] [PASSED] valid_clone
[20:02:12] [PASSED] invalid_clone
[20:02:12] =========== [PASSED] drm_test_check_valid_clones ===========
[20:02:12] ============= [PASSED] drm_validate_clone_mode =============
[20:02:12] ============= drm_validate_modeset (1 subtest) =============
[20:02:12] [PASSED] drm_test_check_connector_changed_modeset
[20:02:12] ============== [PASSED] drm_validate_modeset ===============
[20:02:12] ====== drm_test_bridge_get_current_state (2 subtests) ======
[20:02:12] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[20:02:12] [PASSED] drm_test_drm_bridge_get_current_state_legacy
[20:02:12] ======== [PASSED] drm_test_bridge_get_current_state ========
[20:02:12] ====== drm_test_bridge_helper_reset_crtc (4 subtests) ======
[20:02:12] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[20:02:12] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[20:02:12] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy
[20:02:12] [PASSED] drm_test_drm_bridge_helper_hdmi_output_bus_fmts
[20:02:12] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[20:02:12] ============== drm_bridge_alloc (2 subtests) ===============
[20:02:12] [PASSED] drm_test_drm_bridge_alloc_basic
[20:02:12] [PASSED] drm_test_drm_bridge_alloc_get_put
[20:02:12] ================ [PASSED] drm_bridge_alloc =================
[20:02:12] ============= drm_bridge_bus_fmt (5 subtests) ==============
[20:02:12] [PASSED] drm_test_bridge_rgb_yuv_rgb
[20:02:12] [PASSED] drm_test_bridge_must_convert_to_yuv444
[20:02:12] [PASSED] drm_test_bridge_hdmi_auto_rgb
[20:02:12] [PASSED] drm_test_bridge_auto_first
[20:02:12] [PASSED] drm_test_bridge_rgb_yuv_no_path
[20:02:12] =============== [PASSED] drm_bridge_bus_fmt ================
[20:02:12] ============= drm_cmdline_parser (40 subtests) =============
[20:02:12] [PASSED] drm_test_cmdline_force_d_only
[20:02:12] [PASSED] drm_test_cmdline_force_D_only_dvi
[20:02:12] [PASSED] drm_test_cmdline_force_D_only_hdmi
[20:02:12] [PASSED] drm_test_cmdline_force_D_only_not_digital
[20:02:12] [PASSED] drm_test_cmdline_force_e_only
[20:02:12] [PASSED] drm_test_cmdline_res
[20:02:12] [PASSED] drm_test_cmdline_res_vesa
[20:02:12] [PASSED] drm_test_cmdline_res_vesa_rblank
[20:02:12] [PASSED] drm_test_cmdline_res_rblank
[20:02:12] [PASSED] drm_test_cmdline_res_bpp
[20:02:12] [PASSED] drm_test_cmdline_res_refresh
[20:02:12] [PASSED] drm_test_cmdline_res_bpp_refresh
[20:02:12] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[20:02:12] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[20:02:12] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[20:02:12] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[20:02:12] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[20:02:12] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[20:02:12] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[20:02:12] [PASSED] drm_test_cmdline_res_margins_force_on
[20:02:12] [PASSED] drm_test_cmdline_res_vesa_margins
[20:02:12] [PASSED] drm_test_cmdline_name
[20:02:12] [PASSED] drm_test_cmdline_name_bpp
[20:02:12] [PASSED] drm_test_cmdline_name_option
[20:02:12] [PASSED] drm_test_cmdline_name_bpp_option
[20:02:12] [PASSED] drm_test_cmdline_rotate_0
[20:02:12] [PASSED] drm_test_cmdline_rotate_90
[20:02:12] [PASSED] drm_test_cmdline_rotate_180
[20:02:12] [PASSED] drm_test_cmdline_rotate_270
[20:02:12] [PASSED] drm_test_cmdline_hmirror
[20:02:12] [PASSED] drm_test_cmdline_vmirror
[20:02:12] [PASSED] drm_test_cmdline_margin_options
[20:02:12] [PASSED] drm_test_cmdline_multiple_options
[20:02:12] [PASSED] drm_test_cmdline_bpp_extra_and_option
[20:02:12] [PASSED] drm_test_cmdline_extra_and_option
[20:02:12] [PASSED] drm_test_cmdline_freestanding_options
[20:02:12] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[20:02:12] [PASSED] drm_test_cmdline_panel_orientation
[20:02:12] ================ drm_test_cmdline_invalid  =================
[20:02:12] [PASSED] margin_only
[20:02:12] [PASSED] interlace_only
[20:02:12] [PASSED] res_missing_x
[20:02:12] [PASSED] res_missing_y
[20:02:12] [PASSED] res_bad_y
[20:02:12] [PASSED] res_missing_y_bpp
[20:02:12] [PASSED] res_bad_bpp
[20:02:12] [PASSED] res_bad_refresh
[20:02:12] [PASSED] res_bpp_refresh_force_on_off
[20:02:12] [PASSED] res_invalid_mode
[20:02:12] [PASSED] res_bpp_wrong_place_mode
[20:02:12] [PASSED] name_bpp_refresh
[20:02:12] [PASSED] name_refresh
[20:02:12] [PASSED] name_refresh_wrong_mode
[20:02:12] [PASSED] name_refresh_invalid_mode
[20:02:12] [PASSED] rotate_multiple
[20:02:12] [PASSED] rotate_invalid_val
[20:02:12] [PASSED] rotate_truncated
[20:02:12] [PASSED] invalid_option
[20:02:12] [PASSED] invalid_tv_option
[20:02:12] [PASSED] truncated_tv_option
[20:02:12] ============ [PASSED] drm_test_cmdline_invalid =============
[20:02:12] =============== drm_test_cmdline_tv_options  ===============
[20:02:12] [PASSED] NTSC
[20:02:12] [PASSED] NTSC_443
[20:02:12] [PASSED] NTSC_J
[20:02:12] [PASSED] PAL
[20:02:12] [PASSED] PAL_M
[20:02:12] [PASSED] PAL_N
[20:02:12] [PASSED] SECAM
[20:02:12] [PASSED] MONO_525
[20:02:12] [PASSED] MONO_625
[20:02:12] =========== [PASSED] drm_test_cmdline_tv_options ===========
[20:02:12] =============== [PASSED] drm_cmdline_parser ================
[20:02:12] ========== drmm_connector_hdmi_init (20 subtests) ==========
[20:02:12] [PASSED] drm_test_connector_hdmi_init_valid
[20:02:12] [PASSED] drm_test_connector_hdmi_init_bpc_8
[20:02:12] [PASSED] drm_test_connector_hdmi_init_bpc_10
[20:02:12] [PASSED] drm_test_connector_hdmi_init_bpc_12
[20:02:12] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[20:02:12] [PASSED] drm_test_connector_hdmi_init_bpc_null
[20:02:12] [PASSED] drm_test_connector_hdmi_init_formats_empty
[20:02:12] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[20:02:12] === drm_test_connector_hdmi_init_formats_yuv420_allowed  ===
[20:02:12] [PASSED] supported_formats=0x9 yuv420_allowed=1
[20:02:12] [PASSED] supported_formats=0x9 yuv420_allowed=0
[20:02:12] [PASSED] supported_formats=0x5 yuv420_allowed=1
[20:02:12] [PASSED] supported_formats=0x5 yuv420_allowed=0
[20:02:12] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[20:02:12] [PASSED] drm_test_connector_hdmi_init_null_ddc
[20:02:12] [PASSED] drm_test_connector_hdmi_init_null_product
[20:02:12] [PASSED] drm_test_connector_hdmi_init_null_vendor
[20:02:12] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[20:02:12] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[20:02:12] [PASSED] drm_test_connector_hdmi_init_product_valid
[20:02:12] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[20:02:12] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[20:02:12] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[20:02:12] ========= drm_test_connector_hdmi_init_type_valid  =========
[20:02:12] [PASSED] HDMI-A
[20:02:12] [PASSED] HDMI-B
[20:02:12] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[20:02:12] ======== drm_test_connector_hdmi_init_type_invalid  ========
[20:02:12] [PASSED] Unknown
[20:02:12] [PASSED] VGA
[20:02:12] [PASSED] DVI-I
[20:02:12] [PASSED] DVI-D
[20:02:12] [PASSED] DVI-A
[20:02:12] [PASSED] Composite
[20:02:12] [PASSED] SVIDEO
[20:02:12] [PASSED] LVDS
[20:02:12] [PASSED] Component
[20:02:12] [PASSED] DIN
[20:02:12] [PASSED] DP
[20:02:12] [PASSED] TV
[20:02:12] [PASSED] eDP
[20:02:12] [PASSED] Virtual
[20:02:12] [PASSED] DSI
[20:02:12] [PASSED] DPI
[20:02:12] [PASSED] Writeback
[20:02:12] [PASSED] SPI
[20:02:12] [PASSED] USB
[20:02:12] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[20:02:12] ============ [PASSED] drmm_connector_hdmi_init =============
[20:02:12] ============= drmm_connector_init (3 subtests) =============
[20:02:12] [PASSED] drm_test_drmm_connector_init
[20:02:12] [PASSED] drm_test_drmm_connector_init_null_ddc
[20:02:12] ========= drm_test_drmm_connector_init_type_valid  =========
[20:02:12] [PASSED] Unknown
[20:02:12] [PASSED] VGA
[20:02:12] [PASSED] DVI-I
[20:02:12] [PASSED] DVI-D
[20:02:12] [PASSED] DVI-A
[20:02:12] [PASSED] Composite
[20:02:12] [PASSED] SVIDEO
[20:02:12] [PASSED] LVDS
[20:02:12] [PASSED] Component
[20:02:12] [PASSED] DIN
[20:02:12] [PASSED] DP
[20:02:12] [PASSED] HDMI-A
[20:02:12] [PASSED] HDMI-B
[20:02:12] [PASSED] TV
[20:02:12] [PASSED] eDP
[20:02:12] [PASSED] Virtual
[20:02:12] [PASSED] DSI
[20:02:12] [PASSED] DPI
[20:02:12] [PASSED] Writeback
[20:02:12] [PASSED] SPI
[20:02:12] [PASSED] USB
[20:02:12] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[20:02:12] =============== [PASSED] drmm_connector_init ===============
[20:02:12] ========= drm_connector_dynamic_init (6 subtests) ==========
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_init
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_init_properties
[20:02:12] ===== drm_test_drm_connector_dynamic_init_type_valid  ======
[20:02:12] [PASSED] Unknown
[20:02:12] [PASSED] VGA
[20:02:12] [PASSED] DVI-I
[20:02:12] [PASSED] DVI-D
[20:02:12] [PASSED] DVI-A
[20:02:12] [PASSED] Composite
[20:02:12] [PASSED] SVIDEO
[20:02:12] [PASSED] LVDS
[20:02:12] [PASSED] Component
[20:02:12] [PASSED] DIN
[20:02:12] [PASSED] DP
[20:02:12] [PASSED] HDMI-A
[20:02:12] [PASSED] HDMI-B
[20:02:12] [PASSED] TV
[20:02:12] [PASSED] eDP
[20:02:12] [PASSED] Virtual
[20:02:12] [PASSED] DSI
[20:02:12] [PASSED] DPI
[20:02:12] [PASSED] Writeback
[20:02:12] [PASSED] SPI
[20:02:12] [PASSED] USB
[20:02:12] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[20:02:12] ======== drm_test_drm_connector_dynamic_init_name  =========
[20:02:12] [PASSED] Unknown
[20:02:12] [PASSED] VGA
[20:02:12] [PASSED] DVI-I
[20:02:12] [PASSED] DVI-D
[20:02:12] [PASSED] DVI-A
[20:02:12] [PASSED] Composite
[20:02:12] [PASSED] SVIDEO
[20:02:12] [PASSED] LVDS
[20:02:12] [PASSED] Component
[20:02:12] [PASSED] DIN
[20:02:12] [PASSED] DP
[20:02:12] [PASSED] HDMI-A
[20:02:12] [PASSED] HDMI-B
[20:02:12] [PASSED] TV
[20:02:12] [PASSED] eDP
[20:02:12] [PASSED] Virtual
[20:02:12] [PASSED] DSI
[20:02:12] [PASSED] DPI
[20:02:12] [PASSED] Writeback
[20:02:12] [PASSED] SPI
[20:02:12] [PASSED] USB
[20:02:12] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[20:02:12] =========== [PASSED] drm_connector_dynamic_init ============
[20:02:12] ==== drm_connector_dynamic_register_early (4 subtests) =====
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[20:02:12] ====== [PASSED] drm_connector_dynamic_register_early =======
[20:02:12] ======= drm_connector_dynamic_register (7 subtests) ========
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[20:02:12] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[20:02:12] ========= [PASSED] drm_connector_dynamic_register ==========
[20:02:12] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[20:02:12] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[20:02:12] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[20:02:12] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[20:02:12] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[20:02:12] ========== drm_test_get_tv_mode_from_name_valid  ===========
[20:02:12] [PASSED] NTSC
[20:02:12] [PASSED] NTSC-443
[20:02:12] [PASSED] NTSC-J
[20:02:12] [PASSED] PAL
[20:02:12] [PASSED] PAL-M
[20:02:12] [PASSED] PAL-N
[20:02:12] [PASSED] SECAM
[20:02:12] [PASSED] Mono
[20:02:12] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[20:02:12] [PASSED] drm_test_get_tv_mode_from_name_truncated
[20:02:12] ============ [PASSED] drm_get_tv_mode_from_name ============
[20:02:12] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[20:02:12] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[20:02:12] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[20:02:12] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[20:02:12] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[20:02:12] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[20:02:12] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[20:02:12] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[20:02:12] [PASSED] VIC 96
[20:02:12] [PASSED] VIC 97
[20:02:12] [PASSED] VIC 101
[20:02:12] [PASSED] VIC 102
[20:02:12] [PASSED] VIC 106
[20:02:12] [PASSED] VIC 107
[20:02:12] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[20:02:12] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[20:02:12] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[20:02:12] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[20:02:12] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[20:02:12] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[20:02:12] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[20:02:12] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[20:02:12] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[20:02:12] [PASSED] Automatic
[20:02:12] [PASSED] Full
[20:02:12] [PASSED] Limited 16:235
[20:02:12] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[20:02:12] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[20:02:12] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[20:02:12] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[20:02:12] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[20:02:12] [PASSED] RGB
[20:02:12] [PASSED] YUV 4:2:0
[20:02:12] [PASSED] YUV 4:2:2
[20:02:12] [PASSED] YUV 4:4:4
[20:02:12] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[20:02:12] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[20:02:12] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[20:02:12] ============= drm_damage_helper (21 subtests) ==============
[20:02:12] [PASSED] drm_test_damage_iter_no_damage
[20:02:12] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[20:02:12] [PASSED] drm_test_damage_iter_no_damage_src_moved
[20:02:12] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[20:02:12] [PASSED] drm_test_damage_iter_no_damage_not_visible
[20:02:12] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[20:02:12] [PASSED] drm_test_damage_iter_no_damage_no_fb
[20:02:12] [PASSED] drm_test_damage_iter_simple_damage
[20:02:12] [PASSED] drm_test_damage_iter_single_damage
[20:02:12] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[20:02:12] [PASSED] drm_test_damage_iter_single_damage_outside_src
[20:02:12] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[20:02:12] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[20:02:12] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[20:02:12] [PASSED] drm_test_damage_iter_single_damage_src_moved
[20:02:12] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[20:02:12] [PASSED] drm_test_damage_iter_damage
[20:02:12] [PASSED] drm_test_damage_iter_damage_one_intersect
[20:02:12] [PASSED] drm_test_damage_iter_damage_one_outside
[20:02:12] [PASSED] drm_test_damage_iter_damage_src_moved
[20:02:12] [PASSED] drm_test_damage_iter_damage_not_visible
[20:02:12] ================ [PASSED] drm_damage_helper ================
[20:02:12] ============== drm_dp_mst_helper (3 subtests) ==============
[20:02:12] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[20:02:12] [PASSED] Clock 154000 BPP 30 DSC disabled
[20:02:12] [PASSED] Clock 234000 BPP 30 DSC disabled
[20:02:12] [PASSED] Clock 297000 BPP 24 DSC disabled
[20:02:12] [PASSED] Clock 332880 BPP 24 DSC enabled
[20:02:12] [PASSED] Clock 324540 BPP 24 DSC enabled
[20:02:12] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[20:02:12] ============== drm_test_dp_mst_calc_pbn_div  ===============
[20:02:12] [PASSED] Link rate 2000000 lane count 4
[20:02:12] [PASSED] Link rate 2000000 lane count 2
[20:02:12] [PASSED] Link rate 2000000 lane count 1
[20:02:12] [PASSED] Link rate 1350000 lane count 4
[20:02:12] [PASSED] Link rate 1350000 lane count 2
[20:02:12] [PASSED] Link rate 1350000 lane count 1
[20:02:12] [PASSED] Link rate 1000000 lane count 4
[20:02:12] [PASSED] Link rate 1000000 lane count 2
[20:02:12] [PASSED] Link rate 1000000 lane count 1
[20:02:12] [PASSED] Link rate 810000 lane count 4
[20:02:12] [PASSED] Link rate 810000 lane count 2
[20:02:12] [PASSED] Link rate 810000 lane count 1
[20:02:12] [PASSED] Link rate 540000 lane count 4
[20:02:12] [PASSED] Link rate 540000 lane count 2
[20:02:12] [PASSED] Link rate 540000 lane count 1
[20:02:12] [PASSED] Link rate 270000 lane count 4
[20:02:12] [PASSED] Link rate 270000 lane count 2
[20:02:12] [PASSED] Link rate 270000 lane count 1
[20:02:12] [PASSED] Link rate 162000 lane count 4
[20:02:12] [PASSED] Link rate 162000 lane count 2
[20:02:12] [PASSED] Link rate 162000 lane count 1
[20:02:12] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[20:02:12] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[20:02:12] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[20:02:12] [PASSED] DP_POWER_UP_PHY with port number
[20:02:12] [PASSED] DP_POWER_DOWN_PHY with port number
[20:02:12] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[20:02:12] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[20:02:12] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[20:02:12] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[20:02:12] [PASSED] DP_QUERY_PAYLOAD with port number
[20:02:12] [PASSED] DP_QUERY_PAYLOAD with VCPI
[20:02:12] [PASSED] DP_REMOTE_DPCD_READ with port number
[20:02:12] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[20:02:12] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[20:02:12] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[20:02:12] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[20:02:12] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[20:02:12] [PASSED] DP_REMOTE_I2C_READ with port number
[20:02:12] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[20:02:12] [PASSED] DP_REMOTE_I2C_READ with transactions array
[20:02:12] [PASSED] DP_REMOTE_I2C_WRITE with port number
[20:02:12] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[20:02:12] [PASSED] DP_REMOTE_I2C_WRITE with data array
[20:02:12] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[20:02:12] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[20:02:12] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[20:02:12] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[20:02:12] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[20:02:12] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[20:02:12] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[20:02:12] ================ [PASSED] drm_dp_mst_helper ================
[20:02:12] ================== drm_exec (7 subtests) ===================
[20:02:12] [PASSED] sanitycheck
[20:02:12] [PASSED] test_lock
[20:02:12] [PASSED] test_lock_unlock
[20:02:12] [PASSED] test_duplicates
[20:02:12] [PASSED] test_prepare
[20:02:12] [PASSED] test_prepare_array
[20:02:12] [PASSED] test_multiple_loops
[20:02:12] ==================== [PASSED] drm_exec =====================
[20:02:12] =========== drm_format_helper_test (17 subtests) ===========
[20:02:12] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[20:02:12] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[20:02:12] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[20:02:12] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[20:02:12] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[20:02:12] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[20:02:12] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[20:02:12] ============= drm_test_fb_xrgb8888_to_bgr888  ==============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[20:02:12] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[20:02:12] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[20:02:12] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[20:02:12] ============== drm_test_fb_xrgb8888_to_mono  ===============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[20:02:12] ==================== drm_test_fb_swab  =====================
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ================ [PASSED] drm_test_fb_swab =================
[20:02:12] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[20:02:12] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[20:02:12] [PASSED] single_pixel_source_buffer
[20:02:12] [PASSED] single_pixel_clip_rectangle
[20:02:12] [PASSED] well_known_colors
[20:02:12] [PASSED] destination_pitch
[20:02:12] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[20:02:12] ================= drm_test_fb_clip_offset  =================
[20:02:12] [PASSED] pass through
[20:02:12] [PASSED] horizontal offset
[20:02:12] [PASSED] vertical offset
[20:02:12] [PASSED] horizontal and vertical offset
[20:02:12] [PASSED] horizontal offset (custom pitch)
[20:02:12] [PASSED] vertical offset (custom pitch)
[20:02:12] [PASSED] horizontal and vertical offset (custom pitch)
[20:02:12] ============= [PASSED] drm_test_fb_clip_offset =============
[20:02:12] =================== drm_test_fb_memcpy  ====================
[20:02:12] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[20:02:12] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[20:02:12] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[20:02:12] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[20:02:12] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[20:02:12] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[20:02:12] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[20:02:12] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[20:02:12] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[20:02:12] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[20:02:12] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[20:02:12] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[20:02:12] =============== [PASSED] drm_test_fb_memcpy ================
[20:02:12] ============= [PASSED] drm_format_helper_test ==============
[20:02:12] ================= drm_format (18 subtests) =================
[20:02:12] [PASSED] drm_test_format_block_width_invalid
[20:02:12] [PASSED] drm_test_format_block_width_one_plane
[20:02:12] [PASSED] drm_test_format_block_width_two_plane
[20:02:12] [PASSED] drm_test_format_block_width_three_plane
[20:02:12] [PASSED] drm_test_format_block_width_tiled
[20:02:12] [PASSED] drm_test_format_block_height_invalid
[20:02:12] [PASSED] drm_test_format_block_height_one_plane
[20:02:12] [PASSED] drm_test_format_block_height_two_plane
[20:02:12] [PASSED] drm_test_format_block_height_three_plane
[20:02:12] [PASSED] drm_test_format_block_height_tiled
[20:02:12] [PASSED] drm_test_format_min_pitch_invalid
[20:02:12] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[20:02:12] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[20:02:12] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[20:02:12] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[20:02:12] [PASSED] drm_test_format_min_pitch_two_plane
[20:02:12] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[20:02:12] [PASSED] drm_test_format_min_pitch_tiled
[20:02:12] =================== [PASSED] drm_format ====================
[20:02:12] ============== drm_framebuffer (10 subtests) ===============
[20:02:12] ========== drm_test_framebuffer_check_src_coords  ==========
[20:02:12] [PASSED] Success: source fits into fb
[20:02:12] [PASSED] Fail: overflowing fb with x-axis coordinate
[20:02:12] [PASSED] Fail: overflowing fb with y-axis coordinate
[20:02:12] [PASSED] Fail: overflowing fb with source width
[20:02:12] [PASSED] Fail: overflowing fb with source height
[20:02:12] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[20:02:12] [PASSED] drm_test_framebuffer_cleanup
[20:02:12] =============== drm_test_framebuffer_create  ===============
[20:02:12] [PASSED] ABGR8888 normal sizes
[20:02:12] [PASSED] ABGR8888 max sizes
[20:02:12] [PASSED] ABGR8888 pitch greater than min required
[20:02:12] [PASSED] ABGR8888 pitch less than min required
[20:02:12] [PASSED] ABGR8888 Invalid width
[20:02:12] [PASSED] ABGR8888 Invalid buffer handle
[20:02:12] [PASSED] No pixel format
[20:02:12] [PASSED] ABGR8888 Width 0
[20:02:12] [PASSED] ABGR8888 Height 0
[20:02:12] [PASSED] ABGR8888 Out of bound height * pitch combination
[20:02:12] [PASSED] ABGR8888 Large buffer offset
[20:02:12] [PASSED] ABGR8888 Buffer offset for inexistent plane
[20:02:12] [PASSED] ABGR8888 Invalid flag
[20:02:12] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[20:02:12] [PASSED] ABGR8888 Valid buffer modifier
[20:02:12] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[20:02:12] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[20:02:12] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[20:02:12] [PASSED] NV12 Normal sizes
[20:02:12] [PASSED] NV12 Max sizes
[20:02:12] [PASSED] NV12 Invalid pitch
[20:02:12] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[20:02:12] [PASSED] NV12 different  modifier per-plane
[20:02:12] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[20:02:12] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[20:02:12] [PASSED] NV12 Modifier for inexistent plane
[20:02:12] [PASSED] NV12 Handle for inexistent plane
[20:02:12] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[20:02:12] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[20:02:12] [PASSED] YVU420 Normal sizes
[20:02:12] [PASSED] YVU420 Max sizes
[20:02:12] [PASSED] YVU420 Invalid pitch
[20:02:12] [PASSED] YVU420 Different pitches
[20:02:12] [PASSED] YVU420 Different buffer offsets/pitches
[20:02:12] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[20:02:12] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[20:02:12] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[20:02:12] [PASSED] YVU420 Valid modifier
[20:02:12] [PASSED] YVU420 Different modifiers per plane
[20:02:12] [PASSED] YVU420 Modifier for inexistent plane
[20:02:12] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[20:02:12] [PASSED] X0L2 Normal sizes
[20:02:12] [PASSED] X0L2 Max sizes
[20:02:12] [PASSED] X0L2 Invalid pitch
[20:02:12] [PASSED] X0L2 Pitch greater than minimum required
[20:02:12] [PASSED] X0L2 Handle for inexistent plane
[20:02:12] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[20:02:12] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[20:02:12] [PASSED] X0L2 Valid modifier
[20:02:12] [PASSED] X0L2 Modifier for inexistent plane
[20:02:12] =========== [PASSED] drm_test_framebuffer_create ===========
[20:02:12] [PASSED] drm_test_framebuffer_free
[20:02:12] [PASSED] drm_test_framebuffer_init
[20:02:12] [PASSED] drm_test_framebuffer_init_bad_format
[20:02:12] [PASSED] drm_test_framebuffer_init_dev_mismatch
[20:02:12] [PASSED] drm_test_framebuffer_lookup
[20:02:12] [PASSED] drm_test_framebuffer_lookup_inexistent
[20:02:12] [PASSED] drm_test_framebuffer_modifiers_not_supported
[20:02:12] ================= [PASSED] drm_framebuffer =================
[20:02:12] ================ drm_gem_shmem (8 subtests) ================
[20:02:12] [PASSED] drm_gem_shmem_test_obj_create
[20:02:12] [PASSED] drm_gem_shmem_test_obj_create_private
[20:02:12] [PASSED] drm_gem_shmem_test_pin_pages
[20:02:12] [PASSED] drm_gem_shmem_test_vmap
[20:02:12] [PASSED] drm_gem_shmem_test_get_sg_table
[20:02:12] [PASSED] drm_gem_shmem_test_get_pages_sgt
[20:02:12] [PASSED] drm_gem_shmem_test_madvise
[20:02:12] [PASSED] drm_gem_shmem_test_purge
[20:02:12] ================== [PASSED] drm_gem_shmem ==================
[20:02:12] === drm_atomic_helper_connector_hdmi_check (29 subtests) ===
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[20:02:12] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420  =======
[20:02:12] [PASSED] Automatic
[20:02:12] [PASSED] Full
[20:02:12] [PASSED] Limited 16:235
[20:02:12] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[20:02:12] [PASSED] drm_test_check_disable_connector
[20:02:12] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[20:02:12] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[20:02:12] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[20:02:12] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[20:02:12] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[20:02:12] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[20:02:12] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[20:02:12] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[20:02:12] [PASSED] drm_test_check_output_bpc_dvi
[20:02:12] [PASSED] drm_test_check_output_bpc_format_vic_1
[20:02:12] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[20:02:12] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[20:02:12] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[20:02:12] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[20:02:12] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[20:02:12] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[20:02:12] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[20:02:12] ============ drm_test_check_hdmi_color_format  =============
[20:02:12] [PASSED] AUTO -> RGB
[20:02:12] [PASSED] YCBCR422 -> YUV422
[20:02:12] [PASSED] YCBCR420 -> YUV420
[20:02:12] [PASSED] YCBCR444 -> YUV444
[20:02:12] [PASSED] RGB -> RGB
[20:02:12] ======== [PASSED] drm_test_check_hdmi_color_format =========
[20:02:12] ======== drm_test_check_hdmi_color_format_420_only  ========
[20:02:12] [PASSED] RGB should fail
[20:02:12] [PASSED] YUV444 should fail
[20:02:12] [PASSED] YUV422 should fail
[20:02:12] [PASSED] YUV420 should work
[20:02:12] ==== [PASSED] drm_test_check_hdmi_color_format_420_only ====
[20:02:12] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[20:02:12] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[20:02:12] [PASSED] drm_test_check_broadcast_rgb_value
[20:02:12] [PASSED] drm_test_check_bpc_8_value
[20:02:12] [PASSED] drm_test_check_bpc_10_value
[20:02:12] [PASSED] drm_test_check_bpc_12_value
[20:02:12] [PASSED] drm_test_check_format_value
[20:02:12] [PASSED] drm_test_check_tmds_char_value
[20:02:12] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[20:02:12] = drm_atomic_helper_connector_hdmi_mode_valid (7 subtests) =
[20:02:12] [PASSED] drm_test_check_mode_valid
[20:02:12] [PASSED] drm_test_check_mode_valid_reject
[20:02:12] [PASSED] drm_test_check_mode_valid_reject_rate
[20:02:12] [PASSED] drm_test_check_mode_valid_reject_max_clock
[20:02:12] [PASSED] drm_test_check_mode_valid_yuv420_only_max_clock
[20:02:12] [PASSED] drm_test_check_mode_valid_reject_yuv420_only_connector
[20:02:12] [PASSED] drm_test_check_mode_valid_accept_yuv420_also_connector_rgb
[20:02:12] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[20:02:12] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[20:02:12] [PASSED] drm_test_check_infoframes
[20:02:12] [PASSED] drm_test_check_reject_avi_infoframe
[20:02:12] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[20:02:12] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[20:02:12] [PASSED] drm_test_check_reject_audio_infoframe
[20:02:12] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[20:02:12] ================= drm_managed (2 subtests) =================
[20:02:12] [PASSED] drm_test_managed_release_action
[20:02:12] [PASSED] drm_test_managed_run_action
[20:02:12] =================== [PASSED] drm_managed ===================
[20:02:12] =================== drm_mm (6 subtests) ====================
[20:02:12] [PASSED] drm_test_mm_init
[20:02:12] [PASSED] drm_test_mm_debug
[20:02:12] [PASSED] drm_test_mm_align32
[20:02:12] [PASSED] drm_test_mm_align64
[20:02:12] [PASSED] drm_test_mm_lowest
[20:02:12] [PASSED] drm_test_mm_highest
[20:02:12] ===================== [PASSED] drm_mm ======================
[20:02:12] ============= drm_modes_analog_tv (5 subtests) =============
[20:02:12] [PASSED] drm_test_modes_analog_tv_mono_576i
[20:02:12] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[20:02:12] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[20:02:12] [PASSED] drm_test_modes_analog_tv_pal_576i
[20:02:12] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[20:02:12] =============== [PASSED] drm_modes_analog_tv ===============
[20:02:12] ============== drm_plane_helper (2 subtests) ===============
[20:02:12] =============== drm_test_check_plane_state  ================
[20:02:12] [PASSED] clipping_simple
[20:02:12] [PASSED] clipping_rotate_reflect
[20:02:12] [PASSED] positioning_simple
[20:02:12] [PASSED] upscaling
[20:02:12] [PASSED] downscaling
[20:02:12] [PASSED] rounding1
[20:02:12] [PASSED] rounding2
[20:02:12] [PASSED] rounding3
[20:02:12] [PASSED] rounding4
[20:02:12] =========== [PASSED] drm_test_check_plane_state ============
[20:02:12] =========== drm_test_check_invalid_plane_state  ============
[20:02:12] [PASSED] positioning_invalid
[20:02:12] [PASSED] upscaling_invalid
[20:02:12] [PASSED] downscaling_invalid
[20:02:12] ======= [PASSED] drm_test_check_invalid_plane_state ========
[20:02:12] ================ [PASSED] drm_plane_helper =================
[20:02:12] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[20:02:12] ====== drm_test_connector_helper_tv_get_modes_check  =======
[20:02:12] [PASSED] None
[20:02:12] [PASSED] PAL
[20:02:12] [PASSED] NTSC
[20:02:12] [PASSED] Both, NTSC Default
[20:02:12] [PASSED] Both, PAL Default
[20:02:12] [PASSED] Both, NTSC Default, with PAL on command-line
[20:02:12] [PASSED] Both, PAL Default, with NTSC on command-line
[20:02:12] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[20:02:12] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[20:02:12] ================== drm_rect (9 subtests) ===================
[20:02:12] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[20:02:12] [PASSED] drm_test_rect_clip_scaled_not_clipped
[20:02:12] [PASSED] drm_test_rect_clip_scaled_clipped
[20:02:12] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[20:02:12] ================= drm_test_rect_intersect  =================
[20:02:12] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[20:02:12] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[20:02:12] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[20:02:12] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[20:02:12] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[20:02:12] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[20:02:12] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[20:02:12] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[20:02:12] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[20:02:12] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[20:02:12] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[20:02:12] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[20:02:12] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[20:02:12] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[20:02:12] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[20:02:12] ============= [PASSED] drm_test_rect_intersect =============
[20:02:12] ================ drm_test_rect_calc_hscale  ================
[20:02:12] [PASSED] normal use
[20:02:12] [PASSED] out of max range
[20:02:12] [PASSED] out of min range
[20:02:12] [PASSED] zero dst
[20:02:12] [PASSED] negative src
[20:02:12] [PASSED] negative dst
[20:02:12] ============ [PASSED] drm_test_rect_calc_hscale ============
[20:02:12] ================ drm_test_rect_calc_vscale  ================
[20:02:12] [PASSED] normal use
[20:02:12] [PASSED] out of max range
[20:02:12] [PASSED] out of min range
[20:02:12] [PASSED] zero dst
[20:02:12] [PASSED] negative src
[20:02:12] [PASSED] negative dst
[20:02:12] ============ [PASSED] drm_test_rect_calc_vscale ============
[20:02:12] ================== drm_test_rect_rotate  ===================
[20:02:12] [PASSED] reflect-x
[20:02:12] [PASSED] reflect-y
[20:02:12] [PASSED] rotate-0
[20:02:12] [PASSED] rotate-90
[20:02:12] [PASSED] rotate-180
[20:02:12] [PASSED] rotate-270
[20:02:12] ============== [PASSED] drm_test_rect_rotate ===============
[20:02:12] ================ drm_test_rect_rotate_inv  =================
[20:02:12] [PASSED] reflect-x
[20:02:12] [PASSED] reflect-y
[20:02:12] [PASSED] rotate-0
[20:02:12] [PASSED] rotate-90
[20:02:12] [PASSED] rotate-180
[20:02:12] [PASSED] rotate-270
[20:02:12] ============ [PASSED] drm_test_rect_rotate_inv =============
[20:02:12] ==================== [PASSED] drm_rect =====================
[20:02:12] ============ drm_sysfb_modeset_test (1 subtest) ============
[20:02:12] ============ drm_test_sysfb_build_fourcc_list  =============
[20:02:12] [PASSED] no native formats
[20:02:12] [PASSED] XRGB8888 as native format
[20:02:12] [PASSED] remove duplicates
[20:02:12] [PASSED] convert alpha formats
[20:02:12] [PASSED] random formats
[20:02:12] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[20:02:12] ============= [PASSED] drm_sysfb_modeset_test ==============
[20:02:12] ================== drm_fixp (2 subtests) ===================
[20:02:12] [PASSED] drm_test_int2fixp
[20:02:12] [PASSED] drm_test_sm2fixp
[20:02:12] ==================== [PASSED] drm_fixp =====================
[20:02:12] ============================================================
[20:02:12] Testing complete. Ran 639 tests: passed: 639
[20:02:12] Elapsed time: 32.132s total, 1.723s configuring, 30.244s building, 0.148s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [20:02:12] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[20:02:14] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=25
[20:02:24] Starting KUnit Kernel (1/1)...
[20:02:24] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[20:02:24] ================= ttm_device (5 subtests) ==================
[20:02:24] [PASSED] ttm_device_init_basic
[20:02:24] [PASSED] ttm_device_init_multiple
[20:02:24] [PASSED] ttm_device_fini_basic
[20:02:24] [PASSED] ttm_device_init_no_vma_man
[20:02:24] ================== ttm_device_init_pools  ==================
[20:02:24] [PASSED] No DMA allocations, no DMA32 required
[20:02:24] [PASSED] DMA allocations, DMA32 required
[20:02:24] [PASSED] No DMA allocations, DMA32 required
[20:02:24] [PASSED] DMA allocations, no DMA32 required
[20:02:24] ============== [PASSED] ttm_device_init_pools ==============
[20:02:24] =================== [PASSED] ttm_device ====================
[20:02:24] ================== ttm_pool (8 subtests) ===================
[20:02:24] ================== ttm_pool_alloc_basic  ===================
[20:02:24] [PASSED] One page
[20:02:24] [PASSED] More than one page
[20:02:24] [PASSED] Above the allocation limit
[20:02:24] [PASSED] One page, with coherent DMA mappings enabled
[20:02:24] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[20:02:24] ============== [PASSED] ttm_pool_alloc_basic ===============
[20:02:24] ============== ttm_pool_alloc_basic_dma_addr  ==============
[20:02:24] [PASSED] One page
[20:02:24] [PASSED] More than one page
[20:02:24] [PASSED] Above the allocation limit
[20:02:24] [PASSED] One page, with coherent DMA mappings enabled
[20:02:24] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[20:02:24] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[20:02:24] [PASSED] ttm_pool_alloc_order_caching_match
[20:02:24] [PASSED] ttm_pool_alloc_caching_mismatch
[20:02:24] [PASSED] ttm_pool_alloc_order_mismatch
[20:02:24] [PASSED] ttm_pool_free_dma_alloc
[20:02:24] [PASSED] ttm_pool_free_no_dma_alloc
[20:02:24] [PASSED] ttm_pool_fini_basic
[20:02:24] ==================== [PASSED] ttm_pool =====================
[20:02:24] ================ ttm_resource (8 subtests) =================
[20:02:24] ================= ttm_resource_init_basic  =================
[20:02:24] [PASSED] Init resource in TTM_PL_SYSTEM
[20:02:24] [PASSED] Init resource in TTM_PL_VRAM
[20:02:24] [PASSED] Init resource in a private placement
[20:02:24] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[20:02:24] ============= [PASSED] ttm_resource_init_basic =============
[20:02:24] [PASSED] ttm_resource_init_pinned
[20:02:24] [PASSED] ttm_resource_fini_basic
[20:02:24] [PASSED] ttm_resource_manager_init_basic
[20:02:24] [PASSED] ttm_resource_manager_usage_basic
[20:02:24] [PASSED] ttm_resource_manager_set_used_basic
[20:02:24] [PASSED] ttm_sys_man_alloc_basic
[20:02:24] [PASSED] ttm_sys_man_free_basic
[20:02:24] ================== [PASSED] ttm_resource ===================
[20:02:24] =================== ttm_tt (15 subtests) ===================
[20:02:24] ==================== ttm_tt_init_basic  ====================
[20:02:24] [PASSED] Page-aligned size
[20:02:24] [PASSED] Extra pages requested
[20:02:24] ================ [PASSED] ttm_tt_init_basic ================
[20:02:24] [PASSED] ttm_tt_init_misaligned
[20:02:24] [PASSED] ttm_tt_fini_basic
[20:02:24] [PASSED] ttm_tt_fini_sg
[20:02:24] [PASSED] ttm_tt_fini_shmem
[20:02:24] [PASSED] ttm_tt_create_basic
[20:02:24] [PASSED] ttm_tt_create_invalid_bo_type
[20:02:24] [PASSED] ttm_tt_create_ttm_exists
[20:02:24] [PASSED] ttm_tt_create_failed
[20:02:24] [PASSED] ttm_tt_destroy_basic
[20:02:24] [PASSED] ttm_tt_populate_null_ttm
[20:02:24] [PASSED] ttm_tt_populate_populated_ttm
[20:02:24] [PASSED] ttm_tt_unpopulate_basic
[20:02:24] [PASSED] ttm_tt_unpopulate_empty_ttm
[20:02:24] [PASSED] ttm_tt_swapin_basic
[20:02:24] ===================== [PASSED] ttm_tt ======================
[20:02:24] =================== ttm_bo (14 subtests) ===================
[20:02:24] =========== ttm_bo_reserve_optimistic_no_ticket  ===========
[20:02:24] [PASSED] Cannot be interrupted and sleeps
[20:02:24] [PASSED] Cannot be interrupted, locks straight away
[20:02:24] [PASSED] Can be interrupted, sleeps
[20:02:24] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[20:02:24] [PASSED] ttm_bo_reserve_locked_no_sleep
[20:02:24] [PASSED] ttm_bo_reserve_no_wait_ticket
[20:02:24] [PASSED] ttm_bo_reserve_double_resv
[20:02:24] [PASSED] ttm_bo_reserve_interrupted
[20:02:24] [PASSED] ttm_bo_reserve_deadlock
[20:02:24] [PASSED] ttm_bo_unreserve_basic
[20:02:24] [PASSED] ttm_bo_unreserve_pinned
[20:02:24] [PASSED] ttm_bo_unreserve_bulk
[20:02:24] [PASSED] ttm_bo_fini_basic
[20:02:24] [PASSED] ttm_bo_fini_shared_resv
[20:02:24] [PASSED] ttm_bo_pin_basic
[20:02:24] [PASSED] ttm_bo_pin_unpin_resource
[20:02:24] [PASSED] ttm_bo_multiple_pin_one_unpin
[20:02:24] ===================== [PASSED] ttm_bo ======================
[20:02:24] ============== ttm_bo_validate (22 subtests) ===============
[20:02:24] ============== ttm_bo_init_reserved_sys_man  ===============
[20:02:24] [PASSED] Buffer object for userspace
[20:02:24] [PASSED] Kernel buffer object
[20:02:24] [PASSED] Shared buffer object
[20:02:24] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[20:02:24] ============== ttm_bo_init_reserved_mock_man  ==============
[20:02:24] [PASSED] Buffer object for userspace
[20:02:24] [PASSED] Kernel buffer object
[20:02:24] [PASSED] Shared buffer object
[20:02:24] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[20:02:24] [PASSED] ttm_bo_init_reserved_resv
[20:02:24] ================== ttm_bo_validate_basic  ==================
[20:02:24] [PASSED] Buffer object for userspace
[20:02:24] [PASSED] Kernel buffer object
[20:02:24] [PASSED] Shared buffer object
[20:02:24] ============== [PASSED] ttm_bo_validate_basic ==============
[20:02:24] [PASSED] ttm_bo_validate_invalid_placement
[20:02:24] ============= ttm_bo_validate_same_placement  ==============
[20:02:24] [PASSED] System manager
[20:02:24] [PASSED] VRAM manager
[20:02:24] ========= [PASSED] ttm_bo_validate_same_placement ==========
[20:02:24] [PASSED] ttm_bo_validate_failed_alloc
[20:02:24] [PASSED] ttm_bo_validate_pinned
[20:02:24] [PASSED] ttm_bo_validate_busy_placement
[20:02:24] ================ ttm_bo_validate_multihop  =================
[20:02:24] [PASSED] Buffer object for userspace
[20:02:24] [PASSED] Kernel buffer object
[20:02:24] [PASSED] Shared buffer object
[20:02:24] ============ [PASSED] ttm_bo_validate_multihop =============
[20:02:24] ========== ttm_bo_validate_no_placement_signaled  ==========
[20:02:24] [PASSED] Buffer object in system domain, no page vector
[20:02:24] [PASSED] Buffer object in system domain with an existing page vector
[20:02:24] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[20:02:24] ======== ttm_bo_validate_no_placement_not_signaled  ========
[20:02:24] [PASSED] Buffer object for userspace
[20:02:24] [PASSED] Kernel buffer object
[20:02:24] [PASSED] Shared buffer object
[20:02:24] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[20:02:24] [PASSED] ttm_bo_validate_move_fence_signaled
[20:02:24] ========= ttm_bo_validate_move_fence_not_signaled  =========
[20:02:24] [PASSED] Waits for GPU
[20:02:24] [PASSED] Tries to lock straight away
[20:02:24] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[20:02:24] [PASSED] ttm_bo_validate_swapout
[20:02:24] [PASSED] ttm_bo_validate_happy_evict
[20:02:24] [PASSED] ttm_bo_validate_all_pinned_evict
[20:02:24] [PASSED] ttm_bo_validate_allowed_only_evict
[20:02:24] [PASSED] ttm_bo_validate_deleted_evict
[20:02:24] [PASSED] ttm_bo_validate_busy_domain_evict
[20:02:24] [PASSED] ttm_bo_validate_evict_gutting
[20:02:24] [PASSED] ttm_bo_validate_recrusive_evict
[20:02:24] ================= [PASSED] ttm_bo_validate =================
[20:02:24] ============================================================
[20:02:24] Testing complete. Ran 102 tests: passed: 102
[20:02:24] Elapsed time: 11.560s total, 1.719s configuring, 9.576s building, 0.231s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel

#15 lore raw

✓ Xe.CI.BAT: success for Add reclaim to the dmem cgroup controller (rev6)

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

== Series Details ==

Series: Add reclaim to the dmem cgroup controller (rev6)
URL : https://patchwork.freedesktop.org/series/163970/
State : success

== Summary ==

CI Bug Log - changes from xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b_BAT -> xe-pw-163970v6_BAT
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (13 -> 13)
------------------------------

No changes in participating hosts

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

Here are the changes found in xe-pw-163970v6_BAT that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@xe_waitfence@engine:
- bat-ptl-1: [PASS][1] -> [FAIL][2] ([Intel XE#6519])
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/bat-ptl-1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/bat-ptl-1/igt@[email protected]

[Intel XE#6519]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6519

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

* Linux: xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b -> xe-pw-163970v6

IGT_8959: 77337ca2d2dd470f3b32f1cf4760b0e79a52e2b7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b: eebb2a1700eaa412ee8e0843bafce7bc5025638b
xe-pw-163970v6: 163970v6

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/index.html

#16 lore raw

✓ Xe.CI.FULL: success for Add reclaim to the dmem cgroup controller (rev6)

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

== Series Details ==

Series: Add reclaim to the dmem cgroup controller (rev6)
URL : https://patchwork.freedesktop.org/series/163970/
State : success

== Summary ==

CI Bug Log - changes from xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b_FULL -> xe-pw-163970v6_FULL
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (2 -> 2)
------------------------------

No changes in participating hosts

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

Here are the changes found in xe-pw-163970v6_FULL that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@kms_big_fb@x-tiled-16bpp-rotate-90:
- shard-bmg: NOTRUN -> [SKIP][1] ([Intel XE#2327]) +1 other test skip
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_big_fb@yf-tiled-8bpp-rotate-0:
- shard-bmg: NOTRUN -> [SKIP][2] ([Intel XE#1124]) +3 other tests skip
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-5/igt@[email protected]

* igt@kms_bw@linear-tiling-1-displays-target-3840x2160p:
- shard-bmg: NOTRUN -> [SKIP][3] ([Intel XE#367])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_ccs@bad-rotation-90-y-tiled-ccs:
- shard-bmg: NOTRUN -> [SKIP][4] ([Intel XE#2887]) +2 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_chamelium_audio@hdmi-audio:
- shard-bmg: NOTRUN -> [SKIP][5] ([Intel XE#2252]) +1 other test skip
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-5/igt@[email protected]

* igt@kms_chamelium_color@gamma:
- shard-bmg: NOTRUN -> [SKIP][6] ([Intel XE#2325] / [Intel XE#7358])
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_content_protection@dp-mst-lic-type-0-hdcp14:
- shard-bmg: NOTRUN -> [SKIP][7] ([Intel XE#6974])
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_cursor_crc@cursor-onscreen-256x85:
- shard-bmg: NOTRUN -> [SKIP][8] ([Intel XE#2320]) +2 other tests skip
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_dp_linktrain_fallback@dsc-fallback:
- shard-bmg: NOTRUN -> [SKIP][9] ([Intel XE#4331] / [Intel XE#7227])
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_dsc@dsc-fractional-bpp-with-bpc-bigjoiner:
- shard-bmg: NOTRUN -> [SKIP][10] ([Intel XE#8265])
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_fbc_dirty_rect@fbc-dirty-rectangle-dirtyfb-tests:
- shard-bmg: NOTRUN -> [SKIP][11] ([Intel XE#4422] / [Intel XE#7442])
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-5/igt@[email protected]

* igt@kms_feature_discovery@chamelium:
- shard-bmg: NOTRUN -> [SKIP][12] ([Intel XE#2372] / [Intel XE#7359])
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling:
- shard-bmg: NOTRUN -> [SKIP][13] ([Intel XE#7178] / [Intel XE#7351]) +1 other test skip
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling.html

* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling:
- shard-bmg: NOTRUN -> [SKIP][14] ([Intel XE#7178] / [Intel XE#7349])
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling.html

* igt@kms_frontbuffer_tracking@drrs-rgb101010-draw-blt:
- shard-bmg: NOTRUN -> [SKIP][15] ([Intel XE#2311]) +13 other tests skip
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- shard-bmg: NOTRUN -> [SKIP][16] ([Intel XE#4141]) +3 other tests skip
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcdrrshdr-argb161616f-draw-render:
- shard-bmg: NOTRUN -> [SKIP][17] ([Intel XE#7061]) +4 other tests skip
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-5/igt@[email protected]

* igt@kms_frontbuffer_tracking@psrhdr-2p-primscrn-cur-indfb-draw-blt:
- shard-bmg: NOTRUN -> [SKIP][18] ([Intel XE#2313]) +18 other tests skip
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@kms_frontbuffer_tracking@psrhdr-2p-primscrn-cur-indfb-draw-blt.html

* igt@kms_hdr@invalid-hdr:
- shard-bmg: [PASS][19] -> [SKIP][20] ([Intel XE#1503])
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-10/igt@[email protected]

* igt@kms_hdr@invalid-hdr@pipe-a-hdmi-a-3-xrgb2101010:
- shard-bmg: [PASS][21] -> [SKIP][22] ([Intel XE#7922]) +1 other test skip
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-8/igt@kms_hdr@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-10/igt@kms_hdr@[email protected]

* igt@kms_hdr@static-toggle@pipe-a-hdmi-a-3-xrgb16161616f:
- shard-bmg: [PASS][23] -> [SKIP][24] ([Intel XE#7915]) +1 other test skip
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-4/igt@kms_hdr@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-7/igt@kms_hdr@[email protected]

* igt@kms_joiner@basic-max-non-joiner:
- shard-bmg: NOTRUN -> [SKIP][25] ([Intel XE#4298] / [Intel XE#5873])
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_plane@pixel-format-4-tiled-dg2-rc-ccs-modifier:
- shard-bmg: NOTRUN -> [SKIP][26] ([Intel XE#7283])
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_psr2_sf@pr-cursor-plane-move-continuous-sf:
- shard-bmg: NOTRUN -> [SKIP][27] ([Intel XE#1489])
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_psr@fbc-pr-suspend:
- shard-bmg: NOTRUN -> [SKIP][28] ([Intel XE#2234] / [Intel XE#2850]) +2 other tests skip
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_rotation_crc@bad-pixel-format:
- shard-bmg: NOTRUN -> [SKIP][29] ([Intel XE#3904] / [Intel XE#7342]) +1 other test skip
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_setmode@basic-clone-single-crtc:
- shard-bmg: NOTRUN -> [SKIP][30] ([Intel XE#1435])
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-5/igt@[email protected]

* igt@kms_vrr@flip-basic:
- shard-bmg: NOTRUN -> [SKIP][31] ([Intel XE#1499])
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@xe_eudebug@discovery-race-sigint:
- shard-bmg: NOTRUN -> [SKIP][32] ([Intel XE#7636]) +2 other tests skip
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@xe_exec_basic@multigpu-many-execqueues-many-vm-null-defer-bind:
- shard-bmg: NOTRUN -> [SKIP][33] ([Intel XE#2322] / [Intel XE#7372]) +1 other test skip
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@xe_exec_basic@multigpu-many-execqueues-many-vm-null-defer-bind.html

* igt@xe_exec_fault_mode@twice-multi-queue:
- shard-bmg: NOTRUN -> [SKIP][34] ([Intel XE#7136]) +1 other test skip
[34]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@xe_exec_multi_queue@two-queues-priority-smem:
- shard-bmg: NOTRUN -> [SKIP][35] ([Intel XE#6874]) +5 other tests skip
[35]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@xe_exec_threads@threads-multi-queue-mixed-userptr-invalidate:
- shard-bmg: NOTRUN -> [SKIP][36] ([Intel XE#7138]) +2 other tests skip
[36]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@xe_exec_threads@threads-multi-queue-mixed-userptr-invalidate.html

* igt@xe_multigpu_svm@mgpu-atomic-op-prefetch:
- shard-bmg: NOTRUN -> [SKIP][37] ([Intel XE#6964])
[37]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@xe_page_reclaim@binds-1g-partial:
- shard-bmg: NOTRUN -> [SKIP][38] ([Intel XE#7793])
[38]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@xe_pm@d3cold-i2c:
- shard-bmg: NOTRUN -> [SKIP][39] ([Intel XE#5694] / [Intel XE#7370])
[39]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-5/igt@[email protected]

* igt@xe_pxp@pxp-stale-bo-bind-post-suspend:
- shard-bmg: NOTRUN -> [SKIP][40] ([Intel XE#4733] / [Intel XE#7417])
[40]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@xe_query@multigpu-query-topology-l3-bank-mask:
- shard-bmg: NOTRUN -> [SKIP][41] ([Intel XE#944])
[41]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@xe_vm@large-userptr-split-misaligned-binds-33554432:
- shard-bmg: NOTRUN -> [ABORT][42] ([Intel XE#8007])
[42]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-8/igt@[email protected]

#### Possible fixes ####

* igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic:
- shard-bmg: [INCOMPLETE][43] ([Intel XE#8151]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-3/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-2/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@a-edp1:
- shard-lnl: [FAIL][45] ([Intel XE#301]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-lnl-1/igt@kms_flip@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-lnl-5/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1:
- shard-lnl: [FAIL][47] ([Intel XE#301] / [Intel XE#3149]) -> [PASS][48] +1 other test pass
[47]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-lnl-1/igt@kms_flip@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-lnl-5/igt@kms_flip@[email protected]

* igt@xe_evict@evict-beng-mixed-many-threads-small:
- shard-bmg: [INCOMPLETE][49] ([Intel XE#6321]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-1/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-5/igt@[email protected]

* igt@xe_wedged@wedged-mode-toggle:
- shard-bmg: [ABORT][51] ([Intel XE#8007]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-8/igt@[email protected]

#### Warnings ####

* igt@kms_cursor_legacy@cursorb-vs-flipb-atomic-transitions:
- shard-lnl: [SKIP][53] ([Intel XE#309] / [Intel XE#7343] / [Intel XE#7935]) -> [SKIP][54] ([Intel XE#309] / [Intel XE#7343])
[53]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-lnl-8/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-lnl-6/igt@[email protected]

* igt@kms_hdr@brightness-with-hdr:
- shard-bmg: [SKIP][55] ([Intel XE#3544] / [Intel XE#7915] / [Intel XE#7916]) -> [SKIP][56] ([Intel XE#3544] / [Intel XE#7916])
[55]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-2/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-9/igt@[email protected]

* igt@kms_hdr@brightness-with-hdr@pipe-a-hdmi-a-3-xrgb16161616f:
- shard-bmg: [SKIP][57] ([Intel XE#7915]) -> [SKIP][58] ([Intel XE#7916]) +1 other test skip
[57]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-2/igt@kms_hdr@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-9/igt@kms_hdr@[email protected]

* igt@kms_tiled_display@basic-test-pattern:
- shard-bmg: [FAIL][59] ([Intel XE#1729] / [Intel XE#7424]) -> [SKIP][60] ([Intel XE#2426] / [Intel XE#5848])
[59]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-10/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-8/igt@[email protected]

* igt@kms_tiled_display@basic-test-pattern-with-chamelium:
- shard-bmg: [SKIP][61] ([Intel XE#2426] / [Intel XE#5848]) -> [SKIP][62] ([Intel XE#2509] / [Intel XE#7437])
[61]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b/shard-bmg-6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/shard-bmg-1/igt@[email protected]

[Intel XE#1124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1124
[Intel XE#1435]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1435
[Intel XE#1489]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1489
[Intel XE#1499]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1499
[Intel XE#1503]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1503
[Intel XE#1729]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1729
[Intel XE#2234]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2234
[Intel XE#2252]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2252
[Intel XE#2311]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2311
[Intel XE#2313]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2313
[Intel XE#2320]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2320
[Intel XE#2322]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2322
[Intel XE#2325]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2325
[Intel XE#2327]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2327
[Intel XE#2372]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2372
[Intel XE#2426]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2426
[Intel XE#2509]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2509
[Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850
[Intel XE#2887]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2887
[Intel XE#301]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/301
[Intel XE#309]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/309
[Intel XE#3149]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3149
[Intel XE#3544]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3544
[Intel XE#367]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/367
[Intel XE#3904]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3904
[Intel XE#4141]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4141
[Intel XE#4298]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4298
[Intel XE#4331]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4331
[Intel XE#4422]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4422
[Intel XE#4733]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4733
[Intel XE#5694]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5694
[Intel XE#5848]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5848
[Intel XE#5873]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5873
[Intel XE#6321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6321
[Intel XE#6874]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6874
[Intel XE#6964]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6964
[Intel XE#6974]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6974
[Intel XE#7061]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7061
[Intel XE#7136]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7136
[Intel XE#7138]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7138
[Intel XE#7178]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7178
[Intel XE#7227]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7227
[Intel XE#7283]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7283
[Intel XE#7342]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7342
[Intel XE#7343]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7343
[Intel XE#7349]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7349
[Intel XE#7351]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7351
[Intel XE#7358]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7358
[Intel XE#7359]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7359
[Intel XE#7370]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7370
[Intel XE#7372]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7372
[Intel XE#7417]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7417
[Intel XE#7424]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7424
[Intel XE#7437]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7437
[Intel XE#7442]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7442
[Intel XE#7636]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7636
[Intel XE#7793]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7793
[Intel XE#7915]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7915
[Intel XE#7916]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7916
[Intel XE#7922]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7922
[Intel XE#7935]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7935
[Intel XE#8007]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8007
[Intel XE#8151]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8151
[Intel XE#8265]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8265
[Intel XE#944]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/944

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

* Linux: xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b -> xe-pw-163970v6

IGT_8959: 77337ca2d2dd470f3b32f1cf4760b0e79a52e2b7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-5243-eebb2a1700eaa412ee8e0843bafce7bc5025638b: eebb2a1700eaa412ee8e0843bafce7bc5025638b
xe-pw-163970v6: 163970v6

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163970v6/index.html

maintainer
#17 lore raw
In reply to Thomas Hellström

Hello,

Quoted 5 lines · Thomas Hellström

When writing a "max" limit lower than the current usage, the existing code silently failed. This series aims to improve on that by returning -EBUSY on failure and also attempt to synchronously reclaim device memory to push the usage under the new max limit to avoid the error.

The canonical behavior for cgroup2 would be not failing the write at all even when the usage can't be brought down below the new max. Updating the target configuration and tracking the current usage are separate operations. The former should just set max and trigger reclaim and a writer should not assume that a successful write indicates that the usage is below the written max value.

Thanks.

Signature · 1 line
tejun
maintainer
#18 lore raw
Quoted 6 lines · Tejun Heo

The canonical behavior for cgroup2 would be not failing the write at all even when the usage can't be brought down below the new max. Updating the target configuration and tracking the current usage are separate operations. The former should just set max and trigger reclaim and a writer should not assume that a successful write indicates that the usage is below the written max value.

Sent too early. One of the reasons is that cgroup is hierarchical and there can be multiple delegation layers and if you tie application of configuration to immediate enforcement, some hierarchical control actions become racy and awkward.

Here's an example: Imagine a system agent trying to lower usage in a subtree which contains multiple delegated containers. If max can be set below what reclaim can achieve immediately, it can just set the max and if the usage is still too high, can go around and e.g. kill some of the containers. If max write fails, it'd have to kill and then try again and inbetween someone else might push up the usage.

Thanks.

Signature · 1 line
tejun
#19 lore raw
Quoted 13 lines · Tejun Heo
Quoted 6 lines · Tejun Heo

The canonical behavior for cgroup2 would be not failing the write at all even when the usage can't be brought down below the new max. Updating the target configuration and tracking the current usage are separate operations. The former should just set max and trigger reclaim and a writer should not assume that a successful write indicates that the usage is below the written max value.

Sent too early. One of the reasons is that cgroup is hierarchical and there can be multiple delegation layers and if you tie application of configuration to immediate enforcement, some hierarchical control actions become racy and awkward.

Quoted 11 lines

Here's an example: Imagine a system agent trying to lower usage in a subtree which contains multiple delegated containers. If max can be set below what reclaim can achieve immediately, it can just set the max and if the usage is still too high, can go around and e.g. kill some of the containers. If max write fails, it'd have to kill and then try again and inbetween someone else might push up the usage.

Thanks.

Signature · 1 line
tejun

Hi, Tejun.

As far as I understood the patchset, it doesn't fail the write if it fails to reclaim. It sets the new max, then, if the write is blocking, starts reclaim and eventually returns after multiple attempts. But it still returns success.

So I believe this is behaving as you would expect.

Regards.
Cascardo.

#11 lore raw

Re: [PATCH v6 6/6] drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

In reply to Thomas Hellström
Quoted 34 lines · Thomas Hellström

Register the VRAM manager with the dmem cgroup reclaim infrastructure so that lowering dmem.max below current VRAM usage triggers TTM eviction rather than failing with -EBUSY.

Guard place->flags in amdgpu_ttm_bo_eviction_valuable() against NULL, as the TTM reclaim path passes a NULL place in cgroup drain mode.

v3:
- Rebased on fix for uninitialized list and buddy allocator on the drmm_cgroup_register_region() error path.

v5:
- Rebased on the introduction of struct dmem_cgroup_init.
- Clear the reclaim callback in amdgpu_vram_mgr_fini() to prevent use-after-free if cgroup reclaim is triggered after driver unbind while userspace holds an open DRM file descriptor. (Sashiko-bot)
- Switch from drmm_cgroup_register_region() to the raw dmem_cgroup_register_region() and store the region in amdgpu_vram_mgr.cg_region. Call dmem_cgroup_unregister_region() in amdgpu_vram_mgr_fini() after ttm_resource_manager_evict_all() to drain in-flight reclaim callbacks, and clear man->cg afterwards. This is required because amdgpu's vram manager fini is called explicitly during driver unbind, which may precede the DRM device release and thus precede any drmm-based cleanup. (Sashiko-bot)

v6:
- Fix mgr->cg_region never being assigned, so dmem_cgroup_unregister_region() in fini silently no-ops on NULL and leaks the region. (Sashiko-bot)
- Reorder fini to call set_used(false) and evict_all() before dmem_cgroup_unregister_region(), so ttm_resource_free() can uncharge via man->cg during eviction; clear man->cg after unregister. (Sashiko-bot)

Quoted 2 lines
Assisted-by GitHub_Copilot:claude-sonnet-4.6

Hi, Thomas.

I needed the following fixup for this. Otherwise, it regresses on the dmem region name.

Regards.
Cascardo

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +2 -1
index 2250bab0970d..d93bb88e8b25 100644
@@ -942,7 +942,8 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 					     .size = adev->gmc.real_vram_size,
 					     .ops = &amdgpu_vram_mgr_dmem_ops,
 					     .reclaim_priv = man,
-					 }, "vram");
+					 }, "drm/%s/vram",
+					    adev_to_drm(adev)->unique);
 	if (IS_ERR(cg))
 		return PTR_ERR(cg);
 
Quoted 98 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 31 ++++++++++++++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h |  2 ++
 3 files changed, 28 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
index 2740de94e93c..8cbcd33f51a5 100644
@@ -1488,7 +1488,7 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
 	dma_resv_for_each_fence(&resv_cursor, bo->base.resv,
 				DMA_RESV_USAGE_BOOKKEEP, f) {
 		if (amdkfd_fence_check_mm(f, current->mm) &&
-		    !(place->flags & TTM_PL_FLAG_CONTIGUOUS))
+		    !(place && (place->flags & TTM_PL_FLAG_CONTIGUOUS)))
 			return false;
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +25 -6
index 08f05c3aed1d..2250bab0970d 100644
@@ -906,6 +906,10 @@ static const struct ttm_resource_manager_func amdgpu_vram_mgr_func = {
 	.debug	= amdgpu_vram_mgr_debug
 };
 
+static const struct dmem_cgroup_ops amdgpu_vram_mgr_dmem_ops = {
+	.reclaim = ttm_resource_manager_dmem_reclaim,
+};
+
 /**
  * amdgpu_vram_mgr_init - init VRAM manager and DRM MM
  *
@@ -917,6 +921,7 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 {
 	struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr;
 	struct ttm_resource_manager *man = &mgr->manager;
+	struct dmem_cgroup_region *cg;
 	int err;
 
 	ttm_resource_manager_init(man, &adev->mman.bdev,
@@ -933,12 +938,16 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev)
 	if (err)
 		return err;
 
-	man->cg = drmm_cgroup_register_region(adev_to_drm(adev), "vram",
-					      &(struct dmem_cgroup_init){
-						.size = adev->gmc.real_vram_size,
-					      });
-	if (IS_ERR(man->cg))
-		return PTR_ERR(man->cg);
+	cg = dmem_cgroup_register_region(&(struct dmem_cgroup_init){
+					     .size = adev->gmc.real_vram_size,
+					     .ops = &amdgpu_vram_mgr_dmem_ops,
+					     .reclaim_priv = man,
+					 }, "vram");
+	if (IS_ERR(cg))
+		return PTR_ERR(cg);
+
+	mgr->cg_region = cg;
+	ttm_resource_manager_set_dmem_region(man, cg);
 
 	ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_VRAM, &mgr->manager);
 	ttm_resource_manager_set_used(man, true);
@@ -966,6 +975,16 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device *adev)
 	if (ret)
 		return;
 
+	/*
+	 * Drain any in-flight dmem cgroup reclaim callbacks and remove the
+	 * region from the global list.  This must happen after evict_all()
+	 * so that ttm_resource_free() can still uncharge via man->cg while
+	 * BOs are being evicted.
+	 */
+	dmem_cgroup_unregister_region(mgr->cg_region);
+	mgr->cg_region = NULL;
+	man->cg = NULL;
+
 	mutex_lock(&mgr->lock);
 	list_for_each_entry_safe(rsv, temp, &mgr->reservations_pending, blocks)
 		kfree(rsv);
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h +2 -0
index 429a21a2e9b2..07103cddb335 100644
@@ -36,6 +36,8 @@ struct amdgpu_vram_mgr {
 	atomic64_t vis_usage;
 	u64 default_page_size;
 	struct list_head allocated_vres_list;
+	/** @cg_region: dmem cgroup region for VRAM; unregistered in fini. */
+	struct dmem_cgroup_region *cg_region;
 };
 
 struct amdgpu_vres_task {
Signature · 1 line
2.54.0
maintainer
#20 lore raw
In reply to Thadeu Lima de Souza Cascardo
Quoted 6 lines · Thadeu Lima de Souza Cascardo

As far as I understood the patchset, it doesn't fail the write if it fails to reclaim. It sets the new max, then, if the write is blocking, starts reclaim and eventually returns after multiple attempts. But it still returns success.

So I believe this is behaving as you would expect.

I was alarmed by the EBUSY mention similarly to Tejun but then I couldn't find it in pre-patch (840ef6c78e6a2) nor in patched (v5) code. Please make sure the EBUSY return behavior is not introduced (essentially match memory.max behavior) and that the accompanying message refers up to date code ;-)

Michal

#21 lore raw
Quoted 8 lines · Michal Koutný
Quoted 6 lines · Thadeu Lima de Souza Cascardo

As far as I understood the patchset, it doesn't fail the write if it fails to reclaim. It sets the new max, then, if the write is blocking, starts reclaim and eventually returns after multiple attempts. But it still returns success.

So I believe this is behaving as you would expect.

Quoted 7 lines

I was alarmed by the EBUSY mention similarly to Tejun but then I couldn't find it in pre-patch (840ef6c78e6a2) nor in patched (v5) code. Please make sure the EBUSY return behavior is not introduced (essentially match memory.max behavior) and that the accompanying message refers up to date code ;-)

Michal

I think this is a reference to the fact that right now writing to dmem.max calls page_counter_set_max, which will return -EBUSY and fail to change the max value. It is just that we are not returning that error today to userspace (a fix I have submitted back in April).

So, this patchset by Thomas is setting max, and, then, if it is a blocking write, tries to evict on a best-effort basis, and returns success after a few attempts, still setting max to the written value.

Cascardo.

author maintainer
#12 lore raw

Re: [PATCH v6 6/6] drm/amdgpu: Wire up dmem cgroup reclaim for VRAM manager

In reply to Thadeu Lima de Souza Cascardo

Hi,

Quoted 41 lines · Thadeu Lima de Souza Cascardo
Quoted 37 lines · Thomas Hellström

Register the VRAM manager with the dmem cgroup reclaim infrastructure
so that lowering dmem.max below current VRAM usage triggers TTM eviction rather than failing with -EBUSY.

Guard place->flags in amdgpu_ttm_bo_eviction_valuable() against NULL,
as the TTM reclaim path passes a NULL place in cgroup drain mode.

v3:
- Rebased on fix for uninitialized list and buddy allocator on the drmm_cgroup_register_region() error path.

v5:
- Rebased on the introduction of struct dmem_cgroup_init.
- Clear the reclaim callback in amdgpu_vram_mgr_fini() to prevent use-after-free if cgroup reclaim is triggered after driver unbind while userspace holds an open DRM file descriptor. (Sashiko-bot)
- Switch from drmm_cgroup_register_region() to the raw dmem_cgroup_register_region() and store the region in amdgpu_vram_mgr.cg_region. Call dmem_cgroup_unregister_region() in amdgpu_vram_mgr_fini() after ttm_resource_manager_evict_all() to drain in-flight reclaim callbacks, and clear man->cg afterwards.
  This is required because amdgpu's vram manager fini is called explicitly during driver unbind, which may precede the DRM device release and thus precede any drmm-based cleanup. (Sashiko-bot)

v6:
- Fix mgr->cg_region never being assigned, so dmem_cgroup_unregister_region() in fini silently no-ops on NULL and leaks the region. (Sashiko-bot)
- Reorder fini to call set_used(false) and evict_all() before dmem_cgroup_unregister_region(), so ttm_resource_free() can uncharge via man->cg during eviction; clear man->cg after unregister. (Sashiko-bot)

Quoted 2 lines
Assisted-by GitHub_Copilot:claude-sonnet-4.6
Quoted 9 lines

Hi, Thomas.

I needed the following fixup for this. Otherwise, it regresses on the dmem
region name.

Regards.
Cascardo

Thanks. Yeah, I noted Sashiko saw this too. Updated version out soon.

/Thomas

Quoted 141 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
index 2250bab0970d..d93bb88e8b25 100644
@@ -942,7 +942,8 @@ int amdgpu_vram_mgr_init(struct amdgpu_device
 *adev)

       .size = adev-

Quoted 1 line

gmc.real_vram_size,

       .ops = &amdgpu_vram_mgr_dmem_ops,
       .reclaim_priv = man,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +2 -1
-					 }, "vram");
+					 }, "drm/%s/vram",
+					    adev_to_drm(adev)-
Quoted 1 line

unique);

  if (IS_ERR(cg))
  return PTR_ERR(cg);

Quoted 120 lines

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c      |  2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 31
++++++++++++++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h |  2 ++

 3 files changed, 28 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -0
index 2740de94e93c..8cbcd33f51a5 100644
@@ -1488,7 +1488,7 @@ static bool
 amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
  	dma_resv_for_each_fence(&resv_cursor, bo->base.resv,
  				DMA_RESV_USAGE_BOOKKEEP, f) {

  if (amdkfd_fence_check_mm(f, current->mm) &&

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
-		    !(place->flags & TTM_PL_FLAG_CONTIGUOUS))
+		    !(place && (place->flags &

TTM_PL_FLAG_CONTIGUOUS)))
  return false;
  }

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
index 08f05c3aed1d..2250bab0970d 100644
@@ -906,6 +906,10 @@ static const struct ttm_resource_manager_func
 amdgpu_vram_mgr_func = {

  .debug = amdgpu_vram_mgr_debug
 };

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4 -0
+static const struct dmem_cgroup_ops amdgpu_vram_mgr_dmem_ops = {
+	.reclaim = ttm_resource_manager_dmem_reclaim,
+};
+

 /**
  * amdgpu_vram_mgr_init - init VRAM manager and DRM MM *

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
@@ -917,6 +921,7 @@ int amdgpu_vram_mgr_init(struct amdgpu_device
 *adev)
  {
  	struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr;
  	struct ttm_resource_manager *man = &mgr->manager;
+	struct dmem_cgroup_region *cg;
  	int err;


  ttm_resource_manager_init(man, &adev->mman.bdev,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
@@ -933,12 +938,16 @@ int amdgpu_vram_mgr_init(struct amdgpu_device
 *adev)
  	if (err)
  		return err;

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -1
-	man->cg = drmm_cgroup_register_region(adev_to_drm(adev),

"vram",

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -1
-					      &(struct

dmem_cgroup_init){

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -1
-						.size = adev-
Quoted 1 line

gmc.real_vram_size,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -3
-					      });
-	if (IS_ERR(man->cg))
-		return PTR_ERR(man->cg);
+	cg = dmem_cgroup_register_region(&(struct

dmem_cgroup_init){

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
+					     .size = adev-
Quoted 1 line

gmc.real_vram_size,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
+					     .ops =

&amdgpu_vram_mgr_dmem_ops,

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +7 -0
+					     .reclaim_priv = man,
+					 }, "vram");
+	if (IS_ERR(cg))
+		return PTR_ERR(cg);
+
+	mgr->cg_region = cg;
+	ttm_resource_manager_set_dmem_region(man, cg);


  ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_VRAM, &mgr->manager);
  ttm_resource_manager_set_used(man, true);

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +0 -0
@@ -966,6 +975,16 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device
 *adev)
  	if (ret)
  		return;

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +2 -0
+	/*
+	 * Drain any in-flight dmem cgroup reclaim callbacks and

remove the

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
+	 * region from the global list.  This must happen after

evict_all()

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1 -0
+	 * so that ttm_resource_free() can still uncharge via man-
Quoted 1 line

cg while

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +6 -0
+	 * BOs are being evicted.
+	 */
+	dmem_cgroup_unregister_region(mgr->cg_region);
+	mgr->cg_region = NULL;
+	man->cg = NULL;
+

  mutex_lock(&mgr->lock);
  list_for_each_entry_safe(rsv, temp, &mgr-

Quoted 1 line

reservations_pending, blocks)

  kfree(rsv);

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h +1 -0
index 429a21a2e9b2..07103cddb335 100644
@@ -36,6 +36,8 @@ struct amdgpu_vram_mgr {
  	atomic64_t vis_usage;
  	u64 default_page_size;
  	struct list_head allocated_vres_list;
+	/** @cg_region: dmem cgroup region for VRAM; unregistered

in fini. */

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h +1 -0
+	struct dmem_cgroup_region *cg_region;

 };

 struct amdgpu_vres_task {

Signature · 1 line
2.54.0