* [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy
@ 2026-11-24 6:21 Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 01/11] drm/ttm: Add NUMA placement policy to ttm_operation_ctx Himal Prasad Ghimiray
` (11 more replies)
0 siblings, 12 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
The backing pages of an Xe system memory BO are allocated on the device
local node (dev_to_node()), or on the allocating CPU's node when the
device has none. That is fine when CPU and GPU access a buffer from the
same place, but not in general:
- On multi-socket systems, and where the GPU's PCIe/CXL link attaches
to a different node than the threads using a buffer, the cost of
accessing a BO depends on which node backs its pages. The device
local node is not always the best choice.
- A runtime often knows where a BO should live: the node of the CPU
threads producing or consuming it, the node closest to the link the
GPU uses, or a set of nodes chosen to balance memory bandwidth. Today
it has no way to express that for driver allocated system memory.
- mbind()/set_mempolicy() do not help: BO pages are allocated by the
driver, not through the task's fault path, and BO CPU mappings are
VM_PFNMAP.
This series lets userspace select a host NUMA memory policy per BO at
creation time, using the same vocabulary as mbind(): a mode and a
nodemask.
UAPI:
- New DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY GEM_CREATE extension
with struct drm_xe_gem_create_mempolicy { mode, flags, nodemask,
maxnode }. The nodemask is a user pointer to an unsigned long array
of maxnode bits, as for mbind().
- Modes:
- PREFERRED: one node, best effort, falls back under memory pressure
(like MPOL_PREFERRED).
- BIND: only the nodes in the mask, never falls back outside it, so
the allocation fails with -ENOMEM when they are exhausted (like
MPOL_BIND).
- INTERLEAVE: pages spread round-robin across the nodes in the mask
(like MPOL_INTERLEAVE).
- Not attaching the extension keeps the current default placement.
- Unknown modes, non-zero flags or pad, empty masks, bits at or above
maxnode, nodes without memory, PREFERRED with more than one node, and
BOs that can't be placed in system memory are rejected with -EINVAL.
- The policy is captured at creation and applied whenever the backing
pages are allocated, including late populate and shrinker restore.
- New DRM_XE_DEVICE_QUERY_MEMPOLICY reports a bitmask of supported
modes, so userspace can probe support before creating BOs. A mode the
device cannot apply is rejected with -EOPNOTSUPP. Further modes, such
as weighted interleave, can be added as new mode values and reported
through the same query.
TTM:
- struct ttm_operation_ctx gains numa_info { policy, nodes }. The
default TTM_NUMA_POLICY_NONE is zero, so existing zero-initialized
users are unaffected.
- __ttm_pool_alloc() honors the policy per allocation:
- PREFERRED allocates from the single node and may fall back.
- BIND tries the mask nodes nearest first from the local node, with
__GFP_THISNODE so it never leaves the mask.
- INTERLEAVE picks the node for each chunk from its page offset,
scaled by the allocation order as core mm does for large folios.
If that node is short, the other mask nodes are tried nearest first
before the order is lowered.
- Pool caches, accounting and the shrinker are already per node. Free
now trims every over-limit node instead of only the pool's default
node.
- dma_alloc pools cannot honor a policy and return -EOPNOTSUPP.
Why a policy in ttm_operation_ctx rather than one ttm_pool per node in
the driver:
The NUMA placement is a property of each allocation, not of the pool.
TTM already tracks pages per node (per-node LRUs in the pool caches,
per-node shrinker, per-node cache limits). Carrying the policy in the
operation context reaches populate, restore and backup through the
existing TTM helpers, without a second NUMA aware entry point.
One pool per node in the driver does not cover this:
- INTERLEAVE spreads a single BO across nodes, which a pool bound to
one node cannot do.
- TTM core helpers (ttm_tt_restore(), ttm_tt_backup(), pool debugfs)
all use the device pool. The driver would have to bypass them for
populate, restore, backup and free.
- For dma_alloc pools, N pools mean N separate page caches that can't
share pages.
- Every TTM driver that wants per-BO placement would have to duplicate
the same per-node pool handling.
amdgpu already creates one pool per memory partition only to select the
partition's node. It is converted to the operation context with
PREFERRED, after which no caller needs a per-pool node, so the nid
argument of ttm_pool_init() is dropped.
Changes since v1:
- v1 added ttm_pool_alloc_node(), ttm_tt_restore_node() and
ttm_pool_restore_and_alloc_node(). Christian asked for no secondary
NUMA aware path, so the placement is now carried in struct
ttm_operation_ctx and reaches the existing TTM helpers.
- Thomas asked for the interface to extend beyond a single node to the
other mempolicy modes, so the single node became a policy and a
nodemask, grouped in a numa_info sub-struct, adding BIND and
INTERLEAVE.
- The Xe UAPI moved from the DRM_XE_GEM_CREATE_SET_PROPERTY_NUMA_NODE
property to a dedicated mempolicy extension, plus a device query for
the supported modes.
- amdgpu converted from per-partition pools to the operation context,
and the nid argument of ttm_pool_init() removed.
- Per-node cache limits enforced on free.
- GEM_CREATE extensions are parsed once before BO creation through the
existing extension tables (Matt Auld).
- NUMA_NO_NODE is kept unresolved for alloc_pages_node() so memoryless
nodes still fall back to numa_mem_id() (sashiko).
v1: https://patchwork.freedesktop.org/series/177437/
Himal Prasad Ghimiray (11):
drm/ttm: Add NUMA placement policy to ttm_operation_ctx
drm/ttm: Add TTM_NUMA_POLICY_BIND
drm/ttm: Add TTM_NUMA_POLICY_INTERLEAVE
drm/ttm/pool: enforce per-node cache limits on free
drm/amdgpu: Use ttm_operation_ctx numa_info instead of per-partition
pools
drm/ttm/pool: Drop the nid argument from ttm_pool_init()
drm/xe/uapi: Add GEM_CREATE host NUMA mempolicy extension
drm/xe/bo: Carry a per-BO host NUMA mempolicy
drm/xe/uapi: Wire up GEM_CREATE mempolicy extension handler
drm/xe/uapi: Add device query for supported host NUMA mempolicy modes
drm/xe: Implement the host NUMA mempolicy device query
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 78 ++------
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 -
drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 10 +-
drivers/gpu/drm/ttm/ttm_device.c | 9 +-
drivers/gpu/drm/ttm/ttm_pool.c | 221 +++++++++++++++++++--
drivers/gpu/drm/xe/tests/xe_bo.c | 12 +-
drivers/gpu/drm/xe/tests/xe_dma_buf.c | 4 +-
drivers/gpu/drm/xe/tests/xe_migrate.c | 8 +-
drivers/gpu/drm/xe/xe_bo.c | 229 ++++++++++++++++++----
drivers/gpu/drm/xe/xe_bo.h | 6 +-
drivers/gpu/drm/xe/xe_bo_types.h | 24 +++
drivers/gpu/drm/xe/xe_dma_buf.c | 3 +-
drivers/gpu/drm/xe/xe_query.c | 23 +++
include/drm/ttm/ttm_bo.h | 37 ++++
include/drm/ttm/ttm_pool.h | 4 +-
include/uapi/drm/xe_drm.h | 79 ++++++++
16 files changed, 610 insertions(+), 138 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [RFC v2 01/11] drm/ttm: Add NUMA placement policy to ttm_operation_ctx
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 02/11] drm/ttm: Add TTM_NUMA_POLICY_BIND Himal Prasad Ghimiray
` (10 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
The TTM pool already keeps its page caches, accounting and shrinker per
NUMA node, but always allocates on the pool's default node. Add a
numa_info member to struct ttm_operation_ctx with a policy and a nodemask,
and honor it in __ttm_pool_alloc(), so both ttm_pool_alloc() and restore
of backed-up content can place pages according to the policy.
Add enum ttm_numa_policy with TTM_NUMA_POLICY_PREFERRED, which allocates
from the single node in the mask and may fall back to other nodes.
TTM_NUMA_POLICY_NONE is zero, so zero-initialized users keep the existing
behaviour.
dma-alloc pools can't honor a policy and return -EOPNOTSUPP. An empty
mask returns -EINVAL, and PREFERRED with a mask that is not exactly one
node returns -EINVAL.
v2:
- Replace ttm_pool_alloc_node(), ttm_tt_restore_node() and
ttm_pool_restore_and_alloc_node() with a node in struct
ttm_operation_ctx, instead of adding a second NUMA aware path
(Christian)
- Keep NUMA_NO_NODE unresolved for alloc_pages_node() so memoryless
nodes still fall back to numa_mem_id() (sashiko)
- Fix commit message claiming the pool helpers already take a nid
(sashiko)
- Group the NUMA fields in a numa_info sub-struct
- Replace the single node field with a policy and a nodemask, so other
mempolicy modes can be added (Thomas)
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/ttm/ttm_pool.c | 56 +++++++++++++++++++++++++++++-----
include/drm/ttm/ttm_bo.h | 30 ++++++++++++++++++
2 files changed, 79 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 1bf37023fed6..e17bd5c0eab3 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -158,9 +158,9 @@ static int ttm_pool_nid(struct ttm_pool *pool)
return nid;
}
-/* Allocate pages of size 1 << order with the given gfp_flags */
+/* Allocate pages of size 1 << order with the given gfp_flags on node @nid */
static struct page *ttm_pool_alloc_page(struct ttm_pool *pool, gfp_t gfp_flags,
- unsigned int order)
+ unsigned int order, int nid)
{
const unsigned int beneficial_order = ttm_pool_beneficial_order(pool);
unsigned long attr = DMA_ATTR_FORCE_CONTIGUOUS;
@@ -189,7 +189,7 @@ static struct page *ttm_pool_alloc_page(struct ttm_pool *pool, gfp_t gfp_flags,
}
if (!ttm_pool_uses_dma_alloc(pool)) {
- p = alloc_pages_node(pool->nid, gfp_flags, order);
+ p = alloc_pages_node(nid, gfp_flags, order);
if (p) {
p->private = order;
mod_lruvec_page_state(p, NR_GPU_ACTIVE, 1 << order);
@@ -780,11 +780,34 @@ static unsigned int ttm_pool_alloc_find_order(unsigned int highest,
return min_t(unsigned int, highest, __fls(alloc->remaining_pages));
}
+/* Validate the NUMA request in @ctx against @pool */
+static int ttm_pool_check_numa(struct ttm_pool *pool,
+ const struct ttm_operation_ctx *ctx)
+{
+ if (ctx->numa_info.policy == TTM_NUMA_POLICY_NONE)
+ return 0;
+
+ if (ttm_pool_uses_dma_alloc(pool))
+ return -EOPNOTSUPP;
+
+ if (!ctx->numa_info.nodes || nodes_empty(*ctx->numa_info.nodes))
+ return -EINVAL;
+
+ if (ctx->numa_info.policy == TTM_NUMA_POLICY_PREFERRED &&
+ nodes_weight(*ctx->numa_info.nodes) != 1)
+ return -EINVAL;
+
+ return 0;
+}
+
static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
const struct ttm_operation_ctx *ctx,
struct ttm_pool_alloc_state *alloc,
struct ttm_pool_tt_restore *restore)
{
+ /* pool->nid may be NUMA_NO_NODE, letting alloc_pages_node() pick */
+ int alloc_nid = pool->nid, take_nid = ttm_pool_nid(pool);
+ enum ttm_numa_policy policy = ctx->numa_info.policy;
enum ttm_caching page_caching;
gfp_t gfp_flags = GFP_USER;
pgoff_t caching_divide;
@@ -796,6 +819,12 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
WARN_ON(!alloc->remaining_pages || ttm_tt_is_populated(tt));
WARN_ON(alloc->dma_addr && !pool->dev);
+ if (policy != TTM_NUMA_POLICY_NONE) {
+ /* Start at the single node of the policy */
+ alloc_nid = first_node(*ctx->numa_info.nodes);
+ take_nid = alloc_nid;
+ }
+
if (tt->page_flags & TTM_TT_FLAG_ZERO_ALLOC)
gfp_flags |= __GFP_ZERO;
@@ -818,7 +847,7 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
p = NULL;
pt = ttm_pool_select_type(pool, page_caching, order);
if (pt && allow_pools)
- p = ttm_pool_type_take(pt, ttm_pool_nid(pool));
+ p = ttm_pool_type_take(pt, take_nid);
/*
* If that fails or previously failed, allocate from system.
@@ -829,7 +858,8 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
if (!p) {
page_caching = ttm_cached;
allow_pools = false;
- p = ttm_pool_alloc_page(pool, gfp_flags, order);
+ p = ttm_pool_alloc_page(pool, gfp_flags, order,
+ alloc_nid);
}
/* If that fails, lower the order if possible and retry. */
if (!p) {
@@ -888,16 +918,22 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
* Fill the ttm_tt object with pages and also make sure to DMA map them when
* necessary.
*
- * Returns: 0 on successe, negative error code otherwise.
+ * Returns: 0 on successe, -EOPNOTSUPP if @ctx requests a NUMA node on a
+ * dma-alloc pool, negative error code otherwise.
*/
int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
struct ttm_operation_ctx *ctx)
{
struct ttm_pool_alloc_state alloc;
+ int ret;
if (WARN_ON(ttm_tt_is_backed_up(tt)))
return -EINVAL;
+ ret = ttm_pool_check_numa(pool, ctx);
+ if (ret)
+ return ret;
+
ttm_pool_alloc_state_init(tt, &alloc);
return __ttm_pool_alloc(pool, tt, ctx, &alloc, NULL);
@@ -915,7 +951,9 @@ EXPORT_SYMBOL(ttm_pool_alloc);
* Fill the ttm_tt object with pages and also make sure to DMA map them when
* necessary. Read in backed-up content.
*
- * Returns: 0 on successe, negative error code otherwise.
+ * Returns: 0 on success, -EOPNOTSUPP if @ctx requests a NUMA placement on a
+ * dma-alloc pool, -EINVAL on an empty NUMA policy, negative error code
+ * otherwise.
*/
int ttm_pool_restore_and_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
const struct ttm_operation_ctx *ctx)
@@ -927,6 +965,10 @@ int ttm_pool_restore_and_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
if (WARN_ON(!ttm_tt_is_backed_up(tt)))
return -EINVAL;
+ ret = ttm_pool_check_numa(pool, ctx);
+ if (ret)
+ return ret;
+
if (!restore) {
gfp_t gfp = GFP_KERNEL | __GFP_NOWARN;
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 32791c4db2a9..5289c17cd449 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -35,6 +35,7 @@
#include <linux/kref.h>
#include <linux/list.h>
+#include <linux/nodemask.h>
#include "ttm_device.h"
@@ -51,6 +52,18 @@ struct ttm_resource;
struct ttm_resource_manager;
struct ttm_tt;
+/**
+ * enum ttm_numa_policy - NUMA placement policy for system pages
+ *
+ * @TTM_NUMA_POLICY_NONE: No policy. Use the pool default node.
+ * @TTM_NUMA_POLICY_PREFERRED: Prefer the single node in
+ * ttm_operation_ctx.numa_info.nodes. Falls back to other nodes.
+ */
+enum ttm_numa_policy {
+ TTM_NUMA_POLICY_NONE = 0,
+ TTM_NUMA_POLICY_PREFERRED,
+};
+
/**
* enum ttm_bo_type
*
@@ -187,6 +200,23 @@ struct ttm_operation_ctx {
* when multiple BOs share the same reservation object @resv.
*/
bool allow_res_evict;
+ /**
+ * @numa_info: NUMA placement of system pages. Not supported by
+ * dma-alloc pools.
+ */
+ struct {
+ /**
+ * @numa_info.policy: Policy applied to the allocation, see
+ * &enum ttm_numa_policy.
+ */
+ enum ttm_numa_policy policy;
+ /**
+ * @numa_info.nodes: Nodes the policy applies to. Must be set
+ * and non-empty when @policy is not TTM_NUMA_POLICY_NONE. Must
+ * contain exactly one node for TTM_NUMA_POLICY_PREFERRED.
+ */
+ const nodemask_t *nodes;
+ } numa_info;
/**
* @resv: Reservation object to be used together with
* @allow_res_evict.
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 02/11] drm/ttm: Add TTM_NUMA_POLICY_BIND
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 01/11] drm/ttm: Add NUMA placement policy to ttm_operation_ctx Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:29 ` sashiko-bot
2026-11-24 6:21 ` [RFC v2 03/11] drm/ttm: Add TTM_NUMA_POLICY_INTERLEAVE Himal Prasad Ghimiray
` (9 subsequent siblings)
11 siblings, 1 reply; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
Add TTM_NUMA_POLICY_BIND to enum ttm_numa_policy. With this policy,
system pages are allocated only from the nodes in
ttm_operation_ctx.numa_info.nodes, tried nearest first from the local
node (ttm_pool_nid()) by node_distance(), with ties broken by lower
node id.
__GFP_THISNODE is added for each node so the allocator never falls back
to nodes outside the policy, including for order 0 allocations. Failures
on all policy nodes use the existing order fallback and error path.
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/ttm/ttm_pool.c | 58 ++++++++++++++++++++++++++++++++--
include/drm/ttm/ttm_bo.h | 4 +++
2 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index e17bd5c0eab3..4a7775bfd0fb 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -780,6 +780,56 @@ static unsigned int ttm_pool_alloc_find_order(unsigned int highest,
return min_t(unsigned int, highest, __fls(alloc->remaining_pages));
}
+/*
+ * Try the nodes in @nodes once each, nearest first from the local node.
+ * __GFP_THISNODE prevents fallback to nodes outside the policy.
+ */
+static struct page *ttm_pool_alloc_bind_pass(struct ttm_pool *pool,
+ gfp_t gfp_flags, unsigned int order,
+ const nodemask_t *nodes)
+{
+ int local = ttm_pool_nid(pool);
+ nodemask_t todo = *nodes;
+ struct page *p = NULL;
+
+ while (!nodes_empty(todo)) {
+ int nid = first_node(todo), n;
+
+ for_each_node_mask(n, todo) {
+ if (node_distance(local, n) < node_distance(local, nid))
+ nid = n;
+ }
+ node_clear(nid, todo);
+
+ p = ttm_pool_alloc_page(pool, gfp_flags | __GFP_THISNODE, order,
+ nid);
+ if (p)
+ break;
+ }
+
+ return p;
+}
+
+/*
+ * Allocate pages of size 1 << order for TTM_NUMA_POLICY_BIND. Nodes with free
+ * memory are tried without reclaim first, then with the caller's gfp flags.
+ */
+static struct page *ttm_pool_alloc_bind(struct ttm_pool *pool, gfp_t gfp_flags,
+ unsigned int order,
+ const nodemask_t *nodes)
+{
+ const unsigned int beneficial_order = ttm_pool_beneficial_order(pool);
+ gfp_t nowait = (gfp_flags & ~__GFP_RECLAIM) | __GFP_NOWARN;
+ struct page *p;
+
+ p = ttm_pool_alloc_bind_pass(pool, nowait, order, nodes);
+ /* Orders without reclaim would repeat the first pass */
+ if (!p && (!order || !beneficial_order || order == beneficial_order))
+ p = ttm_pool_alloc_bind_pass(pool, gfp_flags, order, nodes);
+
+ return p;
+}
+
/* Validate the NUMA request in @ctx against @pool */
static int ttm_pool_check_numa(struct ttm_pool *pool,
const struct ttm_operation_ctx *ctx)
@@ -858,8 +908,12 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
if (!p) {
page_caching = ttm_cached;
allow_pools = false;
- p = ttm_pool_alloc_page(pool, gfp_flags, order,
- alloc_nid);
+ if (policy == TTM_NUMA_POLICY_BIND)
+ p = ttm_pool_alloc_bind(pool, gfp_flags, order,
+ ctx->numa_info.nodes);
+ else
+ p = ttm_pool_alloc_page(pool, gfp_flags, order,
+ alloc_nid);
}
/* If that fails, lower the order if possible and retry. */
if (!p) {
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 5289c17cd449..e7605e7e97ec 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -58,10 +58,14 @@ struct ttm_tt;
* @TTM_NUMA_POLICY_NONE: No policy. Use the pool default node.
* @TTM_NUMA_POLICY_PREFERRED: Prefer the single node in
* ttm_operation_ctx.numa_info.nodes. Falls back to other nodes.
+ * @TTM_NUMA_POLICY_BIND: Allocate only from the nodes in
+ * ttm_operation_ctx.numa_info.nodes, in ascending node order. Never falls
+ * back to other nodes.
*/
enum ttm_numa_policy {
TTM_NUMA_POLICY_NONE = 0,
TTM_NUMA_POLICY_PREFERRED,
+ TTM_NUMA_POLICY_BIND,
};
/**
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 03/11] drm/ttm: Add TTM_NUMA_POLICY_INTERLEAVE
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 01/11] drm/ttm: Add NUMA placement policy to ttm_operation_ctx Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 02/11] drm/ttm: Add TTM_NUMA_POLICY_BIND Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:32 ` sashiko-bot
2026-11-24 6:21 ` [RFC v2 04/11] drm/ttm/pool: enforce per-node cache limits on free Himal Prasad Ghimiray
` (8 subsequent siblings)
11 siblings, 1 reply; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
Add TTM_NUMA_POLICY_INTERLEAVE to enum ttm_numa_policy. With this policy,
each page allocation is rotated across the nodes in
ttm_operation_ctx.numa_info.nodes, so consecutive allocations are spread
over the policy nodes. The rotation index wraps around the node weight.
If the rotated node cannot provide a page of the requested order, the
other policy nodes are tried before the order is lowered. This keeps
high order pages when one node is short on memory, as core mm does for
interleaved THP.
The pool take and the allocation for an order use the same node, so
cached pages come from the node the allocation would have used.
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/ttm/ttm_pool.c | 91 ++++++++++++++++++++++++++++++++--
include/drm/ttm/ttm_bo.h | 3 ++
2 files changed, 91 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 4a7775bfd0fb..f140cc95e965 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -373,6 +373,38 @@ static struct page *ttm_pool_type_take(struct ttm_pool_type *pt, int nid)
return p;
}
+/* Return the node in @nodes nearest to @from, lowest node id on ties */
+static int ttm_pool_nearest_node(int from, const nodemask_t *nodes)
+{
+ int n, nid = first_node(*nodes);
+
+ for_each_node_mask(n, *nodes) {
+ if (node_distance(from, n) < node_distance(from, nid))
+ nid = n;
+ }
+
+ return nid;
+}
+
+/* Take from @nid first, then from the other nodes nearest to @nid first */
+static struct page *ttm_pool_type_take_interleave(struct ttm_pool_type *pt,
+ int nid, const nodemask_t *nodes)
+{
+ nodemask_t todo = *nodes;
+ struct page *p;
+
+ p = ttm_pool_type_take(pt, nid);
+ node_clear(nid, todo);
+ while (!p && !nodes_empty(todo)) {
+ int n = ttm_pool_nearest_node(nid, &todo);
+
+ node_clear(n, todo);
+ p = ttm_pool_type_take(pt, n);
+ }
+
+ return p;
+}
+
/* Initialize and add a pool type to the global shrinker list */
static void ttm_pool_type_init(struct ttm_pool_type *pt, struct ttm_pool *pool,
enum ttm_caching caching, unsigned int order)
@@ -780,6 +812,17 @@ static unsigned int ttm_pool_alloc_find_order(unsigned int highest,
return min_t(unsigned int, highest, __fls(alloc->remaining_pages));
}
+/* Return the @n-th node set in @nodes, wrapping around the node weight */
+static int ttm_pool_policy_nth_node(const nodemask_t *nodes, unsigned int n)
+{
+ int nid = first_node(*nodes);
+
+ for (n %= nodes_weight(*nodes); n; n--)
+ nid = next_node(nid, *nodes);
+
+ return nid;
+}
+
/*
* Try the nodes in @nodes once each, nearest first from the local node.
* __GFP_THISNODE prevents fallback to nodes outside the policy.
@@ -830,6 +873,31 @@ static struct page *ttm_pool_alloc_bind(struct ttm_pool *pool, gfp_t gfp_flags,
return p;
}
+/*
+ * Allocate pages of size 1 << order for TTM_NUMA_POLICY_INTERLEAVE. Try the
+ * interleaved node @nid first, then the other nodes in @nodes nearest to @nid
+ * first, as the per-node zonelist fallback of core mm does, before the caller
+ * lowers the order.
+ */
+static struct page *ttm_pool_alloc_interleave(struct ttm_pool *pool,
+ gfp_t gfp_flags, unsigned int order,
+ int nid, const nodemask_t *nodes)
+{
+ nodemask_t todo = *nodes;
+ struct page *p;
+
+ p = ttm_pool_alloc_page(pool, gfp_flags, order, nid);
+ node_clear(nid, todo);
+ while (!p && !nodes_empty(todo)) {
+ int n = ttm_pool_nearest_node(nid, &todo);
+
+ node_clear(n, todo);
+ p = ttm_pool_alloc_page(pool, gfp_flags, order, n);
+ }
+
+ return p;
+}
+
/* Validate the NUMA request in @ctx against @pool */
static int ttm_pool_check_numa(struct ttm_pool *pool,
const struct ttm_operation_ctx *ctx)
@@ -870,7 +938,7 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
WARN_ON(alloc->dma_addr && !pool->dev);
if (policy != TTM_NUMA_POLICY_NONE) {
- /* Start at the single node of the policy */
+ /* INTERLEAVE rotates below, others start at the first node */
alloc_nid = first_node(*ctx->numa_info.nodes);
take_nid = alloc_nid;
}
@@ -893,11 +961,24 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
order = ttm_pool_alloc_find_order(order, alloc)) {
struct ttm_pool_type *pt;
+ if (policy == TTM_NUMA_POLICY_INTERLEAVE) {
+ unsigned int slot = tt->num_pages - alloc->remaining_pages;
+
+ alloc_nid = ttm_pool_policy_nth_node(ctx->numa_info.nodes,
+ slot >> order);
+ take_nid = alloc_nid;
+ }
+
/* First, try to allocate a page from a pool if one exists. */
p = NULL;
pt = ttm_pool_select_type(pool, page_caching, order);
- if (pt && allow_pools)
- p = ttm_pool_type_take(pt, take_nid);
+ if (pt && allow_pools) {
+ if (policy == TTM_NUMA_POLICY_INTERLEAVE)
+ p = ttm_pool_type_take_interleave(pt, take_nid,
+ ctx->numa_info.nodes);
+ else
+ p = ttm_pool_type_take(pt, take_nid);
+ }
/*
* If that fails or previously failed, allocate from system.
@@ -911,6 +992,10 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
if (policy == TTM_NUMA_POLICY_BIND)
p = ttm_pool_alloc_bind(pool, gfp_flags, order,
ctx->numa_info.nodes);
+ else if (policy == TTM_NUMA_POLICY_INTERLEAVE)
+ p = ttm_pool_alloc_interleave(pool, gfp_flags,
+ order, alloc_nid,
+ ctx->numa_info.nodes);
else
p = ttm_pool_alloc_page(pool, gfp_flags, order,
alloc_nid);
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index e7605e7e97ec..d81b0cd6edfc 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -61,11 +61,14 @@ struct ttm_tt;
* @TTM_NUMA_POLICY_BIND: Allocate only from the nodes in
* ttm_operation_ctx.numa_info.nodes, in ascending node order. Never falls
* back to other nodes.
+ * @TTM_NUMA_POLICY_INTERLEAVE: Allocate chunks round-robin across the nodes
+ * in ttm_operation_ctx.numa_info.nodes.
*/
enum ttm_numa_policy {
TTM_NUMA_POLICY_NONE = 0,
TTM_NUMA_POLICY_PREFERRED,
TTM_NUMA_POLICY_BIND,
+ TTM_NUMA_POLICY_INTERLEAVE,
};
/**
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 04/11] drm/ttm/pool: enforce per-node cache limits on free
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (2 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 03/11] drm/ttm: Add TTM_NUMA_POLICY_INTERLEAVE Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 05/11] drm/amdgpu: Use ttm_operation_ctx numa_info instead of per-partition pools Himal Prasad Ghimiray
` (7 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
ttm_pool_free() only trims the cache of the pool's default node. With
pages allocated on other nodes, check each node's limit on free. The
per-node accounting and shrinker already exist in TTM.
v2:
- Update comment for the ttm_operation_ctx based node selection
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/ttm/ttm_pool.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index f140cc95e965..4ab37af0f1ba 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -1158,13 +1158,20 @@ int ttm_pool_restore_and_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
*/
void ttm_pool_free(struct ttm_pool *pool, struct ttm_tt *tt)
{
- int nid = ttm_pool_nid(pool);
+ int nid;
ttm_pool_free_range(pool, tt, tt->caching, 0, tt->num_pages);
- while (atomic_long_read(&allocated_pages[nid]) > pool_node_limit[nid]) {
- unsigned long diff = atomic_long_read(&allocated_pages[nid]) - pool_node_limit[nid];
- ttm_pool_shrink(nid, diff);
+ /*
+ * ttm_operation_ctx can place pages on a caller-requested node, so
+ * freed pages may land on any node's cache; enforce every node's limit.
+ */
+ for_each_node(nid) {
+ unsigned long cached;
+
+ while ((cached = atomic_long_read(&allocated_pages[nid])) >
+ pool_node_limit[nid])
+ ttm_pool_shrink(nid, cached - pool_node_limit[nid]);
}
}
EXPORT_SYMBOL(ttm_pool_free);
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 05/11] drm/amdgpu: Use ttm_operation_ctx numa_info instead of per-partition pools
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (3 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 04/11] drm/ttm/pool: enforce per-node cache limits on free Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:31 ` sashiko-bot
2026-11-24 6:21 ` [RFC v2 06/11] drm/ttm/pool: Drop the nid argument from ttm_pool_init() Himal Prasad Ghimiray
` (6 subsequent siblings)
11 siblings, 1 reply; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
On APUs with memory partitions amdgpu creates one TTM pool per
partition, only to get pages from the partition's NUMA node. With the
node now selectable per allocation through ttm_operation_ctx, drop the
extra pools and allocate from the device pool, setting numa_info to
TTM_NUMA_POLICY_PREFERRED with the partition's node on a local ctx copy.
The device pool keeps per-node page caches and per-node limits, so
pages are still cached and trimmed per node. No functional change
intended.
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 78 ++++++-------------------
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 -
2 files changed, 19 insertions(+), 60 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 0f86777250fc..fe10409e1d5b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -743,7 +743,7 @@ struct amdgpu_ttm_tt {
struct task_struct *usertask;
uint32_t userflags;
bool bound;
- int32_t pool_id;
+ int numa_node;
};
#define ttm_to_amdgpu_ttm_tt(ptr) container_of(ptr, struct amdgpu_ttm_tt, ttm)
@@ -1211,10 +1211,13 @@ static struct ttm_tt *amdgpu_ttm_tt_create(struct ttm_buffer_object *bo,
return NULL;
gtt->gobj = &bo->base;
- if (adev->gmc.mem_partitions && abo->xcp_id >= 0)
- gtt->pool_id = KFD_XCP_MEM_ID(adev, abo->xcp_id);
- else
- gtt->pool_id = abo->xcp_id;
+ gtt->numa_node = NUMA_NO_NODE;
+ if (adev->gmc.is_app_apu && adev->gmc.num_mem_partitions) {
+ int mem_id = KFD_XCP_MEM_ID(adev, abo->xcp_id);
+
+ if (mem_id >= 0)
+ gtt->numa_node = adev->gmc.mem_partitions[mem_id].numa.node;
+ }
if (abo->flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC)
caching = ttm_write_combined;
@@ -1241,7 +1244,9 @@ static int amdgpu_ttm_tt_populate(struct ttm_device *bdev,
{
struct amdgpu_device *adev = amdgpu_ttm_adev(bdev);
struct amdgpu_ttm_tt *gtt = ttm_to_amdgpu_ttm_tt(ttm);
- struct ttm_pool *pool;
+ /* ctx is shared by every BO of the operation; set the node locally */
+ struct ttm_operation_ctx node_ctx = *ctx;
+ nodemask_t preferred;
pgoff_t i;
int ret;
@@ -1256,11 +1261,13 @@ static int amdgpu_ttm_tt_populate(struct ttm_device *bdev,
if (ttm->page_flags & TTM_TT_FLAG_EXTERNAL)
return 0;
- if (adev->mman.ttm_pools && gtt->pool_id >= 0)
- pool = &adev->mman.ttm_pools[gtt->pool_id];
- else
- pool = &adev->mman.bdev.pool;
- ret = ttm_pool_alloc(pool, ttm, ctx);
+ if (gtt->numa_node != NUMA_NO_NODE) {
+ nodes_clear(preferred);
+ node_set(gtt->numa_node, preferred);
+ node_ctx.numa_info.policy = TTM_NUMA_POLICY_PREFERRED;
+ node_ctx.numa_info.nodes = &preferred;
+ }
+ ret = ttm_pool_alloc(&adev->mman.bdev.pool, ttm, &node_ctx);
if (ret)
return ret;
@@ -1281,7 +1288,6 @@ static void amdgpu_ttm_tt_unpopulate(struct ttm_device *bdev,
{
struct amdgpu_ttm_tt *gtt = ttm_to_amdgpu_ttm_tt(ttm);
struct amdgpu_device *adev;
- struct ttm_pool *pool;
pgoff_t i;
amdgpu_ttm_backend_unbind(bdev, ttm);
@@ -1301,12 +1307,7 @@ static void amdgpu_ttm_tt_unpopulate(struct ttm_device *bdev,
adev = amdgpu_ttm_adev(bdev);
- if (adev->mman.ttm_pools && gtt->pool_id >= 0)
- pool = &adev->mman.ttm_pools[gtt->pool_id];
- else
- pool = &adev->mman.bdev.pool;
-
- return ttm_pool_free(pool, ttm);
+ return ttm_pool_free(&adev->mman.bdev.pool, ttm);
}
/**
@@ -1935,40 +1936,6 @@ static void amdgpu_ttm_training_data_block_init(struct amdgpu_device *adev)
ctx->c2p_train_data_offset);
}
-static int amdgpu_ttm_pools_init(struct amdgpu_device *adev)
-{
- int i;
-
- if (!adev->gmc.is_app_apu || !adev->gmc.num_mem_partitions)
- return 0;
-
- adev->mman.ttm_pools = kzalloc_objs(*adev->mman.ttm_pools,
- adev->gmc.num_mem_partitions);
- if (!adev->mman.ttm_pools)
- return -ENOMEM;
-
- for (i = 0; i < adev->gmc.num_mem_partitions; i++) {
- ttm_pool_init(&adev->mman.ttm_pools[i], adev->dev,
- adev->gmc.mem_partitions[i].numa.node,
- TTM_ALLOCATION_POOL_BENEFICIAL_ORDER(get_order(SZ_2M)));
- }
- return 0;
-}
-
-static void amdgpu_ttm_pools_fini(struct amdgpu_device *adev)
-{
- int i;
-
- if (!adev->gmc.is_app_apu || !adev->mman.ttm_pools)
- return;
-
- for (i = 0; i < adev->gmc.num_mem_partitions; i++)
- ttm_pool_fini(&adev->mman.ttm_pools[i]);
-
- kfree(adev->mman.ttm_pools);
- adev->mman.ttm_pools = NULL;
-}
-
/**
* amdgpu_ttm_alloc_mmio_remap_bo - Allocate the singleton MMIO_REMAP BO
* @adev: amdgpu device
@@ -2153,11 +2120,6 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
return r;
}
- r = amdgpu_ttm_pools_init(adev);
- if (r) {
- dev_err(adev->dev, "failed to init ttm pools(%d).\n", r);
- return r;
- }
adev->mman.initialized = true;
if (!adev->gmc.is_app_apu) {
@@ -2327,8 +2289,6 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)
if (!adev->mman.initialized)
return;
- amdgpu_ttm_pools_fini(adev);
-
amdgpu_ttm_training_reserve_vram_fini(adev);
/* return the stolen vga memory back to VRAM */
if (!adev->gmc.is_app_apu) {
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
index adb6cfae5052..8fc7fc86f19c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
@@ -83,7 +83,6 @@ struct amdgpu_vram_resv {
struct amdgpu_mman {
struct ttm_device bdev;
- struct ttm_pool *ttm_pools;
bool initialized;
void __iomem *aper_base_kaddr;
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 06/11] drm/ttm/pool: Drop the nid argument from ttm_pool_init()
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (4 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 05/11] drm/amdgpu: Use ttm_operation_ctx numa_info instead of per-partition pools Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 07/11] drm/xe/uapi: Add GEM_CREATE host NUMA mempolicy extension Himal Prasad Ghimiray
` (5 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
With the node selectable per allocation through ttm_operation_ctx and
amdgpu converted, no caller picks a node per pool anymore. Remove the
nid argument and derive the pool's default node from the device, as
ttm_device_init() already did, so there is a single way to choose a
node.
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 10 +++++-----
drivers/gpu/drm/ttm/ttm_device.c | 9 ++-------
drivers/gpu/drm/ttm/ttm_pool.c | 9 +++++----
include/drm/ttm/ttm_pool.h | 4 ++--
4 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/ttm/tests/ttm_pool_test.c b/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
index be75c8abf388..5497672173a2 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
@@ -87,7 +87,7 @@ static struct ttm_pool *ttm_pool_pre_populated(struct kunit *test,
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, pool);
- ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, TTM_ALLOCATION_POOL_USE_DMA_ALLOC);
+ ttm_pool_init(pool, devs->dev, TTM_ALLOCATION_POOL_USE_DMA_ALLOC);
err = ttm_pool_alloc(pool, tt, &simple_ctx);
KUNIT_ASSERT_EQ(test, err, 0);
@@ -151,7 +151,7 @@ static void ttm_pool_alloc_basic(struct kunit *test)
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, pool);
- ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, params->alloc_flags);
+ ttm_pool_init(pool, devs->dev, params->alloc_flags);
KUNIT_ASSERT_PTR_EQ(test, pool->dev, devs->dev);
KUNIT_ASSERT_EQ(test, pool->nid, NUMA_NO_NODE);
@@ -218,7 +218,7 @@ static void ttm_pool_alloc_basic_dma_addr(struct kunit *test)
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, pool);
- ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, TTM_ALLOCATION_POOL_USE_DMA_ALLOC);
+ ttm_pool_init(pool, devs->dev, TTM_ALLOCATION_POOL_USE_DMA_ALLOC);
err = ttm_pool_alloc(pool, tt, &simple_ctx);
KUNIT_ASSERT_EQ(test, err, 0);
@@ -348,7 +348,7 @@ static void ttm_pool_free_dma_alloc(struct kunit *test)
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, pool);
- ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, TTM_ALLOCATION_POOL_USE_DMA_ALLOC);
+ ttm_pool_init(pool, devs->dev, TTM_ALLOCATION_POOL_USE_DMA_ALLOC);
ttm_pool_alloc(pool, tt, &simple_ctx);
pt = &pool->caching[caching].orders[order];
@@ -378,7 +378,7 @@ static void ttm_pool_free_no_dma_alloc(struct kunit *test)
pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, pool);
- ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, 0);
+ ttm_pool_init(pool, devs->dev, 0);
ttm_pool_alloc(pool, tt, &simple_ctx);
ttm_pool_free(pool, tt);
diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index d3bfb9a696a7..4ba07254f5fd 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -208,7 +208,7 @@ int ttm_device_init(struct ttm_device *bdev, const struct ttm_device_funcs *func
unsigned int alloc_flags)
{
struct ttm_global *glob = &ttm_glob;
- int ret, nid;
+ int ret;
if (WARN_ON(vma_manager == NULL))
return -EINVAL;
@@ -229,12 +229,7 @@ int ttm_device_init(struct ttm_device *bdev, const struct ttm_device_funcs *func
ttm_sys_man_init(bdev);
- if (dev)
- nid = dev_to_node(dev);
- else
- nid = NUMA_NO_NODE;
-
- ttm_pool_init(&bdev->pool, dev, nid, alloc_flags);
+ ttm_pool_init(&bdev->pool, dev, alloc_flags);
bdev->vma_manager = vma_manager;
spin_lock_init(&bdev->lru_lock);
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 4ab37af0f1ba..4262e4b6fb64 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -1414,20 +1414,21 @@ long ttm_pool_backup(struct ttm_pool *pool, struct ttm_tt *tt,
*
* @pool: the pool to initialize
* @dev: device for DMA allocations and mappings
- * @nid: NUMA node to use for allocations
* @alloc_flags: TTM_ALLOCATION_POOL_* flags
*
- * Initialize the pool and its pool types.
+ * Initialize the pool and its pool types. The pool allocates on @dev's NUMA
+ * node unless the caller selects one per allocation through
+ * &ttm_operation_ctx.numa_info.
*/
void ttm_pool_init(struct ttm_pool *pool, struct device *dev,
- int nid, unsigned int alloc_flags)
+ unsigned int alloc_flags)
{
unsigned int i, j;
WARN_ON(!dev && ttm_pool_uses_dma_alloc(pool));
pool->dev = dev;
- pool->nid = nid;
+ pool->nid = dev ? dev_to_node(dev) : NUMA_NO_NODE;
pool->alloc_flags = alloc_flags;
for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i) {
diff --git a/include/drm/ttm/ttm_pool.h b/include/drm/ttm/ttm_pool.h
index 26ee592e1994..863e8f7af948 100644
--- a/include/drm/ttm/ttm_pool.h
+++ b/include/drm/ttm/ttm_pool.h
@@ -62,7 +62,7 @@ struct ttm_pool_type {
* struct ttm_pool - Pool for all caching and orders
*
* @dev: the device we allocate pages for
- * @nid: which numa node to use
+ * @nid: default NUMA node, derived from @dev
* @alloc_flags: TTM_ALLOCATION_POOL_* flags
* @caching: pools for each caching/order
*/
@@ -82,7 +82,7 @@ int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
void ttm_pool_free(struct ttm_pool *pool, struct ttm_tt *tt);
void ttm_pool_init(struct ttm_pool *pool, struct device *dev,
- int nid, unsigned int alloc_flags);
+ unsigned int alloc_flags);
void ttm_pool_fini(struct ttm_pool *pool);
int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m);
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 07/11] drm/xe/uapi: Add GEM_CREATE host NUMA mempolicy extension
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (5 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 06/11] drm/ttm/pool: Drop the nid argument from ttm_pool_init() Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 08/11] drm/xe/bo: Carry a per-BO host NUMA mempolicy Himal Prasad Ghimiray
` (4 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
Add DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY and struct
drm_xe_gem_create_mempolicy so userspace can request a PREFERRED, BIND or
INTERLEAVE host NUMA policy for the system memory backing pages of a BO.
The extension is only valid for BOs with system memory placement; the
ioctl returns -EINVAL for other BOs.
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
include/uapi/drm/xe_drm.h | 53 +++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 578f0c1eb43e..8818ed57b153 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -777,6 +777,53 @@ struct drm_xe_device_query {
__u64 reserved[2];
};
+/**
+ * struct drm_xe_gem_create_mempolicy - Host NUMA memory policy for GEM_CREATE
+ *
+ * Used with %DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY. The policy applies to
+ * the system-memory backing pages of the object. It is captured at creation
+ * time and applied whenever those pages are allocated, including when the
+ * object is populated later or restored after its backing store was shrunk.
+ *
+ * @mode supports the following values:
+ * - %DRM_XE_GEM_CREATE_MEMPOLICY_MODE_PREFERRED - Prefer a single node.
+ * @nodemask must contain exactly one node. This is a preference, and the
+ * allocation may fall back to other nodes under memory pressure.
+ * - %DRM_XE_GEM_CREATE_MEMPOLICY_MODE_BIND - Allocate only from the nodes
+ * in @nodemask. The kernel never falls back to a node outside the mask,
+ * so allocation fails with -ENOMEM when those nodes are exhausted.
+ * - %DRM_XE_GEM_CREATE_MEMPOLICY_MODE_INTERLEAVE - Spread the backing pages
+ * round-robin across the nodes in @nodemask.
+ *
+ * @nodemask is a user pointer to an array of unsigned longs. Bit n set means
+ * host NUMA node n is in the set. @maxnode is the number of valid bits in the
+ * array, and bits at or above @maxnode must be zero. The set must be non-empty
+ * and contain only nodes that have memory. Requesting this extension on an
+ * object without a system-memory placement is rejected with -EINVAL.
+ */
+struct drm_xe_gem_create_mempolicy {
+ /** @base: Base user extension */
+ struct drm_xe_user_extension base;
+
+#define DRM_XE_GEM_CREATE_MEMPOLICY_MODE_PREFERRED 0
+#define DRM_XE_GEM_CREATE_MEMPOLICY_MODE_BIND 1
+#define DRM_XE_GEM_CREATE_MEMPOLICY_MODE_INTERLEAVE 2
+ /** @mode: One of %DRM_XE_GEM_CREATE_MEMPOLICY_MODE_* */
+ __u16 mode;
+
+ /** @flags: MBZ */
+ __u16 flags;
+
+ /** @pad: MBZ */
+ __u32 pad;
+
+ /** @nodemask: User pointer to the host NUMA node bitmask */
+ __u64 nodemask;
+
+ /** @maxnode: Number of valid bits in @nodemask, at most MAX_NUMNODES */
+ __u64 maxnode;
+};
+
/**
* struct drm_xe_gem_create - Input of &DRM_IOCTL_XE_GEM_CREATE - A structure for
* gem creation
@@ -839,8 +886,14 @@ struct drm_xe_device_query {
* event occurs after their creation. Attempting to flip an invalid object
* will cause a black frame to be displayed instead. Submissions with invalid
* objects mapped in the VM will be rejected.
+ *
+ * This ioctl also accepts the %DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY
+ * extension, which uses &struct drm_xe_gem_create_mempolicy to request a
+ * host NUMA memory policy (preferred, bind or interleave) for the backing
+ * pages.
*/
struct drm_xe_gem_create {
+#define DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY 1
#define DRM_XE_GEM_CREATE_EXTENSION_SET_PROPERTY 0
#define DRM_XE_GEM_CREATE_SET_PROPERTY_PXP_TYPE 0
/** @extensions: Pointer to the first extension struct, if any */
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 08/11] drm/xe/bo: Carry a per-BO host NUMA mempolicy
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (6 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 07/11] drm/xe/uapi: Add GEM_CREATE host NUMA mempolicy extension Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 09/11] drm/xe/uapi: Wire up GEM_CREATE mempolicy extension handler Himal Prasad Ghimiray
` (3 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
Store a host NUMA memory policy in the BO and apply it when the TT
populates its backing pages. Populate can run from another task, such
as eviction or shrinker restore, so the BO owns a copy of the policy
and the TT holds a const pointer to it. The copy is freed with the BO.
xe_bo_init_locked(), __xe_bo_create_locked() and xe_bo_create_novm()
take the policy as an argument, and xe_bo_create_user() takes it too.
The GEM_CREATE ioctl and the other callers pass NULL for now, so there
is no functional change. The ioctl starts using the policy in the next
commit.
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/xe/tests/xe_bo.c | 12 ++---
drivers/gpu/drm/xe/tests/xe_dma_buf.c | 4 +-
drivers/gpu/drm/xe/tests/xe_migrate.c | 8 ++--
drivers/gpu/drm/xe/xe_bo.c | 69 ++++++++++++++++++++-------
drivers/gpu/drm/xe/xe_bo.h | 5 +-
drivers/gpu/drm/xe/xe_bo_types.h | 24 ++++++++++
drivers/gpu/drm/xe/xe_dma_buf.c | 3 +-
7 files changed, 94 insertions(+), 31 deletions(-)
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 6a17e13d58cf..0bc7d4572549 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -89,7 +89,7 @@ static void run_only_leaf(struct kunit *test,
bo = xe_bo_create_user(xe, NULL, li->alloc_size,
DRM_XE_GEM_CPU_CACHING_WC,
- XE_BO_FLAG_VRAM0, NULL);
+ XE_BO_FLAG_VRAM0, NULL, NULL);
if (IS_ERR(bo)) {
page_size_alloc_restore(xe, &saved);
if (PTR_ERR(bo) == -ENOSPC) {
@@ -183,7 +183,7 @@ static void xe_bo_page_size_alloc_mixed_bos(struct kunit *test)
*/
bo = xe_bo_create_user(xe, NULL, SZ_1G,
DRM_XE_GEM_CPU_CACHING_WC,
- XE_BO_FLAG_VRAM0, NULL);
+ XE_BO_FLAG_VRAM0, NULL, NULL);
if (IS_ERR(bo)) {
int err = PTR_ERR(bo);
@@ -366,7 +366,7 @@ static void ccs_test_run_tile(struct xe_device *xe, struct xe_tile *tile,
kunit_info(test, "Testing system memory\n");
bo = xe_bo_create_user(xe, NULL, SZ_1M, DRM_XE_GEM_CPU_CACHING_WC,
- bo_flags, exec);
+ bo_flags, NULL, exec);
if (IS_ERR(bo)) {
KUNIT_FAIL(test, "Failed to create bo.\n");
return;
@@ -445,7 +445,7 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc
xe_vm_lock(vm, false);
bo = xe_bo_create_user(xe, vm, 0x10000,
DRM_XE_GEM_CPU_CACHING_WC,
- bo_flags, exec);
+ bo_flags, NULL, exec);
xe_vm_unlock(vm);
if (IS_ERR(bo)) {
KUNIT_FAIL(test, "bo create err=%pe\n", bo);
@@ -454,7 +454,7 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc
external = xe_bo_create_user(xe, NULL, 0x10000,
DRM_XE_GEM_CPU_CACHING_WC,
- bo_flags, NULL);
+ bo_flags, NULL, NULL);
if (IS_ERR(external)) {
KUNIT_FAIL(test, "external bo create err=%pe\n", external);
goto cleanup_bo;
@@ -719,7 +719,7 @@ static int shrink_test_run_device(struct xe_device *xe)
/* We can create bos using WC caching here. But it is slower. */
bo = xe_bo_create_user(xe, NULL, XE_BO_SHRINK_SIZE,
DRM_XE_GEM_CPU_CACHING_WB,
- XE_BO_FLAG_SYSTEM, NULL);
+ XE_BO_FLAG_SYSTEM, NULL, NULL);
if (IS_ERR(bo)) {
if (bo != ERR_PTR(-ENOMEM) && bo != ERR_PTR(-ENOSPC) &&
bo != ERR_PTR(-EINTR) && bo != ERR_PTR(-ERESTARTSYS))
diff --git a/drivers/gpu/drm/xe/tests/xe_dma_buf.c b/drivers/gpu/drm/xe/tests/xe_dma_buf.c
index 792376e965f1..dae03a4f6af1 100644
--- a/drivers/gpu/drm/xe/tests/xe_dma_buf.c
+++ b/drivers/gpu/drm/xe/tests/xe_dma_buf.c
@@ -127,7 +127,7 @@ static void xe_test_dmabuf_import_same_driver(struct xe_device *xe)
kunit_info(test, "running %s\n", __func__);
bo = xe_bo_create_user(xe, NULL, size, DRM_XE_GEM_CPU_CACHING_WC,
- params->mem_mask, NULL);
+ params->mem_mask, NULL, NULL);
if (IS_ERR(bo)) {
KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
PTR_ERR(bo));
@@ -215,7 +215,7 @@ static void xe_test_dmabuf_move_notify_no_resource(struct xe_device *xe)
kunit_info(test, "running %s\n", __func__);
bo = xe_bo_create_user(xe, NULL, PAGE_SIZE, DRM_XE_GEM_CPU_CACHING_WC,
- params->mem_mask, NULL);
+ params->mem_mask, NULL, NULL);
if (IS_ERR(bo)) {
KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
PTR_ERR(bo));
diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c
index 56c49d8507d7..4fb3f512d502 100644
--- a/drivers/gpu/drm/xe/tests/xe_migrate.c
+++ b/drivers/gpu/drm/xe/tests/xe_migrate.c
@@ -649,7 +649,7 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
DRM_XE_GEM_CPU_CACHING_WC,
XE_BO_FLAG_SYSTEM |
XE_BO_FLAG_NEEDS_CPU_ACCESS |
- XE_BO_FLAG_PINNED, NULL);
+ XE_BO_FLAG_PINNED, NULL, NULL);
if (IS_ERR(sys_bo)) {
KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
@@ -675,7 +675,7 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
ccs_bo = xe_bo_create_user(xe, NULL, SZ_4M,
DRM_XE_GEM_CPU_CACHING_WC,
bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS |
- XE_BO_FLAG_PINNED, NULL);
+ XE_BO_FLAG_PINNED, NULL, NULL);
if (IS_ERR(ccs_bo)) {
KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
@@ -700,7 +700,7 @@ static void validate_ccs_test_run_tile(struct xe_device *xe, struct xe_tile *til
vram_bo = xe_bo_create_user(xe, NULL, SZ_4M,
DRM_XE_GEM_CPU_CACHING_WC,
bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS |
- XE_BO_FLAG_PINNED, NULL);
+ XE_BO_FLAG_PINNED, NULL, NULL);
if (IS_ERR(vram_bo)) {
KUNIT_FAIL(test, "xe_bo_create() failed with err=%ld\n",
PTR_ERR(vram_bo));
@@ -979,7 +979,7 @@ static void access_memory_test_run_tile(struct xe_device *xe,
bo = xe_bo_create_user(xe, NULL, ACCESS_MEM_BO_SIZE,
DRM_XE_GEM_CPU_CACHING_WC,
- bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS, NULL);
+ bo_flags | XE_BO_FLAG_NEEDS_CPU_ACCESS, NULL, NULL);
if (IS_ERR(bo)) {
KUNIT_FAIL(test, "Failed to create bo: %pe\n", bo);
goto free_buf;
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 353ac1e9a9d6..29fbcc1cbbed 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -396,6 +396,11 @@ struct xe_ttm_tt {
struct sg_table *sg;
/** @purgeable: Whether the content of the pages of @ttm is purgeable. */
bool purgeable;
+ /**
+ * @mempolicy: Host NUMA policy for backing pages, owned by the BO and
+ * valid for the lifetime of the tt. NULL if no policy was requested.
+ */
+ const struct xe_host_mempolicy *mempolicy;
};
static int xe_tt_map_sg(struct xe_device *xe, struct ttm_tt *tt)
@@ -597,6 +602,7 @@ static struct ttm_tt *xe_ttm_tt_create(struct ttm_buffer_object *ttm_bo,
return NULL;
tt = &xe_tt->ttm;
+ xe_tt->mempolicy = bo->mempolicy;
extra_pages = 0;
if (xe_bo_needs_ccs_pages(bo))
@@ -664,6 +670,8 @@ static int xe_ttm_tt_populate(struct ttm_device *ttm_dev, struct ttm_tt *tt,
struct ttm_operation_ctx *ctx)
{
struct xe_ttm_tt *xe_tt = container_of(tt, struct xe_ttm_tt, ttm);
+ /* ctx is shared by every BO of the operation; set the node locally */
+ struct ttm_operation_ctx node_ctx = *ctx;
int err;
/*
@@ -674,11 +682,16 @@ static int xe_ttm_tt_populate(struct ttm_device *ttm_dev, struct ttm_tt *tt,
!(tt->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE))
return 0;
+ if (xe_tt->mempolicy) {
+ node_ctx.numa_info.policy = xe_tt->mempolicy->mode;
+ node_ctx.numa_info.nodes = &xe_tt->mempolicy->nodes;
+ }
+
if (ttm_tt_is_backed_up(tt) && !xe_tt->purgeable) {
- err = ttm_tt_restore(ttm_dev, tt, ctx);
+ err = ttm_tt_restore(ttm_dev, tt, &node_ctx);
} else {
ttm_tt_clear_backed_up(tt);
- err = ttm_pool_alloc(&ttm_dev->pool, tt, ctx);
+ err = ttm_pool_alloc(&ttm_dev->pool, tt, &node_ctx);
}
if (err)
return err;
@@ -1536,7 +1549,7 @@ int xe_bo_notifier_prepare_pinned(struct xe_bo *bo)
backup = xe_bo_init_locked(xe, NULL, NULL, bo->ttm.base.resv, NULL, xe_bo_size(bo),
DRM_XE_GEM_CPU_CACHING_WB, ttm_bo_type_kernel,
XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS |
- XE_BO_FLAG_PINNED, NULL, &exec);
+ XE_BO_FLAG_PINNED, NULL, NULL, &exec);
if (IS_ERR(backup)) {
drm_exec_retry_on_contention(&exec);
ret = PTR_ERR(backup);
@@ -1678,7 +1691,8 @@ int xe_bo_evict_pinned(struct xe_bo *bo)
xe_bo_size(bo),
DRM_XE_GEM_CPU_CACHING_WB, ttm_bo_type_kernel,
XE_BO_FLAG_SYSTEM | XE_BO_FLAG_NEEDS_CPU_ACCESS |
- XE_BO_FLAG_PINNED, NULL, &exec);
+ XE_BO_FLAG_PINNED, NULL, NULL,
+ &exec);
if (IS_ERR(backup)) {
drm_exec_retry_on_contention(&exec);
ret = PTR_ERR(backup);
@@ -2040,6 +2054,7 @@ static void xe_ttm_bo_destroy(struct ttm_buffer_object *ttm_bo)
list_del(&bo->vram_userfault_link);
mutex_unlock(&xe->mem_access.vram_userfault.lock);
+ kfree(bo->mempolicy);
kfree(bo);
}
@@ -2447,6 +2462,8 @@ struct xe_bo *xe_bo_alloc(void)
*/
void xe_bo_free(struct xe_bo *bo)
{
+ if (bo)
+ kfree(bo->mempolicy);
kfree(bo);
}
@@ -2466,6 +2483,7 @@ void xe_bo_free(struct xe_bo *bo)
* @flags: XE_BO_FLAG_ flags.
* @dma_buf: The dma-buf to reference for the BO lifetime (imported BOs),
* or NULL.
+ * @mpol: Host NUMA memory policy to copy into the BO, or NULL for none.
* @exec: The drm_exec transaction to use for exhaustive eviction.
*
* Initialize or create an xe buffer object. On failure, any allocated buffer
@@ -2478,6 +2496,7 @@ struct xe_bo *xe_bo_init_locked(struct xe_device *xe, struct xe_bo *bo,
struct ttm_lru_bulk_move *bulk, size_t size,
u16 cpu_caching, enum ttm_bo_type type,
u32 flags, struct dma_buf *dma_buf,
+ const struct xe_host_mempolicy *mpol,
struct drm_exec *exec)
{
struct ttm_operation_ctx ctx = {
@@ -2544,6 +2563,13 @@ struct xe_bo *xe_bo_init_locked(struct xe_device *xe, struct xe_bo *bo,
bo->tile = tile;
bo->flags = flags;
bo->cpu_caching = cpu_caching;
+ if (mpol) {
+ bo->mempolicy = kmemdup(mpol, sizeof(*mpol), GFP_KERNEL);
+ if (!bo->mempolicy) {
+ xe_bo_free(bo);
+ return ERR_PTR(-ENOMEM);
+ }
+ }
bo->ttm.base.funcs = &xe_gem_object_funcs;
bo->ttm.priority = XE_BO_PRIORITY_NORMAL;
INIT_LIST_HEAD(&bo->pinned_link);
@@ -2678,7 +2704,9 @@ __xe_bo_create_locked(struct xe_device *xe,
struct xe_tile *tile, struct xe_vm *vm,
size_t size, u64 start, u64 end,
u16 cpu_caching, enum ttm_bo_type type, u32 flags,
- u64 alignment, struct drm_exec *exec)
+ u64 alignment,
+ const struct xe_host_mempolicy *mpol,
+ struct drm_exec *exec)
{
struct xe_bo *bo = NULL;
int err;
@@ -2703,7 +2731,7 @@ __xe_bo_create_locked(struct xe_device *xe,
vm && !xe_vm_in_fault_mode(vm) &&
flags & XE_BO_FLAG_USER ?
&vm->lru_bulk_move : NULL, size,
- cpu_caching, type, flags, NULL, exec);
+ cpu_caching, type, flags, NULL, mpol, exec);
if (IS_ERR(bo))
return bo;
@@ -2778,13 +2806,14 @@ struct xe_bo *xe_bo_create_locked(struct xe_device *xe, struct xe_tile *tile,
struct drm_exec *exec)
{
return __xe_bo_create_locked(xe, tile, vm, size, 0, ~0ULL, 0, type,
- flags, 0, exec);
+ flags, 0, NULL, exec);
}
static struct xe_bo *xe_bo_create_novm(struct xe_device *xe, struct xe_tile *tile,
size_t size, u16 cpu_caching,
enum ttm_bo_type type, u32 flags,
- u64 alignment, bool intr)
+ u64 alignment,
+ const struct xe_host_mempolicy *mpol, bool intr)
{
struct xe_validation_ctx ctx;
struct drm_exec exec;
@@ -2794,7 +2823,8 @@ static struct xe_bo *xe_bo_create_novm(struct xe_device *xe, struct xe_tile *til
xe_validation_guard(&ctx, &xe->val, &exec, (struct xe_val_flags) {.interruptible = intr},
ret) {
bo = __xe_bo_create_locked(xe, tile, NULL, size, 0, ~0ULL,
- cpu_caching, type, flags, alignment, &exec);
+ cpu_caching, type, flags, alignment,
+ mpol, &exec);
drm_exec_retry_on_contention(&exec);
if (IS_ERR(bo)) {
ret = PTR_ERR(bo);
@@ -2953,17 +2983,21 @@ static void xe_bo_debug_mixed_mode_cur_index_advance(struct xe_device *xe,
* @size: The storage size to use for the bo.
* @cpu_caching: The caching mode to be used for system backing store.
* @flags: XE_BO_FLAG_ flags.
+ * @mpol: The host NUMA memory policy to copy into the bo, or NULL.
* @exec: The drm_exec transaction to use for exhaustive eviction, or NULL
* if such a transaction should be initiated by the call.
*
- * Create a bo on behalf of user-space.
+ * Create a bo on behalf of user-space, with backing pages placed according
+ * to @mpol.
*
* Return: The buffer object on success. Negative error pointer on failure.
*/
struct xe_bo *xe_bo_create_user(struct xe_device *xe,
struct xe_vm *vm, size_t size,
u16 cpu_caching,
- u32 flags, struct drm_exec *exec)
+ u32 flags,
+ const struct xe_host_mempolicy *mpol,
+ struct drm_exec *exec)
{
struct xe_bo *bo;
int err = 0;
@@ -2980,12 +3014,13 @@ struct xe_bo *xe_bo_create_user(struct xe_device *xe,
xe_assert(xe, exec);
bo = __xe_bo_create_locked(xe, NULL, vm, size, 0, ~0ULL,
cpu_caching, ttm_bo_type_device,
- flags, 0, exec);
+ flags, 0, mpol, exec);
if (!IS_ERR(bo))
xe_bo_unlock_vm_held(bo);
} else {
bo = xe_bo_create_novm(xe, NULL, size, cpu_caching,
- ttm_bo_type_device, flags, 0, true);
+ ttm_bo_type_device, flags, 0,
+ mpol, true);
}
return bo;
@@ -3019,7 +3054,7 @@ struct xe_bo *xe_bo_create_pin_range_novm(struct xe_device *xe, struct xe_tile *
xe_validation_guard(&ctx, &xe->val, &exec, (struct xe_val_flags) {}, err) {
bo = __xe_bo_create_locked(xe, tile, NULL, size, start, end,
- 0, type, flags, 0, &exec);
+ 0, type, flags, 0, NULL, &exec);
if (IS_ERR(bo)) {
drm_exec_retry_on_contention(&exec);
err = PTR_ERR(bo);
@@ -3058,7 +3093,7 @@ static struct xe_bo *xe_bo_create_pin_map_at_aligned(struct xe_device *xe,
bo = __xe_bo_create_locked(xe, tile, vm, size, start, end, 0, type,
flags | XE_BO_FLAG_NEEDS_CPU_ACCESS | XE_BO_FLAG_PINNED,
- alignment, exec);
+ alignment, NULL, exec);
if (IS_ERR(bo))
return bo;
@@ -3757,7 +3792,7 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
break;
}
bo = xe_bo_create_user(xe, vm, args->size, args->cpu_caching,
- bo_flags, &exec);
+ bo_flags, NULL, &exec);
drm_exec_retry_on_contention(&exec);
if (IS_ERR(bo)) {
err = PTR_ERR(bo);
@@ -4228,7 +4263,7 @@ int xe_bo_dumb_create(struct drm_file *file_priv,
DRM_XE_GEM_CPU_CACHING_WC,
XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
XE_BO_FLAG_FORCE_WC |
- XE_BO_FLAG_NEEDS_CPU_ACCESS, NULL);
+ XE_BO_FLAG_NEEDS_CPU_ACCESS, NULL, NULL);
if (IS_ERR(bo))
return PTR_ERR(bo);
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
index 13197e4e0358..4b2c17bb0f9c 100644
--- a/drivers/gpu/drm/xe/xe_bo.h
+++ b/drivers/gpu/drm/xe/xe_bo.h
@@ -123,13 +123,16 @@ struct xe_bo *xe_bo_init_locked(struct xe_device *xe, struct xe_bo *bo,
struct ttm_lru_bulk_move *bulk, size_t size,
u16 cpu_caching, enum ttm_bo_type type,
u32 flags, struct dma_buf *dma_buf,
+ const struct xe_host_mempolicy *mpol,
struct drm_exec *exec);
struct xe_bo *xe_bo_create_locked(struct xe_device *xe, struct xe_tile *tile,
struct xe_vm *vm, size_t size,
enum ttm_bo_type type, u32 flags,
struct drm_exec *exec);
struct xe_bo *xe_bo_create_user(struct xe_device *xe, struct xe_vm *vm, size_t size,
- u16 cpu_caching, u32 flags, struct drm_exec *exec);
+ u16 cpu_caching, u32 flags,
+ const struct xe_host_mempolicy *mpol,
+ struct drm_exec *exec);
struct xe_bo *xe_bo_create_pin_map(struct xe_device *xe, struct xe_tile *tile,
struct xe_vm *vm, size_t size,
enum ttm_bo_type type, u32 flags,
diff --git a/drivers/gpu/drm/xe/xe_bo_types.h b/drivers/gpu/drm/xe/xe_bo_types.h
index 0265fb314c77..ace84235fb13 100644
--- a/drivers/gpu/drm/xe/xe_bo_types.h
+++ b/drivers/gpu/drm/xe/xe_bo_types.h
@@ -33,6 +33,23 @@ struct xe_exec_queue;
#define XE_BO_PRIORITY_LOW 0
#define XE_BO_PRIORITY_NORMAL 1
+/**
+ * struct xe_host_mempolicy - Host NUMA memory policy for system-memory pages
+ *
+ * Captured from the GEM_CREATE NUMA node property at creation time.
+ * Stored by value so that it stays valid when the pages are populated from a
+ * different task, for example during eviction or shrinker restore.
+ */
+struct xe_host_mempolicy {
+ /**
+ * @mode: %TTM_NUMA_POLICY_PREFERRED, %TTM_NUMA_POLICY_BIND or
+ * %TTM_NUMA_POLICY_INTERLEAVE
+ */
+ enum ttm_numa_policy mode;
+ /** @nodes: Host NUMA nodes the policy applies to, non-empty */
+ nodemask_t nodes;
+};
+
/**
* struct xe_bo - Xe buffer object
*/
@@ -112,6 +129,13 @@ struct xe_bo {
*/
u16 cpu_caching;
+ /**
+ * @mempolicy: Host NUMA memory policy for system-memory backing
+ * pages, or NULL for the device-local default. Owned by the BO and
+ * freed with it.
+ */
+ struct xe_host_mempolicy *mempolicy;
+
/** @devmem_allocation: SVM device memory allocation */
struct drm_pagemap_devmem devmem_allocation;
diff --git a/drivers/gpu/drm/xe/xe_dma_buf.c b/drivers/gpu/drm/xe/xe_dma_buf.c
index 90c9b90de552..f860221c7e53 100644
--- a/drivers/gpu/drm/xe/xe_dma_buf.c
+++ b/drivers/gpu/drm/xe/xe_dma_buf.c
@@ -345,7 +345,8 @@ xe_dma_buf_create_obj(struct drm_device *dev, struct dma_buf *dma_buf)
bo = xe_bo_init_locked(xe, NULL, NULL, resv, NULL, dma_buf->size,
0, /* Will require 1way or 2way for vm_bind */
- ttm_bo_type_sg, XE_BO_FLAG_SYSTEM, dma_buf, &exec);
+ ttm_bo_type_sg, XE_BO_FLAG_SYSTEM, dma_buf,
+ NULL, &exec);
drm_exec_retry_on_contention(&exec);
if (IS_ERR(bo)) {
ret = PTR_ERR(bo);
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 09/11] drm/xe/uapi: Wire up GEM_CREATE mempolicy extension handler
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (7 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 08/11] drm/xe/bo: Carry a per-BO host NUMA mempolicy Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 10/11] drm/xe/uapi: Add device query for supported host NUMA mempolicy modes Himal Prasad Ghimiray
` (2 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
Parse the GEM_CREATE extensions once, before BO creation, into a
struct xe_gem_create_ext_data, so the host mempolicy is known when the
BO is created. The PXP key is still assigned after creation, as it
needs the BO.
DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY is handled by
gem_create_set_mempolicy(). It rejects an invalid mode, flags, or
nodemask bits, empty masks, nodes without memory, and PREFERRED masks
that do not contain exactly one node. BOs without a system memory
placement are rejected with -EINVAL.
v2:
- Parse all GEM_CREATE extensions once, before BO creation, through the
existing extension tables instead of a separate parser (Matt Auld)
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/xe/xe_bo.c | 137 ++++++++++++++++++++++++++++++++-----
1 file changed, 119 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 29fbcc1cbbed..a831dd4d7cad 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -3603,7 +3603,19 @@ void xe_bo_vunmap(struct xe_bo *bo)
__xe_bo_vunmap(bo);
}
-static int gem_create_set_pxp_type(struct xe_device *xe, struct xe_bo *bo, u64 value)
+/* GEM_CREATE extension values, parsed before the BO is created */
+struct xe_gem_create_ext_data {
+ bool pxp_hwdrm;
+ /**
+ * @mempolicy: Host NUMA policy, mode NONE unless the mempolicy
+ * extension was set
+ */
+ struct xe_host_mempolicy mempolicy;
+};
+
+static int gem_create_set_pxp_type(struct xe_device *xe,
+ struct xe_gem_create_ext_data *data,
+ u64 value)
{
if (value == DRM_XE_PXP_TYPE_NONE)
return 0;
@@ -3612,11 +3624,13 @@ static int gem_create_set_pxp_type(struct xe_device *xe, struct xe_bo *bo, u64 v
if (XE_IOCTL_DBG(xe, value != DRM_XE_PXP_TYPE_HWDRM))
return -EINVAL;
- return xe_pxp_key_assign(xe->pxp, bo);
+ data->pxp_hwdrm = true;
+
+ return 0;
}
typedef int (*xe_gem_create_set_property_fn)(struct xe_device *xe,
- struct xe_bo *bo,
+ struct xe_gem_create_ext_data *data,
u64 value);
static const xe_gem_create_set_property_fn gem_create_set_property_funcs[] = {
@@ -3624,7 +3638,7 @@ static const xe_gem_create_set_property_fn gem_create_set_property_funcs[] = {
};
static int gem_create_user_ext_set_property(struct xe_device *xe,
- struct xe_bo *bo,
+ struct xe_gem_create_ext_data *data,
u64 extension)
{
u64 __user *address = u64_to_user_ptr(extension);
@@ -3636,29 +3650,99 @@ static int gem_create_user_ext_set_property(struct xe_device *xe,
if (XE_IOCTL_DBG(xe, err))
return -EFAULT;
- if (XE_IOCTL_DBG(xe, ext.property >=
- ARRAY_SIZE(gem_create_set_property_funcs)) ||
- XE_IOCTL_DBG(xe, ext.pad) ||
- XE_IOCTL_DBG(xe, ext.property != DRM_XE_GEM_CREATE_EXTENSION_SET_PROPERTY))
+ if (XE_IOCTL_DBG(xe, ext.pad) ||
+ XE_IOCTL_DBG(xe, ext.property >=
+ ARRAY_SIZE(gem_create_set_property_funcs)))
return -EINVAL;
idx = array_index_nospec(ext.property, ARRAY_SIZE(gem_create_set_property_funcs));
if (!gem_create_set_property_funcs[idx])
return -EINVAL;
- return gem_create_set_property_funcs[idx](xe, bo, ext.value);
+ return gem_create_set_property_funcs[idx](xe, data, ext.value);
+}
+
+static int gem_create_set_mempolicy(struct xe_device *xe,
+ struct xe_gem_create_ext_data *data,
+ u64 extension)
+{
+ u64 __user *address = u64_to_user_ptr(extension);
+ unsigned long words[BITS_TO_LONGS(MAX_NUMNODES)] = {};
+ struct drm_xe_gem_create_mempolicy ext;
+ enum ttm_numa_policy mode;
+ unsigned long nr_words;
+ nodemask_t nodes, missing;
+ int err;
+
+ err = copy_from_user(&ext, address, sizeof(ext));
+ if (XE_IOCTL_DBG(xe, err))
+ return -EFAULT;
+
+ if (XE_IOCTL_DBG(xe, ext.flags) || XE_IOCTL_DBG(xe, ext.pad))
+ return -EINVAL;
+
+ switch (ext.mode) {
+ case DRM_XE_GEM_CREATE_MEMPOLICY_MODE_PREFERRED:
+ mode = TTM_NUMA_POLICY_PREFERRED;
+ break;
+ case DRM_XE_GEM_CREATE_MEMPOLICY_MODE_BIND:
+ mode = TTM_NUMA_POLICY_BIND;
+ break;
+ case DRM_XE_GEM_CREATE_MEMPOLICY_MODE_INTERLEAVE:
+ mode = TTM_NUMA_POLICY_INTERLEAVE;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ if (XE_IOCTL_DBG(xe, !ext.maxnode || ext.maxnode > MAX_NUMNODES))
+ return -EINVAL;
+
+ nr_words = BITS_TO_LONGS(ext.maxnode);
+ err = copy_from_user(words, u64_to_user_ptr(ext.nodemask),
+ nr_words * sizeof(unsigned long));
+ if (XE_IOCTL_DBG(xe, err))
+ return -EFAULT;
+
+ /* Bits at or above maxnode must be clear */
+ if (XE_IOCTL_DBG(xe, find_next_bit(words, nr_words * BITS_PER_LONG,
+ ext.maxnode) <
+ nr_words * BITS_PER_LONG))
+ return -EINVAL;
+
+ nodes_clear(nodes);
+ bitmap_copy(nodes.bits, words, ext.maxnode);
+
+ if (XE_IOCTL_DBG(xe, nodes_empty(nodes)))
+ return -EINVAL;
+
+ /* Only nodes with memory can back the pages */
+ nodes_andnot(missing, nodes, node_states[N_MEMORY]);
+ if (XE_IOCTL_DBG(xe, !nodes_empty(missing)))
+ return -EINVAL;
+
+ if (XE_IOCTL_DBG(xe, mode == TTM_NUMA_POLICY_PREFERRED &&
+ nodes_weight(nodes) != 1))
+ return -EINVAL;
+
+ data->mempolicy.mode = mode;
+ data->mempolicy.nodes = nodes;
+
+ return 0;
}
typedef int (*xe_gem_create_user_extension_fn)(struct xe_device *xe,
- struct xe_bo *bo,
+ struct xe_gem_create_ext_data *data,
u64 extension);
static const xe_gem_create_user_extension_fn gem_create_user_extension_funcs[] = {
[DRM_XE_GEM_CREATE_EXTENSION_SET_PROPERTY] = gem_create_user_ext_set_property,
+ [DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY] = gem_create_set_mempolicy,
};
#define MAX_USER_EXTENSIONS 16
-static int gem_create_user_extensions(struct xe_device *xe, struct xe_bo *bo,
+static int gem_create_user_extensions(struct xe_device *xe,
+ struct xe_gem_create_ext_data *data,
u64 extensions, int ext_number)
{
u64 __user *address = u64_to_user_ptr(extensions);
@@ -3679,12 +3763,12 @@ static int gem_create_user_extensions(struct xe_device *xe, struct xe_bo *bo,
idx = array_index_nospec(ext.name,
ARRAY_SIZE(gem_create_user_extension_funcs));
- err = gem_create_user_extension_funcs[idx](xe, bo, extensions);
+ err = gem_create_user_extension_funcs[idx](xe, data, extensions);
if (XE_IOCTL_DBG(xe, err))
return err;
if (ext.next_extension)
- return gem_create_user_extensions(xe, bo, ext.next_extension,
+ return gem_create_user_extensions(xe, data, ext.next_extension,
++ext_number);
return 0;
@@ -3696,11 +3780,13 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
struct xe_device *xe = to_xe_device(dev);
struct xe_file *xef = to_xe_file(file);
struct drm_xe_gem_create *args = data;
+ struct xe_gem_create_ext_data ext_data = {};
struct xe_validation_ctx ctx;
struct drm_exec exec;
struct xe_vm *vm = NULL;
struct xe_bo *bo;
unsigned int bo_flags;
+ const struct xe_host_mempolicy *mpol = NULL;
u32 handle;
int err;
@@ -3776,6 +3862,20 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
args->cpu_caching == DRM_XE_GEM_CPU_CACHING_WB))
return -EINVAL;
+ if (args->extensions) {
+ err = gem_create_user_extensions(xe, &ext_data,
+ args->extensions, 0);
+ if (err)
+ return err;
+ }
+
+ if (XE_IOCTL_DBG(xe, ext_data.mempolicy.mode != TTM_NUMA_POLICY_NONE &&
+ !(bo_flags & XE_BO_FLAG_SYSTEM)))
+ return -EINVAL;
+
+ if (ext_data.mempolicy.mode != TTM_NUMA_POLICY_NONE)
+ mpol = &ext_data.mempolicy;
+
if (args->vm_id) {
vm = xe_vm_lookup(xef, args->vm_id);
if (XE_IOCTL_DBG(xe, !vm))
@@ -3791,8 +3891,9 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
if (err)
break;
}
- bo = xe_bo_create_user(xe, vm, args->size, args->cpu_caching,
- bo_flags, NULL, &exec);
+ bo = xe_bo_create_user(xe, vm, args->size,
+ args->cpu_caching, bo_flags,
+ mpol, &exec);
drm_exec_retry_on_contention(&exec);
if (IS_ERR(bo)) {
err = PTR_ERR(bo);
@@ -3803,9 +3904,9 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
if (err)
goto out_vm;
- if (args->extensions) {
- err = gem_create_user_extensions(xe, bo, args->extensions, 0);
- if (err)
+ if (ext_data.pxp_hwdrm) {
+ err = xe_pxp_key_assign(xe->pxp, bo);
+ if (XE_IOCTL_DBG(xe, err))
goto out_bulk;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 10/11] drm/xe/uapi: Add device query for supported host NUMA mempolicy modes
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (8 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 09/11] drm/xe/uapi: Wire up GEM_CREATE mempolicy extension handler Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 11/11] drm/xe: Implement the host NUMA mempolicy device query Himal Prasad Ghimiray
2026-11-24 6:26 ` ✗ CI.KUnit: failure for drm/ttm, drm/xe: Per-BO host NUMA memory policy Patchwork
11 siblings, 0 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
Add DRM_XE_DEVICE_QUERY_MEMPOLICY and struct drm_xe_query_mempolicy so
userspace can discover which DRM_XE_GEM_CREATE_MEMPOLICY_MODE_* values
the driver accepts in DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY before
creating a BO.
The reply carries a bitmask where bit n set means mode value n is
supported. Requesting an unsupported mode fails with -EOPNOTSUPP. A
kernel without the query returns -EINVAL for it, which userspace can
treat as the extension being unavailable.
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
include/uapi/drm/xe_drm.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 8818ed57b153..1db3202c4518 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -710,6 +710,7 @@ struct drm_xe_query_pxp_status {
* - %DRM_XE_DEVICE_QUERY_OA_UNITS
* - %DRM_XE_DEVICE_QUERY_PXP_STATUS
* - %DRM_XE_DEVICE_QUERY_EU_STALL
+ * - %DRM_XE_DEVICE_QUERY_MEMPOLICY
*
* If size is set to 0, the driver fills it with the required size for
* the requested type of data to query. If size is equal to the required
@@ -764,6 +765,7 @@ struct drm_xe_device_query {
#define DRM_XE_DEVICE_QUERY_OA_UNITS 8
#define DRM_XE_DEVICE_QUERY_PXP_STATUS 9
#define DRM_XE_DEVICE_QUERY_EU_STALL 10
+#define DRM_XE_DEVICE_QUERY_MEMPOLICY 11
/** @query: The type of data to query */
__u32 query;
@@ -824,6 +826,30 @@ struct drm_xe_gem_create_mempolicy {
__u64 maxnode;
};
+/**
+ * struct drm_xe_query_mempolicy - Host NUMA mempolicy capabilities
+ *
+ * If the query field of struct drm_xe_device_query is equal to
+ * %DRM_XE_DEVICE_QUERY_MEMPOLICY, then the reply uses this structure. It
+ * reports which modes of %DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY the
+ * driver supports. Requesting an unsupported mode fails with -EOPNOTSUPP.
+ * A kernel without this query returns -EINVAL for it and does not support
+ * the extension.
+ */
+struct drm_xe_query_mempolicy {
+ /**
+ * @supported_modes: Bitmask of supported modes, bit n set means
+ * %DRM_XE_GEM_CREATE_MEMPOLICY_MODE_* value n is supported
+ */
+ __u32 supported_modes;
+
+ /** @pad: MBZ */
+ __u32 pad;
+
+ /** @reserved: Reserved */
+ __u64 reserved[3];
+};
+
/**
* struct drm_xe_gem_create - Input of &DRM_IOCTL_XE_GEM_CREATE - A structure for
* gem creation
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC v2 11/11] drm/xe: Implement the host NUMA mempolicy device query
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (9 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 10/11] drm/xe/uapi: Add device query for supported host NUMA mempolicy modes Himal Prasad Ghimiray
@ 2026-11-24 6:21 ` Himal Prasad Ghimiray
2026-11-24 6:26 ` ✗ CI.KUnit: failure for drm/ttm, drm/xe: Per-BO host NUMA memory policy Patchwork
11 siblings, 0 replies; 16+ messages in thread
From: Himal Prasad Ghimiray @ 2026-11-24 6:21 UTC (permalink / raw)
To: Natalie Vock, Arunpravin Paneer Selvam, Huang Rui,
Thomas Hellström, Rodrigo Vivi
Cc: Christian König, Matthew Auld, Matthew Brost, dri-devel,
intel-xe, amd-gfx, Himal Prasad Ghimiray
Add xe_bo_mempolicy_modes(), which returns the
DRM_XE_GEM_CREATE_MEMPOLICY_MODE_* values the device can apply. TTM only
applies NUMA placement when the pool does not use DMA allocation, so
report no modes in that case.
Use it to answer DRM_XE_DEVICE_QUERY_MEMPOLICY, and to reject a
GEM_CREATE mempolicy whose mode is not supported with -EOPNOTSUPP,
matching the query, instead of letting BO creation succeed and the
populate fail later.
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/xe/xe_bo.c | 49 ++++++++++++++++++++++++++---------
drivers/gpu/drm/xe/xe_bo.h | 1 +
drivers/gpu/drm/xe/xe_query.c | 23 ++++++++++++++++
3 files changed, 61 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index a831dd4d7cad..58ec0c8a3bd0 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -3662,6 +3662,36 @@ static int gem_create_user_ext_set_property(struct xe_device *xe,
return gem_create_set_property_funcs[idx](xe, data, ext.value);
}
+/* Modes left as TTM_NUMA_POLICY_NONE are not supported */
+static const enum ttm_numa_policy xe_mempolicy_to_ttm[] = {
+ [DRM_XE_GEM_CREATE_MEMPOLICY_MODE_PREFERRED] = TTM_NUMA_POLICY_PREFERRED,
+ [DRM_XE_GEM_CREATE_MEMPOLICY_MODE_BIND] = TTM_NUMA_POLICY_BIND,
+ [DRM_XE_GEM_CREATE_MEMPOLICY_MODE_INTERLEAVE] = TTM_NUMA_POLICY_INTERLEAVE,
+};
+
+/**
+ * xe_bo_mempolicy_modes() - Host NUMA mempolicy modes supported by the device
+ * @xe: The xe device.
+ *
+ * Return: Bitmask of BIT(%DRM_XE_GEM_CREATE_MEMPOLICY_MODE_*) values that
+ * %DRM_XE_GEM_CREATE_EXTENSION_SET_MEMPOLICY accepts.
+ */
+u32 xe_bo_mempolicy_modes(struct xe_device *xe)
+{
+ u32 modes = 0;
+ int i;
+
+ /* TTM cannot apply NUMA placement to DMA-allocated pools */
+ if (xe->ttm.pool.alloc_flags & TTM_ALLOCATION_POOL_USE_DMA_ALLOC)
+ return 0;
+
+ for (i = 0; i < ARRAY_SIZE(xe_mempolicy_to_ttm); i++)
+ if (xe_mempolicy_to_ttm[i] != TTM_NUMA_POLICY_NONE)
+ modes |= BIT(i);
+
+ return modes;
+}
+
static int gem_create_set_mempolicy(struct xe_device *xe,
struct xe_gem_create_ext_data *data,
u64 extension)
@@ -3681,19 +3711,14 @@ static int gem_create_set_mempolicy(struct xe_device *xe,
if (XE_IOCTL_DBG(xe, ext.flags) || XE_IOCTL_DBG(xe, ext.pad))
return -EINVAL;
- switch (ext.mode) {
- case DRM_XE_GEM_CREATE_MEMPOLICY_MODE_PREFERRED:
- mode = TTM_NUMA_POLICY_PREFERRED;
- break;
- case DRM_XE_GEM_CREATE_MEMPOLICY_MODE_BIND:
- mode = TTM_NUMA_POLICY_BIND;
- break;
- case DRM_XE_GEM_CREATE_MEMPOLICY_MODE_INTERLEAVE:
- mode = TTM_NUMA_POLICY_INTERLEAVE;
- break;
- default:
+ if (XE_IOCTL_DBG(xe, ext.mode >= ARRAY_SIZE(xe_mempolicy_to_ttm)))
return -EINVAL;
- }
+
+ if (XE_IOCTL_DBG(xe, !(xe_bo_mempolicy_modes(xe) & BIT(ext.mode))))
+ return -EOPNOTSUPP;
+
+ mode = xe_mempolicy_to_ttm[array_index_nospec(ext.mode,
+ ARRAY_SIZE(xe_mempolicy_to_ttm))];
if (XE_IOCTL_DBG(xe, !ext.maxnode || ext.maxnode > MAX_NUMNODES))
return -EINVAL;
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
index 4b2c17bb0f9c..e46a5c861465 100644
--- a/drivers/gpu/drm/xe/xe_bo.h
+++ b/drivers/gpu/drm/xe/xe_bo.h
@@ -454,6 +454,7 @@ extern const char *const xe_mem_type_to_name[];
int xe_gem_create_ioctl(struct drm_device *dev, void *data,
struct drm_file *file);
+u32 xe_bo_mempolicy_modes(struct xe_device *xe);
int xe_gem_mmap_offset_ioctl(struct drm_device *dev, void *data,
struct drm_file *file);
void xe_bo_runtime_pm_release_mmap_offset(struct xe_bo *bo);
diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
index 9cc35fc83954..f635ffa14e7b 100644
--- a/drivers/gpu/drm/xe/xe_query.c
+++ b/drivers/gpu/drm/xe/xe_query.c
@@ -788,6 +788,28 @@ static int query_eu_stall(struct xe_device *xe,
return ret ? -EFAULT : 0;
}
+static int query_mempolicy(struct xe_device *xe,
+ struct drm_xe_device_query *query)
+{
+ struct drm_xe_query_mempolicy __user *query_ptr = u64_to_user_ptr(query->data);
+ size_t size = sizeof(struct drm_xe_query_mempolicy);
+ struct drm_xe_query_mempolicy resp = {};
+
+ if (query->size == 0) {
+ query->size = size;
+ return 0;
+ } else if (XE_IOCTL_DBG(xe, query->size != size)) {
+ return -EINVAL;
+ }
+
+ resp.supported_modes = xe_bo_mempolicy_modes(xe);
+
+ if (copy_to_user(query_ptr, &resp, size))
+ return -EFAULT;
+
+ return 0;
+}
+
static int (* const xe_query_funcs[])(struct xe_device *xe,
struct drm_xe_device_query *query) = {
query_engines,
@@ -801,6 +823,7 @@ static int (* const xe_query_funcs[])(struct xe_device *xe,
query_oa_units,
query_pxp_status,
query_eu_stall,
+ query_mempolicy,
};
int xe_query_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* ✗ CI.KUnit: failure for drm/ttm, drm/xe: Per-BO host NUMA memory policy
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
` (10 preceding siblings ...)
2026-11-24 6:21 ` [RFC v2 11/11] drm/xe: Implement the host NUMA mempolicy device query Himal Prasad Ghimiray
@ 2026-11-24 6:26 ` Patchwork
11 siblings, 0 replies; 16+ messages in thread
From: Patchwork @ 2026-11-24 6:26 UTC (permalink / raw)
To: Himal Prasad Ghimiray; +Cc: intel-xe
== Series Details ==
Series: drm/ttm, drm/xe: Per-BO host NUMA memory policy
URL : https://patchwork.freedesktop.org/series/179439/
State : failure
== Summary ==
+ trap cleanup EXIT
+ kunitconfigs=('/kernel/drivers/gpu/tests/.kunitconfig' '/kernel/drivers/gpu/drm/xe/.kunitconfig' '/kernel/drivers/gpu/drm/tests/.kunitconfig' '/kernel/drivers/gpu/drm/ttm/tests/.kunitconfig' '/kernel/drivers/dma-buf/.kunitconfig')
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/tests/.kunitconfig
[06:24:15] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[06:24:20] 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=48
[06:24:40] Starting KUnit Kernel (1/1)...
[06:24:40] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[06:24:41] ================= gpu_buddy (15 subtests) ==================
[06:24:41] [PASSED] gpu_test_buddy_alloc_limit
[06:24:41] [PASSED] gpu_test_buddy_alloc_optimistic
[06:24:41] [PASSED] gpu_test_buddy_alloc_pessimistic
[06:24:41] [PASSED] gpu_test_buddy_alloc_pathological
[06:24:41] [PASSED] gpu_test_buddy_alloc_contiguous
[06:24:41] [PASSED] gpu_test_buddy_alloc_clear
[06:24:41] [PASSED] gpu_test_buddy_alloc_range
[06:24:41] [PASSED] gpu_test_buddy_alloc_range_bias
[06:24:41] [PASSED] gpu_test_buddy_alloc_range_clear_guard
[06:24:42] [PASSED] gpu_test_buddy_fragmentation_performance
[06:24:43] [PASSED] gpu_test_buddy_dirty_tracker_performance
[06:24:43] [PASSED] gpu_test_buddy_alloc_exceeds_max_order
[06:24:43] [PASSED] gpu_test_buddy_offset_aligned_allocation
[06:24:43] [PASSED] gpu_test_buddy_subtree_offset_alignment_stress
[06:24:43] [PASSED] gpu_test_buddy_addr_to_block
[06:24:43] ==================== [PASSED] gpu_buddy ====================
[06:24:43] ============================================================
[06:24:43] Testing complete. Ran 15 tests: passed: 15
[06:24:43] Elapsed time: 28.012s total, 5.155s configuring, 20.739s building, 2.033s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/xe/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[06:24:43] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[06:24:45] 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=48
[06:25:24] Starting KUnit Kernel (1/1)...
[06:25:24] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[06:25:24] ================= xe_ggtt_iov (9 subtests) =================
[06:25:24] [PASSED] init_shared_pf
[06:25:24] [PASSED] init_partial_overlap
[06:25:24] [PASSED] alloc_usable_pool_low
[06:25:24] [PASSED] alloc_shareable_pool_high
[06:25:24] [PASSED] alloc_partial_overlap
[06:25:24] [PASSED] alloc_partial_overlap_usable_full
[06:25:24] [PASSED] alloc_partial_overlap_shareable_full
[06:25:24] [PASSED] alloc_shareable_pool_unavailable
[06:25:24] [PASSED] alloc_shareable_pool_oversized
[06:25:24] =================== [PASSED] xe_ggtt_iov ===================
[06:25:24] =================== xe_ggtt (3 subtests) ===================
[06:25:24] [PASSED] init_native
[06:25:24] [PASSED] alloc_usable_pool_native
[06:25:24] [PASSED] alloc_usable_pool_oversized
[06:25:24] ===================== [PASSED] xe_ggtt =====================
[06:25:24] ================== guc_buf (11 subtests) ===================
[06:25:24] [PASSED] test_smallest
[06:25:24] [PASSED] test_largest
[06:25:24] [PASSED] test_granular
[06:25:24] [PASSED] test_unique
[06:25:24] [PASSED] test_overlap
[06:25:24] [PASSED] test_reusable
[06:25:24] [PASSED] test_too_big
[06:25:24] [PASSED] test_flush
[06:25:24] [PASSED] test_lookup
[06:25:24] [PASSED] test_data
[06:25:24] [PASSED] test_class
[06:25:24] ===================== [PASSED] guc_buf =====================
[06:25:24] =================== guc_dbm (7 subtests) ===================
[06:25:24] [PASSED] test_empty
[06:25:24] [PASSED] test_default
[06:25:24] ======================== test_size ========================
[06:25:24] [PASSED] 4
[06:25:24] [PASSED] 8
[06:25:24] [PASSED] 32
[06:25:24] [PASSED] 256
[06:25:24] ==================== [PASSED] test_size ====================
[06:25:24] ======================= test_reuse ========================
[06:25:24] [PASSED] 4
[06:25:24] [PASSED] 8
[06:25:24] [PASSED] 32
[06:25:24] [PASSED] 256
[06:25:24] =================== [PASSED] test_reuse ====================
[06:25:24] =================== test_range_overlap ====================
[06:25:24] [PASSED] 4
[06:25:24] [PASSED] 8
[06:25:24] [PASSED] 32
[06:25:24] [PASSED] 256
[06:25:24] =============== [PASSED] test_range_overlap ================
[06:25:24] =================== test_range_compact ====================
[06:25:24] [PASSED] 4
[06:25:24] [PASSED] 8
[06:25:24] [PASSED] 32
[06:25:24] [PASSED] 256
[06:25:24] =============== [PASSED] test_range_compact ================
[06:25:24] ==================== test_range_spare =====================
[06:25:24] [PASSED] 4
[06:25:24] [PASSED] 8
[06:25:24] [PASSED] 32
[06:25:24] [PASSED] 256
[06:25:24] ================ [PASSED] test_range_spare =================
[06:25:24] ===================== [PASSED] guc_dbm =====================
[06:25:24] ================== guc_idm (22 subtests) ===================
[06:25:24] [PASSED] bad_init
[06:25:24] [PASSED] no_init
[06:25:24] [PASSED] init_fini
[06:25:24] [PASSED] check_init_small
[06:25:24] [PASSED] check_init_shared
[06:25:24] [PASSED] check_used
[06:25:24] [PASSED] check_quota
[06:25:24] [PASSED] check_all
[06:25:24] [PASSED] check_limits
[06:25:24] [PASSED] check_overlap
[06:25:24] [PASSED] check_overlap_alloc
[06:25:24] [PASSED] check_overlap_release
[06:25:24] [PASSED] check_overlap_partial_init
[06:25:24] [PASSED] check_overlap_partial_shared_range_blocking
[06:25:24] [PASSED] check_used_usable
[06:25:24] [PASSED] check_used_shareable
[06:25:24] [PASSED] check_used_mixed
[06:25:24] [PASSED] check_release_usable_range
[06:25:24] [PASSED] check_release_shareable_range
[06:25:24] [PASSED] check_split_boundaries
[06:25:24] [PASSED] check_shareable_spare
[06:25:24] [PASSED] check_shareable_spare_fragmented_tail
[06:25:24] ===================== [PASSED] guc_idm =====================
[06:25:24] ============== guc_klv_helpers (13 subtests) ===============
[06:25:24] [PASSED] test_count
[06:25:24] [PASSED] test_encode_u32
[06:25:24] [PASSED] test_encode_u64
[06:25:24] [PASSED] test_encode_string
[06:25:24] [PASSED] test_encode_object_raw
[06:25:24] [PASSED] test_encode_object_klv
[06:25:24] [PASSED] test_encode_object_nested
[06:25:24] [PASSED] test_encode_object_basic
[06:25:24] ===================== test_decode_u16 =====================
[06:25:24] [PASSED] empty
[06:25:24] [PASSED] valid
[06:25:24] [PASSED] max
[06:25:24] [PASSED] big
[06:25:24] [PASSED] long
[06:25:24] ================= [PASSED] test_decode_u16 =================
[06:25:24] ===================== test_decode_u32 =====================
[06:25:24] [PASSED] empty
[06:25:24] [PASSED] valid
[06:25:24] [PASSED] max
[06:25:24] [PASSED] long
[06:25:24] ================= [PASSED] test_decode_u32 =================
[06:25:24] ===================== test_decode_u64 =====================
[06:25:24] [PASSED] empty
[06:25:24] [PASSED] short
[06:25:24] [PASSED] valid
[06:25:24] [PASSED] max
[06:25:24] [PASSED] long
[06:25:24] ================= [PASSED] test_decode_u64 =================
[06:25:24] ===================== test_decode_str =====================
[06:25:24] [PASSED] empty
[06:25:24] [PASSED] one
[06:25:24] [PASSED] one_trash
[06:25:24] [PASSED] two
[06:25:24] [PASSED] two_trash
[06:25:24] [PASSED] three
[06:25:24] [PASSED] dword
[06:25:24] [PASSED] four
[06:25:24] [PASSED] five
[06:25:24] [PASSED] six
[06:25:24] [PASSED] seven
[06:25:24] [PASSED] qword
[06:25:24] ================= [PASSED] test_decode_str =================
[06:25:24] [PASSED] test_print
[06:25:24] ================= [PASSED] guc_klv_helpers =================
[06:25:24] =================== xe_log (4 subtests) ====================
[06:25:24] [PASSED] demo_cper
[06:25:24] [PASSED] demo_dmesg
[06:25:24] ======================= test_dmesg ========================
[06:25:24] [PASSED] test_fatal
[06:25:24] [PASSED] test_fatal_tile
[06:25:24] [PASSED] test_fatal_gt
[06:25:24] [PASSED] test_fatal_comp
[06:25:24] [PASSED] test_fatal_comp_tile
[06:25:24] [PASSED] test_fatal_comp_gt
[06:25:24] [PASSED] test_fatal_all
[06:25:24] [PASSED] test_recoverable
[06:25:24] [PASSED] test_recoverable_tile
[06:25:24] [PASSED] test_recoverable_gt
[06:25:24] [PASSED] test_recoverable_comp
[06:25:24] [PASSED] test_recoverable_comp_tile
[06:25:24] [PASSED] test_recoverable_comp_gt
[06:25:24] [PASSED] test_recoverable_all
[06:25:24] [PASSED] test_info
[06:25:24] [PASSED] test_info_tile
[06:25:24] [PASSED] test_info_gt
[06:25:24] [PASSED] test_info_err
[06:25:24] [PASSED] test_info_comp
[06:25:24] [PASSED] test_info_comp_tile
[06:25:24] [PASSED] test_info_comp_gt
[06:25:24] [PASSED] test_info_all
[06:25:24] [PASSED] test_hw_fatal
[06:25:24] [PASSED] test_hw_recoverable
[06:25:24] [PASSED] test_hw_corrected
[06:25:24] [PASSED] test_hw_informational
[06:25:24] =================== [PASSED] test_dmesg ====================
[06:25:24] ====================== test_invalid =======================
[06:25:24] [SKIPPED] no-component no-location no-warn (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] reserved location (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] unknown location (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] nonzero-device-id location (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] invalid-tile-id location (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] invalid-gt-id location (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] unknown component class (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] unknown system component (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] unknown hardware component (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] [SKIPPED] unknown component and location (requires CONFIG_DRM_XE_DEBUG)
[06:25:24] ================== [SKIPPED] test_invalid ==================
[06:25:24] ===================== [PASSED] xe_log ======================
[06:25:24] ================== no_relay (3 subtests) ===================
[06:25:24] [PASSED] xe_drops_guc2pf_if_not_ready
[06:25:24] [PASSED] xe_drops_guc2vf_if_not_ready
[06:25:24] [PASSED] xe_rejects_send_if_not_ready
[06:25:24] ==================== [PASSED] no_relay =====================
[06:25:24] ================== pf_relay (14 subtests) ==================
[06:25:24] [PASSED] pf_rejects_guc2pf_too_short
[06:25:24] [PASSED] pf_rejects_guc2pf_too_long
[06:25:24] [PASSED] pf_rejects_guc2pf_no_payload
[06:25:24] [PASSED] pf_fails_no_payload
[06:25:24] [PASSED] pf_fails_bad_origin
[06:25:24] [PASSED] pf_fails_bad_type
[06:25:24] [PASSED] pf_txn_reports_error
[06:25:24] [PASSED] pf_txn_sends_pf2guc
[06:25:24] [PASSED] pf_sends_pf2guc
[06:25:24] [SKIPPED] pf_loopback_nop (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[06:25:24] [SKIPPED] pf_loopback_echo (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[06:25:24] [SKIPPED] pf_loopback_fail (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[06:25:24] [SKIPPED] pf_loopback_busy (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[06:25:24] [SKIPPED] pf_loopback_retry (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[06:25:24] ==================== [PASSED] pf_relay =====================
[06:25:24] ================== vf_relay (3 subtests) ===================
[06:25:24] [PASSED] vf_rejects_guc2vf_too_short
[06:25:24] [PASSED] vf_rejects_guc2vf_too_long
[06:25:24] [PASSED] vf_rejects_guc2vf_no_payload
[06:25:24] ==================== [PASSED] vf_relay =====================
[06:25:24] ================ pf_gt_config (9 subtests) =================
[06:25:24] [PASSED] fair_contexts_1vf
[06:25:24] [PASSED] fair_doorbells_1vf
[06:25:24] [PASSED] fair_ggtt_1vf
[06:25:24] ====================== fair_vram_1vf ======================
[06:25:24] [PASSED] 3.50 GiB
[06:25:24] [PASSED] 11.5 GiB
[06:25:24] [PASSED] 15.5 GiB
[06:25:24] [PASSED] 31.5 GiB
[06:25:24] [PASSED] 63.5 GiB
[06:25:24] [PASSED] 1.91 GiB
[06:25:24] ================== [PASSED] fair_vram_1vf ==================
[06:25:24] ================ fair_vram_1vf_admin_only =================
[06:25:24] [PASSED] 3.50 GiB
[06:25:24] [PASSED] 11.5 GiB
[06:25:24] [PASSED] 15.5 GiB
[06:25:24] [PASSED] 31.5 GiB
[06:25:24] [PASSED] 63.5 GiB
[06:25:24] [PASSED] 1.91 GiB
[06:25:24] ============ [PASSED] fair_vram_1vf_admin_only =============
[06:25:24] ====================== fair_contexts ======================
[06:25:24] [PASSED] 1 VF
[06:25:24] [PASSED] 2 VFs
[06:25:24] [PASSED] 3 VFs
[06:25:24] [PASSED] 4 VFs
[06:25:24] [PASSED] 5 VFs
[06:25:24] [PASSED] 6 VFs
[06:25:24] [PASSED] 7 VFs
[06:25:24] [PASSED] 8 VFs
[06:25:24] [PASSED] 9 VFs
[06:25:24] [PASSED] 10 VFs
[06:25:24] [PASSED] 11 VFs
[06:25:24] [PASSED] 12 VFs
[06:25:24] [PASSED] 13 VFs
[06:25:24] [PASSED] 14 VFs
[06:25:24] [PASSED] 15 VFs
[06:25:24] [PASSED] 16 VFs
[06:25:24] [PASSED] 17 VFs
[06:25:24] [PASSED] 18 VFs
[06:25:24] [PASSED] 19 VFs
[06:25:24] [PASSED] 20 VFs
[06:25:24] [PASSED] 21 VFs
[06:25:24] [PASSED] 22 VFs
[06:25:24] [PASSED] 23 VFs
[06:25:24] [PASSED] 24 VFs
[06:25:24] [PASSED] 25 VFs
[06:25:24] [PASSED] 26 VFs
[06:25:24] [PASSED] 27 VFs
[06:25:24] [PASSED] 28 VFs
[06:25:24] [PASSED] 29 VFs
[06:25:24] [PASSED] 30 VFs
[06:25:24] [PASSED] 31 VFs
[06:25:24] [PASSED] 32 VFs
[06:25:24] [PASSED] 33 VFs
[06:25:24] [PASSED] 34 VFs
[06:25:24] [PASSED] 35 VFs
[06:25:24] [PASSED] 36 VFs
[06:25:24] [PASSED] 37 VFs
[06:25:24] [PASSED] 38 VFs
[06:25:24] [PASSED] 39 VFs
[06:25:24] [PASSED] 40 VFs
[06:25:24] [PASSED] 41 VFs
[06:25:24] [PASSED] 42 VFs
[06:25:24] [PASSED] 43 VFs
[06:25:24] [PASSED] 44 VFs
[06:25:24] [PASSED] 45 VFs
[06:25:24] [PASSED] 46 VFs
[06:25:24] [PASSED] 47 VFs
[06:25:24] [PASSED] 48 VFs
[06:25:24] [PASSED] 49 VFs
[06:25:24] [PASSED] 50 VFs
[06:25:24] [PASSED] 51 VFs
[06:25:24] [PASSED] 52 VFs
[06:25:24] [PASSED] 53 VFs
[06:25:24] [PASSED] 54 VFs
[06:25:24] [PASSED] 55 VFs
[06:25:24] [PASSED] 56 VFs
[06:25:24] [PASSED] 57 VFs
[06:25:24] [PASSED] 58 VFs
[06:25:24] [PASSED] 59 VFs
[06:25:24] [PASSED] 60 VFs
[06:25:24] [PASSED] 61 VFs
[06:25:24] [PASSED] 62 VFs
[06:25:24] [PASSED] 63 VFs
[06:25:24] ================== [PASSED] fair_contexts ==================
[06:25:24] ===================== fair_doorbells ======================
[06:25:24] [PASSED] 1 VF
[06:25:24] [PASSED] 2 VFs
[06:25:24] [PASSED] 3 VFs
[06:25:24] [PASSED] 4 VFs
[06:25:24] [PASSED] 5 VFs
[06:25:24] [PASSED] 6 VFs
[06:25:24] [PASSED] 7 VFs
[06:25:24] [PASSED] 8 VFs
[06:25:24] [PASSED] 9 VFs
[06:25:24] [PASSED] 10 VFs
[06:25:24] [PASSED] 11 VFs
[06:25:24] [PASSED] 12 VFs
[06:25:24] [PASSED] 13 VFs
[06:25:24] [PASSED] 14 VFs
[06:25:24] [PASSED] 15 VFs
[06:25:24] [PASSED] 16 VFs
[06:25:24] [PASSED] 17 VFs
[06:25:24] [PASSED] 18 VFs
[06:25:24] [PASSED] 19 VFs
[06:25:24] [PASSED] 20 VFs
[06:25:24] [PASSED] 21 VFs
[06:25:24] [PASSED] 22 VFs
[06:25:24] [PASSED] 23 VFs
[06:25:24] [PASSED] 24 VFs
[06:25:24] [PASSED] 25 VFs
[06:25:24] [PASSED] 26 VFs
[06:25:24] [PASSED] 27 VFs
[06:25:24] [PASSED] 28 VFs
[06:25:24] [PASSED] 29 VFs
[06:25:24] [PASSED] 30 VFs
[06:25:24] [PASSED] 31 VFs
[06:25:24] [PASSED] 32 VFs
[06:25:24] [PASSED] 33 VFs
[06:25:24] [PASSED] 34 VFs
[06:25:24] [PASSED] 35 VFs
[06:25:24] [PASSED] 36 VFs
[06:25:24] [PASSED] 37 VFs
[06:25:24] [PASSED] 38 VFs
[06:25:24] [PASSED] 39 VFs
[06:25:24] [PASSED] 40 VFs
[06:25:24] [PASSED] 41 VFs
[06:25:24] [PASSED] 42 VFs
[06:25:24] [PASSED] 43 VFs
[06:25:24] [PASSED] 44 VFs
[06:25:24] [PASSED] 45 VFs
[06:25:24] [PASSED] 46 VFs
[06:25:24] [PASSED] 47 VFs
[06:25:24] [PASSED] 48 VFs
[06:25:24] [PASSED] 49 VFs
[06:25:24] [PASSED] 50 VFs
[06:25:24] [PASSED] 51 VFs
[06:25:24] [PASSED] 52 VFs
[06:25:24] [PASSED] 53 VFs
[06:25:24] [PASSED] 54 VFs
[06:25:24] [PASSED] 55 VFs
[06:25:24] [PASSED] 56 VFs
[06:25:24] [PASSED] 57 VFs
[06:25:24] [PASSED] 58 VFs
[06:25:24] [PASSED] 59 VFs
[06:25:24] [PASSED] 60 VFs
[06:25:24] [PASSED] 61 VFs
[06:25:24] [PASSED] 62 VFs
[06:25:24] [PASSED] 63 VFs
[06:25:24] ================= [PASSED] fair_doorbells ==================
[06:25:24] ======================== fair_ggtt ========================
[06:25:24] [PASSED] 1 VF
[06:25:24] [PASSED] 2 VFs
[06:25:24] [PASSED] 3 VFs
[06:25:24] [PASSED] 4 VFs
[06:25:24] [PASSED] 5 VFs
[06:25:24] [PASSED] 6 VFs
[06:25:24] [PASSED] 7 VFs
[06:25:24] [PASSED] 8 VFs
[06:25:24] [PASSED] 9 VFs
[06:25:24] [PASSED] 10 VFs
[06:25:24] [PASSED] 11 VFs
[06:25:24] [PASSED] 12 VFs
[06:25:24] [PASSED] 13 VFs
[06:25:24] [PASSED] 14 VFs
[06:25:24] [PASSED] 15 VFs
[06:25:24] [PASSED] 16 VFs
[06:25:24] [PASSED] 17 VFs
[06:25:24] [PASSED] 18 VFs
[06:25:24] [PASSED] 19 VFs
[06:25:24] [PASSED] 20 VFs
[06:25:24] [PASSED] 21 VFs
[06:25:24] [PASSED] 22 VFs
[06:25:24] [PASSED] 23 VFs
[06:25:24] [PASSED] 24 VFs
[06:25:24] [PASSED] 25 VFs
[06:25:24] [PASSED] 26 VFs
[06:25:24] [PASSED] 27 VFs
[06:25:24] [PASSED] 28 VFs
[06:25:24] [PASSED] 29 VFs
[06:25:24] [PASSED] 30 VFs
[06:25:24] [PASSED] 31 VFs
[06:25:24] [PASSED] 32 VFs
[06:25:24] [PASSED] 33 VFs
[06:25:24] [PASSED] 34 VFs
[06:25:24] [PASSED] 35 VFs
[06:25:24] [PASSED] 36 VFs
[06:25:24] [PASSED] 37 VFs
[06:25:24] [PASSED] 38 VFs
[06:25:24] [PASSED] 39 VFs
[06:25:24] [PASSED] 40 VFs
[06:25:24] [PASSED] 41 VFs
[06:25:24] [PASSED] 42 VFs
[06:25:24] [PASSED] 43 VFs
[06:25:24] [PASSED] 44 VFs
[06:25:24] [PASSED] 45 VFs
[06:25:24] [PASSED] 46 VFs
[06:25:24] [PASSED] 47 VFs
[06:25:24] [PASSED] 48 VFs
[06:25:24] [PASSED] 49 VFs
[06:25:24] [PASSED] 50 VFs
[06:25:24] [PASSED] 51 VFs
[06:25:24] [PASSED] 52 VFs
[06:25:24] [PASSED] 53 VFs
[06:25:24] [PASSED] 54 VFs
[06:25:24] [PASSED] 55 VFs
[06:25:24] [PASSED] 56 VFs
[06:25:24] [PASSED] 57 VFs
[06:25:24] [PASSED] 58 VFs
[06:25:24] [PASSED] 59 VFs
[06:25:24] [PASSED] 60 VFs
[06:25:24] [PASSED] 61 VFs
[06:25:24] [PASSED] 62 VFs
[06:25:24] [PASSED] 63 VFs
[06:25:24] ==================== [PASSED] fair_ggtt ====================
[06:25:24] ======================== fair_vram ========================
[06:25:24] [PASSED] 1 VF
[06:25:24] [PASSED] 2 VFs
[06:25:24] [PASSED] 3 VFs
[06:25:24] [PASSED] 4 VFs
[06:25:24] [PASSED] 5 VFs
[06:25:24] [PASSED] 6 VFs
[06:25:24] [PASSED] 7 VFs
[06:25:24] [PASSED] 8 VFs
[06:25:24] [PASSED] 9 VFs
[06:25:24] [PASSED] 10 VFs
[06:25:24] [PASSED] 11 VFs
[06:25:24] [PASSED] 12 VFs
[06:25:24] [PASSED] 13 VFs
[06:25:24] [PASSED] 14 VFs
[06:25:24] [PASSED] 15 VFs
[06:25:24] [PASSED] 16 VFs
[06:25:24] [PASSED] 17 VFs
[06:25:24] [PASSED] 18 VFs
[06:25:24] [PASSED] 19 VFs
[06:25:24] [PASSED] 20 VFs
[06:25:24] [PASSED] 21 VFs
[06:25:24] [PASSED] 22 VFs
[06:25:24] [PASSED] 23 VFs
[06:25:24] [PASSED] 24 VFs
[06:25:24] [PASSED] 25 VFs
[06:25:24] [PASSED] 26 VFs
[06:25:24] [PASSED] 27 VFs
[06:25:24] [PASSED] 28 VFs
[06:25:24] [PASSED] 29 VFs
[06:25:24] [PASSED] 30 VFs
[06:25:24] [PASSED] 31 VFs
[06:25:24] [PASSED] 32 VFs
[06:25:24] [PASSED] 33 VFs
[06:25:24] [PASSED] 34 VFs
[06:25:24] [PASSED] 35 VFs
[06:25:24] [PASSED] 36 VFs
[06:25:24] [PASSED] 37 VFs
[06:25:24] [PASSED] 38 VFs
[06:25:24] [PASSED] 39 VFs
[06:25:24] [PASSED] 40 VFs
[06:25:24] [PASSED] 41 VFs
[06:25:24] [PASSED] 42 VFs
[06:25:24] [PASSED] 43 VFs
[06:25:24] [PASSED] 44 VFs
[06:25:24] [PASSED] 45 VFs
[06:25:24] [PASSED] 46 VFs
[06:25:24] [PASSED] 47 VFs
[06:25:24] [PASSED] 48 VFs
[06:25:24] [PASSED] 49 VFs
[06:25:24] [PASSED] 50 VFs
[06:25:24] [PASSED] 51 VFs
[06:25:24] [PASSED] 52 VFs
[06:25:24] [PASSED] 53 VFs
[06:25:24] [PASSED] 54 VFs
[06:25:24] [PASSED] 55 VFs
[06:25:24] [PASSED] 56 VFs
[06:25:24] [PASSED] 57 VFs
[06:25:24] [PASSED] 58 VFs
[06:25:24] [PASSED] 59 VFs
[06:25:24] [PASSED] 60 VFs
[06:25:24] [PASSED] 61 VFs
[06:25:24] [PASSED] 62 VFs
[06:25:24] [PASSED] 63 VFs
[06:25:24] ==================== [PASSED] fair_vram ====================
[06:25:24] ================== [PASSED] pf_gt_config ===================
[06:25:24] ===================== lmtt (1 subtest) =====================
[06:25:24] ======================== test_ops =========================
[06:25:24] [PASSED] 2-level
[06:25:24] [PASSED] multi-level
[06:25:24] ==================== [PASSED] test_ops =====================
[06:25:24] ====================== [PASSED] lmtt =======================
[06:25:24] ================= sriov_packet (1 subtest) =================
[06:25:24] [PASSED] test_descriptor_init
[06:25:24] ================== [PASSED] sriov_packet ===================
[06:25:24] ================= pf_service (11 subtests) =================
[06:25:24] [PASSED] pf_negotiate_any
[06:25:24] [PASSED] pf_negotiate_base_match
[06:25:24] [PASSED] pf_negotiate_base_newer
[06:25:24] [PASSED] pf_negotiate_base_next
[06:25:24] [SKIPPED] pf_negotiate_base_older (no older minor)
[06:25:24] [PASSED] pf_negotiate_base_prev
[06:25:24] [PASSED] pf_negotiate_latest_match
[06:25:24] [PASSED] pf_negotiate_latest_newer
[06:25:24] [PASSED] pf_negotiate_latest_next
[06:25:24] [SKIPPED] pf_negotiate_latest_older (no older minor)
[06:25:24] [SKIPPED] pf_negotiate_latest_prev (no prev major)
[06:25:24] =================== [PASSED] pf_service ====================
[06:25:24] ================= xe_guc_g2g (2 subtests) ==================
[06:25:24] ============== xe_live_guc_g2g_kunit_default ==============
[06:25:24] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[06:25:24] ============== xe_live_guc_g2g_kunit_allmem ===============
[06:25:24] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[06:25:24] =================== [SKIPPED] xe_guc_g2g ===================
[06:25:24] =================== xe_mocs (2 subtests) ===================
[06:25:24] ================ xe_live_mocs_kernel_kunit ================
[06:25:24] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[06:25:24] ================ xe_live_mocs_reset_kunit =================
[06:25:24] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[06:25:24] ==================== [SKIPPED] xe_mocs =====================
[06:25:24] ================= xe_migrate (3 subtests) ==================
[06:25:24] ================= xe_migrate_sanity_kunit =================
[06:25:24] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[06:25:24] ================== xe_validate_ccs_kunit ==================
[06:25:24] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[06:25:24] ============= xe_migrate_access_memory_kunit ==============
[06:25:24] ========= [SKIPPED] xe_migrate_access_memory_kunit =========
[06:25:24] =================== [SKIPPED] xe_migrate ===================
[06:25:24] ================== xe_dma_buf (1 subtest) ==================
[06:25:24] ==================== xe_dma_buf_kunit =====================
[06:25:24] ================ [SKIPPED] xe_dma_buf_kunit ================
[06:25:24] =================== [SKIPPED] xe_dma_buf ===================
[06:25:24] ================= xe_bo_shrink (1 subtest) =================
[06:25:24] =================== xe_bo_shrink_kunit ====================
[06:25:24] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[06:25:24] ================== [SKIPPED] xe_bo_shrink ==================
[06:25:24] ==================== xe_bo (2 subtests) ====================
[06:25:24] ================== xe_ccs_migrate_kunit ===================
[06:25:24] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[06:25:24] ==================== xe_bo_evict_kunit ====================
[06:25:24] =============== [SKIPPED] xe_bo_evict_kunit ================
[06:25:24] ===================== [SKIPPED] xe_bo ======================
[06:25:24] =================== xe_any (9 subtests) ====================
[06:25:24] [PASSED] test_to_xe
[06:25:24] [PASSED] test_to_dev
[06:25:24] [PASSED] test_to_pdev
[06:25:24] [PASSED] test_to_drm
[06:25:24] [PASSED] test_if_pdev
[06:25:24] [PASSED] test_if_xe
[06:25:24] [PASSED] test_if_tile
[06:25:24] [PASSED] test_if_gt
[06:25:24] [PASSED] test_to_id
[06:25:24] ===================== [PASSED] xe_any ======================
[06:25:24] ==================== args (13 subtests) ====================
[06:25:24] [PASSED] count_args_test
[06:25:24] [PASSED] call_args_example
[06:25:24] [PASSED] call_args_test
[06:25:24] [PASSED] drop_first_arg_example
[06:25:24] [PASSED] drop_first_arg_test
[06:25:24] [PASSED] first_arg_example
[06:25:24] [PASSED] first_arg_test
[06:25:24] [PASSED] last_arg_example
[06:25:24] [PASSED] last_arg_test
[06:25:24] [PASSED] pick_arg_example
[06:25:24] [PASSED] if_args_example
[06:25:24] [PASSED] if_args_test
[06:25:24] [PASSED] sep_comma_example
[06:25:24] ====================== [PASSED] args =======================
[06:25:24] =================== xe_pci (3 subtests) ====================
[06:25:24] ==================== check_graphics_ip ====================
[06:25:24] [PASSED] 12.00 Xe_LP
[06:25:24] [PASSED] 12.10 Xe_LP+
[06:25:24] [PASSED] 12.55 Xe_HPG
[06:25:24] [PASSED] 12.60 Xe_HPC
[06:25:24] [PASSED] 12.70 Xe_LPG
[06:25:24] [PASSED] 12.71 Xe_LPG
[06:25:24] [PASSED] 12.74 Xe_LPG+
[06:25:24] [PASSED] 20.01 Xe2_HPG
[06:25:24] [PASSED] 20.02 Xe2_HPG
[06:25:24] [PASSED] 20.04 Xe2_LPG
[06:25:24] [PASSED] 30.00 Xe3_LPG
[06:25:24] [PASSED] 30.01 Xe3_LPG
[06:25:24] [PASSED] 30.03 Xe3_LPG
[06:25:24] [PASSED] 30.04 Xe3_LPG
[06:25:24] [PASSED] 30.05 Xe3_LPG
[06:25:24] [PASSED] 35.10 Xe3p_LPG
[06:25:24] [PASSED] 35.11 Xe3p_XPC
[06:25:24] ================ [PASSED] check_graphics_ip ================
[06:25:24] ===================== check_media_ip ======================
[06:25:24] [PASSED] 12.00 Xe_M
[06:25:24] [PASSED] 12.55 Xe_HPM
[06:25:24] [PASSED] 13.00 Xe_LPM+
[06:25:24] [PASSED] 13.01 Xe2_HPM
[06:25:24] [PASSED] 20.00 Xe2_LPM
[06:25:24] [PASSED] 30.00 Xe3_LPM
[06:25:24] [PASSED] 30.02 Xe3_LPM
[06:25:24] [PASSED] 35.00 Xe3p_LPM
[06:25:24] [PASSED] 35.03 Xe3p_HPM
[06:25:24] ================= [PASSED] check_media_ip ==================
[06:25:24] =================== check_platform_desc ===================
[06:25:24] [PASSED] 0x9A60 (TIGERLAKE)
[06:25:24] [PASSED] 0x9A68 (TIGERLAKE)
[06:25:24] [PASSED] 0x9A70 (TIGERLAKE)
[06:25:24] [PASSED] 0x9A40 (TIGERLAKE)
[06:25:24] [PASSED] 0x9A49 (TIGERLAKE)
[06:25:24] [PASSED] 0x9A59 (TIGERLAKE)
[06:25:24] [PASSED] 0x9A78 (TIGERLAKE)
[06:25:24] [PASSED] 0x9AC0 (TIGERLAKE)
[06:25:24] [PASSED] 0x9AC9 (TIGERLAKE)
[06:25:24] [PASSED] 0x9AD9 (TIGERLAKE)
[06:25:24] [PASSED] 0x9AF8 (TIGERLAKE)
[06:25:24] [PASSED] 0x4C80 (ROCKETLAKE)
[06:25:24] [PASSED] 0x4C8A (ROCKETLAKE)
[06:25:24] [PASSED] 0x4C8B (ROCKETLAKE)
[06:25:24] [PASSED] 0x4C8C (ROCKETLAKE)
[06:25:24] [PASSED] 0x4C90 (ROCKETLAKE)
[06:25:24] [PASSED] 0x4C9A (ROCKETLAKE)
[06:25:24] [PASSED] 0x4680 (ALDERLAKE_S)
[06:25:24] [PASSED] 0x4682 (ALDERLAKE_S)
[06:25:24] [PASSED] 0x4688 (ALDERLAKE_S)
[06:25:24] [PASSED] 0x468A (ALDERLAKE_S)
[06:25:24] [PASSED] 0x468B (ALDERLAKE_S)
[06:25:24] [PASSED] 0x4690 (ALDERLAKE_S)
[06:25:24] [PASSED] 0x4692 (ALDERLAKE_S)
[06:25:24] [PASSED] 0x4693 (ALDERLAKE_S)
[06:25:24] [PASSED] 0x46A0 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46A1 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46A2 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46A3 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46A6 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46A8 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46AA (ALDERLAKE_P)
[06:25:24] [PASSED] 0x462A (ALDERLAKE_P)
[06:25:24] [PASSED] 0x4626 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x4628 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46B0 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46B1 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46B2 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46B3 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46C0 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46C1 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46C2 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46C3 (ALDERLAKE_P)
[06:25:24] [PASSED] 0x46D0 (ALDERLAKE_N)
[06:25:24] [PASSED] 0x46D1 (ALDERLAKE_N)
[06:25:24] [PASSED] 0x46D2 (ALDERLAKE_N)
[06:25:24] [PASSED] 0x46D3 (ALDERLAKE_N)
[06:25:24] [PASSED] 0x46D4 (ALDERLAKE_N)
[06:25:24] [PASSED] 0xA721 (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA7A1 (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA7A9 (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA7AC (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA7AD (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA720 (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA7A0 (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA7A8 (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA7AA (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA7AB (ALDERLAKE_P)
[06:25:24] [PASSED] 0xA780 (ALDERLAKE_S)
[06:25:24] [PASSED] 0xA781 (ALDERLAKE_S)
[06:25:24] [PASSED] 0xA782 (ALDERLAKE_S)
[06:25:24] [PASSED] 0xA783 (ALDERLAKE_S)
[06:25:24] [PASSED] 0xA788 (ALDERLAKE_S)
[06:25:24] [PASSED] 0xA789 (ALDERLAKE_S)
[06:25:24] [PASSED] 0xA78A (ALDERLAKE_S)
[06:25:24] [PASSED] 0xA78B (ALDERLAKE_S)
[06:25:24] [PASSED] 0x4905 (DG1)
[06:25:24] [PASSED] 0x4906 (DG1)
[06:25:24] [PASSED] 0x4907 (DG1)
[06:25:24] [PASSED] 0x4908 (DG1)
[06:25:24] [PASSED] 0x4909 (DG1)
[06:25:24] [PASSED] 0x56C0 (DG2)
[06:25:24] [PASSED] 0x56C2 (DG2)
[06:25:24] [PASSED] 0x56C1 (DG2)
[06:25:24] [PASSED] 0x7D51 (METEORLAKE)
[06:25:24] [PASSED] 0x7DD1 (METEORLAKE)
[06:25:24] [PASSED] 0x7D41 (METEORLAKE)
[06:25:24] [PASSED] 0x7D67 (METEORLAKE)
[06:25:24] [PASSED] 0xB640 (METEORLAKE)
[06:25:24] [PASSED] 0x56A0 (DG2)
[06:25:24] [PASSED] 0x56A1 (DG2)
[06:25:24] [PASSED] 0x56A2 (DG2)
[06:25:24] [PASSED] 0x56BE (DG2)
[06:25:24] [PASSED] 0x56BF (DG2)
[06:25:24] [PASSED] 0x5690 (DG2)
[06:25:24] [PASSED] 0x5691 (DG2)
[06:25:24] [PASSED] 0x5692 (DG2)
[06:25:24] [PASSED] 0x56A5 (DG2)
[06:25:24] [PASSED] 0x56A6 (DG2)
[06:25:24] [PASSED] 0x56B0 (DG2)
[06:25:24] [PASSED] 0x56B1 (DG2)
[06:25:24] [PASSED] 0x56BA (DG2)
[06:25:24] [PASSED] 0x56BB (DG2)
[06:25:24] [PASSED] 0x56BC (DG2)
[06:25:24] [PASSED] 0x56BD (DG2)
[06:25:24] [PASSED] 0x5693 (DG2)
[06:25:24] [PASSED] 0x5694 (DG2)
[06:25:24] [PASSED] 0x5695 (DG2)
[06:25:24] [PASSED] 0x56A3 (DG2)
[06:25:24] [PASSED] 0x56A4 (DG2)
[06:25:24] [PASSED] 0x56B2 (DG2)
[06:25:24] [PASSED] 0x56B3 (DG2)
[06:25:24] [PASSED] 0x5696 (DG2)
[06:25:24] [PASSED] 0x5697 (DG2)
[06:25:24] [PASSED] 0xB69 (PVC)
[06:25:24] [PASSED] 0xB6E (PVC)
[06:25:24] [PASSED] 0xBD4 (PVC)
[06:25:24] [PASSED] 0xBD5 (PVC)
[06:25:24] [PASSED] 0xBD6 (PVC)
[06:25:24] [PASSED] 0xBD7 (PVC)
[06:25:24] [PASSED] 0xBD8 (PVC)
[06:25:24] [PASSED] 0xBD9 (PVC)
[06:25:24] [PASSED] 0xBDA (PVC)
[06:25:24] [PASSED] 0xBDB (PVC)
[06:25:24] [PASSED] 0xBE0 (PVC)
[06:25:24] [PASSED] 0xBE1 (PVC)
[06:25:24] [PASSED] 0xBE5 (PVC)
[06:25:24] [PASSED] 0x7D40 (METEORLAKE)
[06:25:24] [PASSED] 0x7D45 (METEORLAKE)
[06:25:24] [PASSED] 0x7D55 (METEORLAKE)
[06:25:24] [PASSED] 0x7D60 (METEORLAKE)
[06:25:24] [PASSED] 0x7DD5 (METEORLAKE)
[06:25:24] [PASSED] 0x6420 (LUNARLAKE)
[06:25:24] [PASSED] 0x64A0 (LUNARLAKE)
[06:25:24] [PASSED] 0x64B0 (LUNARLAKE)
[06:25:24] [PASSED] 0xE202 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE209 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE20B (BATTLEMAGE)
[06:25:24] [PASSED] 0xE20C (BATTLEMAGE)
[06:25:24] [PASSED] 0xE20D (BATTLEMAGE)
[06:25:24] [PASSED] 0xE210 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE211 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE212 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE216 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE220 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE221 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE222 (BATTLEMAGE)
[06:25:24] [PASSED] 0xE223 (BATTLEMAGE)
[06:25:24] [PASSED] 0xB080 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB081 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB082 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB083 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB084 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB085 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB086 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB087 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB08F (PANTHERLAKE)
[06:25:24] [PASSED] 0xB090 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB0A0 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB0A1 (PANTHERLAKE)
[06:25:24] [PASSED] 0xB0B0 (PANTHERLAKE)
[06:25:24] [PASSED] 0xFD80 (PANTHERLAKE)
[06:25:24] [PASSED] 0xFD81 (PANTHERLAKE)
[06:25:24] [PASSED] 0xD740 (NOVALAKE_S)
[06:25:24] [PASSED] 0xD741 (NOVALAKE_S)
[06:25:24] [PASSED] 0xD742 (NOVALAKE_S)
[06:25:24] [PASSED] 0xD743 (NOVALAKE_S)
[06:25:24] [PASSED] 0xD745 (NOVALAKE_S)
[06:25:24] [PASSED] 0xD74A (NOVALAKE_S)
[06:25:24] [PASSED] 0xD74B (NOVALAKE_S)
[06:25:24] [PASSED] 0x674C (CRESCENTISLAND)
[06:25:24] [PASSED] 0x674D (CRESCENTISLAND)
[06:25:24] [PASSED] 0x674E (CRESCENTISLAND)
[06:25:24] [PASSED] 0x674F (CRESCENTISLAND)
[06:25:24] [PASSED] 0x6750 (CRESCENTISLAND)
[06:25:24] [PASSED] 0x6751 (CRESCENTISLAND)
[06:25:24] [PASSED] 0x6752 (CRESCENTISLAND)
[06:25:24] [PASSED] 0x6753 (CRESCENTISLAND)
[06:25:24] [PASSED] 0x6754 (CRESCENTISLAND)
[06:25:24] [PASSED] 0x6755 (CRESCENTISLAND)
[06:25:24] [PASSED] 0x6756 (CRESCENTISLAND)
[06:25:24] [PASSED] 0xD750 (NOVALAKE_P)
[06:25:24] [PASSED] 0xD751 (NOVALAKE_P)
[06:25:24] [PASSED] 0xD752 (NOVALAKE_P)
[06:25:24] [PASSED] 0xD753 (NOVALAKE_P)
[06:25:24] [PASSED] 0xD754 (NOVALAKE_P)
[06:25:24] [PASSED] 0xD755 (NOVALAKE_P)
[06:25:24] [PASSED] 0xD756 (NOVALAKE_P)
[06:25:24] [PASSED] 0xD757 (NOVALAKE_P)
[06:25:24] [PASSED] 0xD75F (NOVALAKE_P)
[06:25:24] =============== [PASSED] check_platform_desc ===============
[06:25:24] ===================== [PASSED] xe_pci ======================
[06:25:24] ============= xe_rtp_tables_test (5 subtests) ==============
[06:25:24] ================== xe_rtp_table_gt_test ===================
[06:25:24] [PASSED] gt_was/14011060649
[06:25:24] [PASSED] gt_was/14011059788
[06:25:24] [PASSED] gt_was/14015795083
[06:25:24] [PASSED] gt_was/16021867713
[06:25:24] [PASSED] gt_was/14019449301
[06:25:24] [PASSED] gt_was/16028005424
[06:25:24] [PASSED] gt_was/14026578760
[06:25:24] [PASSED] gt_was/1409420604
[06:25:24] [PASSED] gt_was/1408615072
[06:25:24] [PASSED] gt_was/22010523718
[06:25:24] [PASSED] gt_was/14011006942
[06:25:24] [PASSED] gt_was/14014830051
[06:25:24] [PASSED] gt_was/18018781329
[06:25:24] [PASSED] gt_was/1509235366
[06:25:24] [PASSED] gt_was/18018781329
[06:25:24] [PASSED] gt_was/16016694945
[06:25:24] [PASSED] gt_was/14018575942
[06:25:24] [PASSED] gt_was/22016670082
[06:25:24] [PASSED] gt_was/22016670082
[06:25:24] [PASSED] gt_was/14017421178
[06:25:24] [PASSED] gt_was/16025250150
[06:25:24] [PASSED] gt_was/14021871409
[06:25:24] [PASSED] gt_was/16021865536
[06:25:24] [PASSED] gt_was/14021486841
[06:25:24] [PASSED] gt_was/14025160223
[06:25:24] [PASSED] gt_was/14026144927, 16029437861, 14026127056
[06:25:24] [PASSED] gt_was/14025635424
[06:25:24] [PASSED] gt_was/16028005424
[06:25:24] ============== [PASSED] xe_rtp_table_gt_test ===============
[06:25:24] ================== xe_rtp_table_gt_test ===================
[06:25:24] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable
[06:25:24] [PASSED] gt_tunings/Tuning: 32B Access Enable
[06:25:24] [PASSED] gt_tunings/Tuning: L3 cache
[06:25:24] [PASSED] gt_tunings/Tuning: L3 cache - media
[06:25:24] [PASSED] gt_tunings/Tuning: Compression Overfetch
[06:25:24] [PASSED] gt_tunings/Tuning: Compression Overfetch - media
[06:25:24] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3
[06:25:24] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media
[06:25:24] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only
[06:25:24] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media
[06:25:24] [PASSED] gt_tunings/Tuning: Stateless compression control
[06:25:24] [PASSED] gt_tunings/Tuning: Stateless compression control - media
[06:25:24] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache
[06:25:24] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media
[06:25:24] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB
[06:25:24] [PASSED] gt_tunings/Tuning: Force All Non-Compressible Memory Reads to be 256B Overfetches
[06:25:24] ============== [PASSED] xe_rtp_table_gt_test ===============
[06:25:24] ================== xe_rtp_table_oob_test ==================
[06:25:24] [PASSED] oob_was/1607983814
[06:25:24] [PASSED] oob_was/16010904313
[06:25:24] [PASSED] oob_was/18022495364
[06:25:24] [PASSED] oob_was/22012773006
[06:25:24] [PASSED] oob_was/14014475959
[06:25:24] [PASSED] oob_was/22011391025
[06:25:24] [PASSED] oob_was/22012727170
[06:25:24] [PASSED] oob_was/22012727685
[06:25:24] [PASSED] oob_was/22016596838
[06:25:24] [PASSED] oob_was/18020744125
[06:25:24] [PASSED] oob_was/1409600907
[06:25:24] [PASSED] oob_was/22014953428
[06:25:24] [PASSED] oob_was/16017236439
[06:25:24] [PASSED] oob_was/14019821291
[06:25:24] [PASSED] oob_was/14015076503
[06:25:24] [PASSED] oob_was/22016122933
[06:25:24] [PASSED] oob_was/14018913170
[06:25:24] [PASSED] oob_was/14018094691
[06:25:24] [PASSED] oob_was/18024947630
[06:25:24] [PASSED] oob_was/16022287689
[06:25:24] [PASSED] oob_was/13011645652
[06:25:24] [PASSED] oob_was/14022293748
[06:25:24] [PASSED] oob_was/22019794406
[06:25:24] [PASSED] oob_was/22019338487
[06:25:24] [PASSED] oob_was/16023588340
[06:25:24] [PASSED] oob_was/14019789679
[06:25:24] [PASSED] oob_was/14022866841
[06:25:24] [PASSED] oob_was/16021333562
[06:25:24] [PASSED] oob_was/14016712196
[06:25:24] [PASSED] oob_was/14015568240
[06:25:24] [PASSED] oob_was/18013179988
[06:25:24] [PASSED] oob_was/1508761755
[06:25:24] [PASSED] oob_was/16023105232
[06:25:24] [PASSED] oob_was/16026508708
[06:25:24] [PASSED] oob_was/14020001231
[06:25:24] [PASSED] oob_was/16023683509
[06:25:24] [PASSED] oob_was/14025515070
[06:25:24] [PASSED] oob_was/15015404425_disable
[06:25:24] [PASSED] oob_was/16026007364
[06:25:24] [PASSED] oob_was/14020316580
[06:25:24] [PASSED] oob_was/14025883347
[06:25:24] [PASSED] oob_was/16029380221
[06:25:24] [PASSED] oob_was/22022079272
[06:25:24] [PASSED] oob_was/16029897822
[06:25:24] [PASSED] oob_was/14026539277
[06:25:24] [PASSED] oob_was/14027054324
[06:25:24] [PASSED] oob_was/14025941587
[06:25:24] [PASSED] oob_was/16030224309
[06:25:24] [PASSED] oob_was/14028709524
[06:25:24] [PASSED] oob_was/14028250015
[06:25:24] [PASSED] oob_was/16031259911
[06:25:24] ============== [PASSED] xe_rtp_table_oob_test ==============
[06:25:24] ================ xe_rtp_table_dev_oob_test ================
[06:25:24] [PASSED] device_oob_was/22010954014
[06:25:24] [PASSED] device_oob_was/15015404425
[06:25:24] [PASSED] device_oob_was/22019338487_display
[06:25:24] [PASSED] device_oob_was/14022085890
[06:25:24] [PASSED] device_oob_was/14026633728
[06:25:24] [PASSED] device_oob_was/14026746987
[06:25:24] [PASSED] device_oob_was/14026779378
[06:25:24] [PASSED] device_oob_was/14028586678
[06:25:24] [PASSED] device_oob_was/14028434957
[06:25:24] ============ [PASSED] xe_rtp_table_dev_oob_test ============
[06:25:24] ========== xe_rtp_table_missing_upper_bound_test ==========
[06:25:24] [PASSED] register_whitelist/WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865
[06:25:24] [PASSED] register_whitelist/1508744258, 14012131227, 1808121037
[06:25:24] [PASSED] register_whitelist/1806527549
[06:25:24] [PASSED] register_whitelist/allow_read_ctx_timestamp
[06:25:24] [PASSED] register_whitelist/allow_read_queue_timestamp
[06:25:24] [PASSED] register_whitelist/16014440446
[06:25:24] [PASSED] register_whitelist/16017236439
[06:25:24] [PASSED] register_whitelist/16020183090
[06:25:24] [PASSED] register_whitelist/14024997852
[06:25:24] [PASSED] register_whitelist/14024997852
[06:25:24] ====== [PASSED] xe_rtp_table_missing_upper_bound_test ======
[06:25:24] =============== [PASSED] xe_rtp_tables_test ================
[06:25:24] =================== xe_rtp (3 subtests) ====================
[06:25:24] =================== xe_rtp_rules_tests ====================
[06:25:24] [PASSED] no
[06:25:24] [PASSED] yes
[06:25:24] [PASSED] no-and-no
[06:25:24] [PASSED] no-and-yes
[06:25:24] [PASSED] yes-and-no
[06:25:24] [PASSED] yes-and-yes
[06:25:24] [PASSED] no-or-no
[06:25:24] [PASSED] no-or-yes
[06:25:24] [PASSED] yes-or-no
[06:25:24] [PASSED] yes-or-yes
[06:25:24] [PASSED] no-yes-or-yes-no
[06:25:24] [PASSED] no-yes-or-yes-yes
[06:25:24] [PASSED] yes-yes-or-no-yes
[06:25:24] [PASSED] yes-yes-or-yes-yes
[06:25:24] [PASSED] no-no-or-yes-or-no
[06:25:24] [PASSED] or
[06:25:24] [PASSED] or-yes
[06:25:24] [PASSED] or-no
[06:25:24] [PASSED] yes-or
[06:25:24] [PASSED] no-or
[06:25:24] [PASSED] no-or-or-yes
[06:25:24] [PASSED] yes-or-or-no
[06:25:24] [PASSED] no-or-or-no
[06:25:24] [PASSED] missing-context-engine-class
[06:25:24] [PASSED] missing-context-engine-class-or-yes
[06:25:24] [PASSED] missing-context-engine-class-or-or-yes
[06:25:24] =============== [PASSED] xe_rtp_rules_tests ================
[06:25:24] =============== xe_rtp_process_to_sr_tests ================
[06:25:24] [PASSED] coalesce-same-reg
[06:25:24] [PASSED] coalesce-same-reg-literal-and-func
[06:25:24] [PASSED] no-match-no-add
[06:25:24] [PASSED] two-regs-two-entries
[06:25:24] [PASSED] clr-one-set-other
[06:25:24] [PASSED] set-field
[06:25:24] [PASSED] conflict-duplicate
[06:25:24] [PASSED] conflict-not-disjoint
[06:25:24] [PASSED] conflict-not-disjoint-literal-and-func
[06:25:24] [PASSED] conflict-reg-type
[06:25:24] [PASSED] bad-mcr-reg-forced-to-regular
[06:25:24] [PASSED] bad-regular-reg-forced-to-mcr
[06:25:24] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[06:25:24] ================== xe_rtp_process_tests ===================
[06:25:24] [PASSED] active1
[06:25:24] [PASSED] active2
[06:25:24] [PASSED] active-inactive
[06:25:24] [PASSED] inactive-active
[06:25:24] [PASSED] inactive-active-inactive
[06:25:24] [PASSED] inactive-inactive-inactive
[06:25:24] ============== [PASSED] xe_rtp_process_tests ===============
[06:25:24] ===================== [PASSED] xe_rtp ======================
[06:25:24] ==================== xe_wa (1 subtest) =====================
[06:25:25] ======================== xe_wa_gt =========================
[06:25:25] [PASSED] TIGERLAKE B0
[06:25:25] [PASSED] DG1 A0
[06:25:25] [PASSED] DG1 B0
[06:25:25] [PASSED] ALDERLAKE_S A0
[06:25:25] [PASSED] ALDERLAKE_S B0
[06:25:25] [PASSED] ALDERLAKE_S C0
[06:25:25] [PASSED] ALDERLAKE_S D0
[06:25:25] [PASSED] ALDERLAKE_P A0
[06:25:25] [PASSED] ALDERLAKE_P B0
[06:25:25] [PASSED] ALDERLAKE_P C0
[06:25:25] [PASSED] ALDERLAKE_S RPLS D0
[06:25:25] [PASSED] ALDERLAKE_P RPLU E0
[06:25:25] [PASSED] DG2 G10 C0
[06:25:25] [PASSED] DG2 G11 B1
[06:25:25] [PASSED] DG2 G12 A1
[06:25:25] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[06:25:25] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[06:25:25] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[06:25:25] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[06:25:25] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[06:25:25] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[06:25:25] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[06:25:25] ==================== [PASSED] xe_wa_gt =====================
[06:25:25] ====================== [PASSED] xe_wa ======================
[06:25:25] ============================================================
[06:25:25] Testing complete. Ran 860 tests: passed: 831, skipped: 29
[06:25:25] Elapsed time: 41.832s total, 2.583s configuring, 38.483s building, 0.723s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[06:25:25] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[06:25:27] 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=48
[06:25:53] Starting KUnit Kernel (1/1)...
[06:25:53] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[06:25:53] ============ drm_test_pick_cmdline (2 subtests) ============
[06:25:53] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[06:25:53] =============== drm_test_pick_cmdline_named ===============
[06:25:53] [PASSED] NTSC
[06:25:53] [PASSED] NTSC-J
[06:25:53] [PASSED] PAL
[06:25:53] [PASSED] PAL-M
[06:25:53] =========== [PASSED] drm_test_pick_cmdline_named ===========
[06:25:53] ============== [PASSED] drm_test_pick_cmdline ==============
[06:25:53] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[06:25:53] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[06:25:53] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[06:25:53] =========== drm_validate_clone_mode (2 subtests) ===========
[06:25:53] ============== drm_test_check_in_clone_mode ===============
[06:25:53] [PASSED] in_clone_mode
[06:25:53] [PASSED] not_in_clone_mode
[06:25:53] ========== [PASSED] drm_test_check_in_clone_mode ===========
[06:25:53] =============== drm_test_check_valid_clones ===============
[06:25:53] [PASSED] not_in_clone_mode
[06:25:53] [PASSED] valid_clone
[06:25:53] [PASSED] invalid_clone
[06:25:53] =========== [PASSED] drm_test_check_valid_clones ===========
[06:25:53] ============= [PASSED] drm_validate_clone_mode =============
[06:25:53] ============= drm_validate_modeset (1 subtest) =============
[06:25:53] [PASSED] drm_test_check_connector_changed_modeset
[06:25:53] ============== [PASSED] drm_validate_modeset ===============
[06:25:53] ====== drm_test_bridge_get_current_state (1 subtest) =======
[06:25:53] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[06:25:53] ======== [PASSED] drm_test_bridge_get_current_state ========
[06:25:53] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[06:25:53] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[06:25:53] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[06:25:53] [PASSED] drm_test_drm_bridge_helper_hdmi_output_bus_fmts
[06:25:53] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[06:25:53] ============== drm_bridge_alloc (2 subtests) ===============
[06:25:53] [PASSED] drm_test_drm_bridge_alloc_basic
[06:25:53] [PASSED] drm_test_drm_bridge_alloc_get_put
[06:25:53] ================ [PASSED] drm_bridge_alloc =================
[06:25:53] ============= drm_bridge_bus_fmt (5 subtests) ==============
[06:25:53] [PASSED] drm_test_bridge_rgb_yuv_rgb
[06:25:53] [PASSED] drm_test_bridge_must_convert_to_yuv444
[06:25:53] [PASSED] drm_test_bridge_hdmi_auto_rgb
[06:25:53] [PASSED] drm_test_bridge_auto_first
[06:25:53] [PASSED] drm_test_bridge_rgb_yuv_no_path
[06:25:53] =============== [PASSED] drm_bridge_bus_fmt ================
[06:25:53] ============= drm_cmdline_parser (40 subtests) =============
[06:25:53] [PASSED] drm_test_cmdline_force_d_only
[06:25:53] [PASSED] drm_test_cmdline_force_D_only_dvi
[06:25:53] [PASSED] drm_test_cmdline_force_D_only_hdmi
[06:25:53] [PASSED] drm_test_cmdline_force_D_only_not_digital
[06:25:53] [PASSED] drm_test_cmdline_force_e_only
[06:25:53] [PASSED] drm_test_cmdline_res
[06:25:53] [PASSED] drm_test_cmdline_res_vesa
[06:25:53] [PASSED] drm_test_cmdline_res_vesa_rblank
[06:25:53] [PASSED] drm_test_cmdline_res_rblank
[06:25:53] [PASSED] drm_test_cmdline_res_bpp
[06:25:53] [PASSED] drm_test_cmdline_res_refresh
[06:25:53] [PASSED] drm_test_cmdline_res_bpp_refresh
[06:25:53] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[06:25:53] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[06:25:53] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[06:25:53] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[06:25:53] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[06:25:53] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[06:25:53] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[06:25:53] [PASSED] drm_test_cmdline_res_margins_force_on
[06:25:53] [PASSED] drm_test_cmdline_res_vesa_margins
[06:25:53] [PASSED] drm_test_cmdline_name
[06:25:53] [PASSED] drm_test_cmdline_name_bpp
[06:25:53] [PASSED] drm_test_cmdline_name_option
[06:25:53] [PASSED] drm_test_cmdline_name_bpp_option
[06:25:53] [PASSED] drm_test_cmdline_rotate_0
[06:25:53] [PASSED] drm_test_cmdline_rotate_90
[06:25:53] [PASSED] drm_test_cmdline_rotate_180
[06:25:53] [PASSED] drm_test_cmdline_rotate_270
[06:25:53] [PASSED] drm_test_cmdline_hmirror
[06:25:53] [PASSED] drm_test_cmdline_vmirror
[06:25:53] [PASSED] drm_test_cmdline_margin_options
[06:25:53] [PASSED] drm_test_cmdline_multiple_options
[06:25:53] [PASSED] drm_test_cmdline_bpp_extra_and_option
[06:25:53] [PASSED] drm_test_cmdline_extra_and_option
[06:25:53] [PASSED] drm_test_cmdline_freestanding_options
[06:25:53] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[06:25:53] [PASSED] drm_test_cmdline_panel_orientation
[06:25:53] ================ drm_test_cmdline_invalid =================
[06:25:53] [PASSED] margin_only
[06:25:53] [PASSED] interlace_only
[06:25:53] [PASSED] res_missing_x
[06:25:53] [PASSED] res_missing_y
[06:25:53] [PASSED] res_bad_y
[06:25:53] [PASSED] res_missing_y_bpp
[06:25:53] [PASSED] res_bad_bpp
[06:25:53] [PASSED] res_bad_refresh
[06:25:53] [PASSED] res_bpp_refresh_force_on_off
[06:25:53] [PASSED] res_invalid_mode
[06:25:53] [PASSED] res_bpp_wrong_place_mode
[06:25:53] [PASSED] name_bpp_refresh
[06:25:53] [PASSED] name_refresh
[06:25:53] [PASSED] name_refresh_wrong_mode
[06:25:53] [PASSED] name_refresh_invalid_mode
[06:25:53] [PASSED] rotate_multiple
[06:25:53] [PASSED] rotate_invalid_val
[06:25:53] [PASSED] rotate_truncated
[06:25:53] [PASSED] invalid_option
[06:25:53] [PASSED] invalid_tv_option
[06:25:53] [PASSED] truncated_tv_option
[06:25:53] ============ [PASSED] drm_test_cmdline_invalid =============
[06:25:53] =============== drm_test_cmdline_tv_options ===============
[06:25:53] [PASSED] NTSC
[06:25:53] [PASSED] NTSC_443
[06:25:53] [PASSED] NTSC_J
[06:25:53] [PASSED] PAL
[06:25:53] [PASSED] PAL_M
[06:25:53] [PASSED] PAL_N
[06:25:53] [PASSED] SECAM
[06:25:53] [PASSED] MONO_525
[06:25:53] [PASSED] MONO_625
[06:25:53] =========== [PASSED] drm_test_cmdline_tv_options ===========
[06:25:53] =============== [PASSED] drm_cmdline_parser ================
[06:25:53] ========== drmm_connector_hdmi_init (20 subtests) ==========
[06:25:53] [PASSED] drm_test_connector_hdmi_init_valid
[06:25:53] [PASSED] drm_test_connector_hdmi_init_bpc_8
[06:25:53] [PASSED] drm_test_connector_hdmi_init_bpc_10
[06:25:53] [PASSED] drm_test_connector_hdmi_init_bpc_12
[06:25:53] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[06:25:53] [PASSED] drm_test_connector_hdmi_init_bpc_null
[06:25:53] [PASSED] drm_test_connector_hdmi_init_formats_empty
[06:25:53] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[06:25:53] === drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[06:25:53] [PASSED] supported_formats=0x9 yuv420_allowed=1
[06:25:53] [PASSED] supported_formats=0x9 yuv420_allowed=0
[06:25:53] [PASSED] supported_formats=0x5 yuv420_allowed=1
[06:25:53] [PASSED] supported_formats=0x5 yuv420_allowed=0
[06:25:53] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[06:25:53] [PASSED] drm_test_connector_hdmi_init_null_ddc
[06:25:53] [PASSED] drm_test_connector_hdmi_init_null_product
[06:25:53] [PASSED] drm_test_connector_hdmi_init_null_vendor
[06:25:53] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[06:25:53] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[06:25:53] [PASSED] drm_test_connector_hdmi_init_product_valid
[06:25:53] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[06:25:53] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[06:25:53] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[06:25:53] ========= drm_test_connector_hdmi_init_type_valid =========
[06:25:53] [PASSED] HDMI-A
[06:25:53] [PASSED] HDMI-B
[06:25:53] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[06:25:53] ======== drm_test_connector_hdmi_init_type_invalid ========
[06:25:53] [PASSED] Unknown
[06:25:53] [PASSED] VGA
[06:25:53] [PASSED] DVI-I
[06:25:53] [PASSED] DVI-D
[06:25:53] [PASSED] DVI-A
[06:25:53] [PASSED] Composite
[06:25:53] [PASSED] SVIDEO
[06:25:53] [PASSED] LVDS
[06:25:53] [PASSED] Component
[06:25:53] [PASSED] DIN
[06:25:53] [PASSED] DP
[06:25:53] [PASSED] TV
[06:25:53] [PASSED] eDP
[06:25:53] [PASSED] Virtual
[06:25:53] [PASSED] DSI
[06:25:53] [PASSED] DPI
[06:25:53] [PASSED] Writeback
[06:25:53] [PASSED] SPI
[06:25:53] [PASSED] USB
[06:25:53] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[06:25:53] ============ [PASSED] drmm_connector_hdmi_init =============
[06:25:53] ============= drmm_connector_init (3 subtests) =============
[06:25:53] [PASSED] drm_test_drmm_connector_init
[06:25:53] [PASSED] drm_test_drmm_connector_init_null_ddc
[06:25:53] ========= drm_test_drmm_connector_init_type_valid =========
[06:25:53] [PASSED] Unknown
[06:25:53] [PASSED] VGA
[06:25:53] [PASSED] DVI-I
[06:25:53] [PASSED] DVI-D
[06:25:53] [PASSED] DVI-A
[06:25:53] [PASSED] Composite
[06:25:53] [PASSED] SVIDEO
[06:25:53] [PASSED] LVDS
[06:25:53] [PASSED] Component
[06:25:53] [PASSED] DIN
[06:25:53] [PASSED] DP
[06:25:53] [PASSED] HDMI-A
[06:25:53] [PASSED] HDMI-B
[06:25:53] [PASSED] TV
[06:25:53] [PASSED] eDP
[06:25:53] [PASSED] Virtual
[06:25:53] [PASSED] DSI
[06:25:53] [PASSED] DPI
[06:25:53] [PASSED] Writeback
[06:25:53] [PASSED] SPI
[06:25:53] [PASSED] USB
[06:25:53] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[06:25:53] =============== [PASSED] drmm_connector_init ===============
[06:25:53] ========= drm_connector_dynamic_init (6 subtests) ==========
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_init
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_init_properties
[06:25:53] ===== drm_test_drm_connector_dynamic_init_type_valid ======
[06:25:53] [PASSED] Unknown
[06:25:53] [PASSED] VGA
[06:25:53] [PASSED] DVI-I
[06:25:53] [PASSED] DVI-D
[06:25:53] [PASSED] DVI-A
[06:25:53] [PASSED] Composite
[06:25:53] [PASSED] SVIDEO
[06:25:53] [PASSED] LVDS
[06:25:53] [PASSED] Component
[06:25:53] [PASSED] DIN
[06:25:53] [PASSED] DP
[06:25:53] [PASSED] HDMI-A
[06:25:53] [PASSED] HDMI-B
[06:25:53] [PASSED] TV
[06:25:53] [PASSED] eDP
[06:25:53] [PASSED] Virtual
[06:25:53] [PASSED] DSI
[06:25:53] [PASSED] DPI
[06:25:53] [PASSED] Writeback
[06:25:53] [PASSED] SPI
[06:25:53] [PASSED] USB
[06:25:53] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[06:25:53] ======== drm_test_drm_connector_dynamic_init_name =========
[06:25:53] [PASSED] Unknown
[06:25:53] [PASSED] VGA
[06:25:53] [PASSED] DVI-I
[06:25:53] [PASSED] DVI-D
[06:25:53] [PASSED] DVI-A
[06:25:53] [PASSED] Composite
[06:25:53] [PASSED] SVIDEO
[06:25:53] [PASSED] LVDS
[06:25:53] [PASSED] Component
[06:25:53] [PASSED] DIN
[06:25:53] [PASSED] DP
[06:25:53] [PASSED] HDMI-A
[06:25:53] [PASSED] HDMI-B
[06:25:53] [PASSED] TV
[06:25:53] [PASSED] eDP
[06:25:53] [PASSED] Virtual
[06:25:53] [PASSED] DSI
[06:25:53] [PASSED] DPI
[06:25:53] [PASSED] Writeback
[06:25:53] [PASSED] SPI
[06:25:53] [PASSED] USB
[06:25:53] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[06:25:53] =========== [PASSED] drm_connector_dynamic_init ============
[06:25:53] ==== drm_connector_dynamic_register_early (4 subtests) =====
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[06:25:53] ====== [PASSED] drm_connector_dynamic_register_early =======
[06:25:53] ======= drm_connector_dynamic_register (7 subtests) ========
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[06:25:53] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[06:25:53] ========= [PASSED] drm_connector_dynamic_register ==========
[06:25:53] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[06:25:53] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[06:25:53] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[06:25:53] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[06:25:53] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[06:25:53] ========== drm_test_get_tv_mode_from_name_valid ===========
[06:25:53] [PASSED] NTSC
[06:25:53] [PASSED] NTSC-443
[06:25:53] [PASSED] NTSC-J
[06:25:53] [PASSED] PAL
[06:25:53] [PASSED] PAL-M
[06:25:53] [PASSED] PAL-N
[06:25:53] [PASSED] SECAM
[06:25:53] [PASSED] Mono
[06:25:53] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[06:25:53] [PASSED] drm_test_get_tv_mode_from_name_truncated
[06:25:53] ============ [PASSED] drm_get_tv_mode_from_name ============
[06:25:53] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[06:25:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[06:25:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[06:25:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[06:25:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[06:25:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[06:25:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[06:25:53] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid =
[06:25:53] [PASSED] VIC 96
[06:25:53] [PASSED] VIC 97
[06:25:53] [PASSED] VIC 101
[06:25:53] [PASSED] VIC 102
[06:25:53] [PASSED] VIC 106
[06:25:53] [PASSED] VIC 107
[06:25:53] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[06:25:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[06:25:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[06:25:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[06:25:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[06:25:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[06:25:53] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[06:25:53] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[06:25:53] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ====
[06:25:53] [PASSED] Automatic
[06:25:53] [PASSED] Full
[06:25:53] [PASSED] Limited 16:235
[06:25:53] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[06:25:53] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[06:25:53] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[06:25:53] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[06:25:53] === drm_test_drm_hdmi_connector_get_output_format_name ====
[06:25:53] [PASSED] RGB
[06:25:53] [PASSED] YUV 4:2:0
[06:25:53] [PASSED] YUV 4:2:2
[06:25:53] [PASSED] YUV 4:4:4
[06:25:53] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[06:25:53] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[06:25:53] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[06:25:53] ============= drm_damage_helper (21 subtests) ==============
[06:25:53] [PASSED] drm_test_damage_iter_no_damage
[06:25:53] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[06:25:53] [PASSED] drm_test_damage_iter_no_damage_src_moved
[06:25:53] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[06:25:53] [PASSED] drm_test_damage_iter_no_damage_not_visible
[06:25:53] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[06:25:53] [PASSED] drm_test_damage_iter_no_damage_no_fb
[06:25:53] [PASSED] drm_test_damage_iter_simple_damage
[06:25:53] [PASSED] drm_test_damage_iter_single_damage
[06:25:53] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[06:25:53] [PASSED] drm_test_damage_iter_single_damage_outside_src
[06:25:53] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[06:25:53] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[06:25:53] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[06:25:53] [PASSED] drm_test_damage_iter_single_damage_src_moved
[06:25:53] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[06:25:53] [PASSED] drm_test_damage_iter_damage
[06:25:53] [PASSED] drm_test_damage_iter_damage_one_intersect
[06:25:53] [PASSED] drm_test_damage_iter_damage_one_outside
[06:25:53] [PASSED] drm_test_damage_iter_damage_src_moved
[06:25:53] [PASSED] drm_test_damage_iter_damage_not_visible
[06:25:53] ================ [PASSED] drm_damage_helper ================
[06:25:53] ============== drm_dp_mst_helper (3 subtests) ==============
[06:25:53] ============== drm_test_dp_mst_calc_pbn_mode ==============
[06:25:53] [PASSED] Clock 154000 BPP 30 DSC disabled
[06:25:53] [PASSED] Clock 234000 BPP 30 DSC disabled
[06:25:53] [PASSED] Clock 297000 BPP 24 DSC disabled
[06:25:53] [PASSED] Clock 332880 BPP 24 DSC enabled
[06:25:53] [PASSED] Clock 324540 BPP 24 DSC enabled
[06:25:53] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[06:25:53] ============== drm_test_dp_mst_calc_pbn_div ===============
[06:25:53] [PASSED] Link rate 2000000 lane count 4
[06:25:53] [PASSED] Link rate 2000000 lane count 2
[06:25:53] [PASSED] Link rate 2000000 lane count 1
[06:25:53] [PASSED] Link rate 1350000 lane count 4
[06:25:53] [PASSED] Link rate 1350000 lane count 2
[06:25:53] [PASSED] Link rate 1350000 lane count 1
[06:25:53] [PASSED] Link rate 1000000 lane count 4
[06:25:53] [PASSED] Link rate 1000000 lane count 2
[06:25:53] [PASSED] Link rate 1000000 lane count 1
[06:25:53] [PASSED] Link rate 810000 lane count 4
[06:25:53] [PASSED] Link rate 810000 lane count 2
[06:25:53] [PASSED] Link rate 810000 lane count 1
[06:25:53] [PASSED] Link rate 540000 lane count 4
[06:25:53] [PASSED] Link rate 540000 lane count 2
[06:25:53] [PASSED] Link rate 540000 lane count 1
[06:25:53] [PASSED] Link rate 270000 lane count 4
[06:25:53] [PASSED] Link rate 270000 lane count 2
[06:25:53] [PASSED] Link rate 270000 lane count 1
[06:25:53] [PASSED] Link rate 162000 lane count 4
[06:25:53] [PASSED] Link rate 162000 lane count 2
[06:25:53] [PASSED] Link rate 162000 lane count 1
[06:25:53] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[06:25:53] ========= drm_test_dp_mst_sideband_msg_req_decode =========
[06:25:53] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[06:25:53] [PASSED] DP_POWER_UP_PHY with port number
[06:25:53] [PASSED] DP_POWER_DOWN_PHY with port number
[06:25:53] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[06:25:53] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[06:25:53] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[06:25:53] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[06:25:53] [PASSED] DP_QUERY_PAYLOAD with port number
[06:25:53] [PASSED] DP_QUERY_PAYLOAD with VCPI
[06:25:53] [PASSED] DP_REMOTE_DPCD_READ with port number
[06:25:53] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[06:25:53] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[06:25:53] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[06:25:53] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[06:25:53] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[06:25:53] [PASSED] DP_REMOTE_I2C_READ with port number
[06:25:53] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[06:25:53] [PASSED] DP_REMOTE_I2C_READ with transactions array
[06:25:53] [PASSED] DP_REMOTE_I2C_WRITE with port number
[06:25:53] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[06:25:53] [PASSED] DP_REMOTE_I2C_WRITE with data array
[06:25:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[06:25:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[06:25:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[06:25:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[06:25:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[06:25:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[06:25:53] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[06:25:53] ================ [PASSED] drm_dp_mst_helper ================
[06:25:53] ================== drm_exec (7 subtests) ===================
[06:25:53] [PASSED] sanitycheck
[06:25:53] [PASSED] test_lock
[06:25:53] [PASSED] test_lock_unlock
[06:25:53] [PASSED] test_duplicates
[06:25:53] [PASSED] test_prepare
[06:25:53] [PASSED] test_prepare_array
[06:25:53] [PASSED] test_multiple_loops
[06:25:53] ==================== [PASSED] drm_exec =====================
[06:25:53] =========== drm_format_helper_test (17 subtests) ===========
[06:25:53] ============== drm_test_fb_xrgb8888_to_gray8 ==============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[06:25:53] ============= drm_test_fb_xrgb8888_to_rgb332 ==============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[06:25:53] ============= drm_test_fb_xrgb8888_to_rgb565 ==============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[06:25:53] ============ drm_test_fb_xrgb8888_to_xrgb1555 =============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[06:25:53] ============ drm_test_fb_xrgb8888_to_argb1555 =============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[06:25:53] ============ drm_test_fb_xrgb8888_to_rgba5551 =============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[06:25:53] ============= drm_test_fb_xrgb8888_to_rgb888 ==============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[06:25:53] ============= drm_test_fb_xrgb8888_to_bgr888 ==============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[06:25:53] ============ drm_test_fb_xrgb8888_to_argb8888 =============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[06:25:53] =========== drm_test_fb_xrgb8888_to_xrgb2101010 ===========
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[06:25:53] =========== drm_test_fb_xrgb8888_to_argb2101010 ===========
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[06:25:53] ============== drm_test_fb_xrgb8888_to_mono ===============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[06:25:53] ==================== drm_test_fb_swab =====================
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ================ [PASSED] drm_test_fb_swab =================
[06:25:53] ============ drm_test_fb_xrgb8888_to_xbgr8888 =============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[06:25:53] ============ drm_test_fb_xrgb8888_to_abgr8888 =============
[06:25:53] [PASSED] single_pixel_source_buffer
[06:25:53] [PASSED] single_pixel_clip_rectangle
[06:25:53] [PASSED] well_known_colors
[06:25:53] [PASSED] destination_pitch
[06:25:53] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[06:25:53] ================= drm_test_fb_clip_offset =================
[06:25:53] [PASSED] pass through
[06:25:53] [PASSED] horizontal offset
[06:25:53] [PASSED] vertical offset
[06:25:53] [PASSED] horizontal and vertical offset
[06:25:53] [PASSED] horizontal offset (custom pitch)
[06:25:53] [PASSED] vertical offset (custom pitch)
[06:25:53] [PASSED] horizontal and vertical offset (custom pitch)
[06:25:53] ============= [PASSED] drm_test_fb_clip_offset =============
[06:25:53] =================== drm_test_fb_memcpy ====================
[06:25:53] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[06:25:53] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[06:25:53] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[06:25:53] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[06:25:53] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[06:25:53] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[06:25:53] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[06:25:53] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[06:25:53] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[06:25:53] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[06:25:53] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[06:25:53] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[06:25:53] =============== [PASSED] drm_test_fb_memcpy ================
[06:25:53] ============= [PASSED] drm_format_helper_test ==============
[06:25:53] ================= drm_format (18 subtests) =================
[06:25:53] [PASSED] drm_test_format_block_width_invalid
[06:25:53] [PASSED] drm_test_format_block_width_one_plane
[06:25:53] [PASSED] drm_test_format_block_width_two_plane
[06:25:53] [PASSED] drm_test_format_block_width_three_plane
[06:25:53] [PASSED] drm_test_format_block_width_tiled
[06:25:53] [PASSED] drm_test_format_block_height_invalid
[06:25:53] [PASSED] drm_test_format_block_height_one_plane
[06:25:53] [PASSED] drm_test_format_block_height_two_plane
[06:25:53] [PASSED] drm_test_format_block_height_three_plane
[06:25:53] [PASSED] drm_test_format_block_height_tiled
[06:25:53] [PASSED] drm_test_format_min_pitch_invalid
[06:25:53] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[06:25:53] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[06:25:53] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[06:25:53] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[06:25:53] [PASSED] drm_test_format_min_pitch_two_plane
[06:25:53] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[06:25:53] [PASSED] drm_test_format_min_pitch_tiled
[06:25:53] =================== [PASSED] drm_format ====================
[06:25:53] ============== drm_framebuffer (10 subtests) ===============
[06:25:53] ========== drm_test_framebuffer_check_src_coords ==========
[06:25:53] [PASSED] Success: source fits into fb
[06:25:53] [PASSED] Fail: overflowing fb with x-axis coordinate
[06:25:53] [PASSED] Fail: overflowing fb with y-axis coordinate
[06:25:53] [PASSED] Fail: overflowing fb with source width
[06:25:53] [PASSED] Fail: overflowing fb with source height
[06:25:53] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[06:25:53] [PASSED] drm_test_framebuffer_cleanup
[06:25:53] =============== drm_test_framebuffer_create ===============
[06:25:53] [PASSED] ABGR8888 normal sizes
[06:25:53] [PASSED] ABGR8888 max sizes
[06:25:53] [PASSED] ABGR8888 pitch greater than min required
[06:25:53] [PASSED] ABGR8888 pitch less than min required
[06:25:53] [PASSED] ABGR8888 Invalid width
[06:25:53] [PASSED] ABGR8888 Invalid buffer handle
[06:25:53] [PASSED] No pixel format
[06:25:53] [PASSED] ABGR8888 Width 0
[06:25:53] [PASSED] ABGR8888 Height 0
[06:25:53] [PASSED] ABGR8888 Out of bound height * pitch combination
[06:25:53] [PASSED] ABGR8888 Large buffer offset
[06:25:53] [PASSED] ABGR8888 Buffer offset for inexistent plane
[06:25:53] [PASSED] ABGR8888 Invalid flag
[06:25:53] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[06:25:53] [PASSED] ABGR8888 Valid buffer modifier
[06:25:53] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[06:25:53] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[06:25:53] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[06:25:53] [PASSED] NV12 Normal sizes
[06:25:53] [PASSED] NV12 Max sizes
[06:25:53] [PASSED] NV12 Invalid pitch
[06:25:53] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[06:25:53] [PASSED] NV12 different modifier per-plane
[06:25:53] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[06:25:53] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[06:25:53] [PASSED] NV12 Modifier for inexistent plane
[06:25:53] [PASSED] NV12 Handle for inexistent plane
[06:25:53] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[06:25:53] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[06:25:53] [PASSED] YVU420 Normal sizes
[06:25:53] [PASSED] YVU420 Max sizes
[06:25:53] [PASSED] YVU420 Invalid pitch
[06:25:53] [PASSED] YVU420 Different pitches
[06:25:53] [PASSED] YVU420 Different buffer offsets/pitches
[06:25:53] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[06:25:53] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[06:25:53] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[06:25:53] [PASSED] YVU420 Valid modifier
[06:25:53] [PASSED] YVU420 Different modifiers per plane
[06:25:53] [PASSED] YVU420 Modifier for inexistent plane
[06:25:53] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[06:25:53] [PASSED] X0L2 Normal sizes
[06:25:53] [PASSED] X0L2 Max sizes
[06:25:53] [PASSED] X0L2 Invalid pitch
[06:25:53] [PASSED] X0L2 Pitch greater than minimum required
[06:25:53] [PASSED] X0L2 Handle for inexistent plane
[06:25:53] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[06:25:53] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[06:25:53] [PASSED] X0L2 Valid modifier
[06:25:53] [PASSED] X0L2 Modifier for inexistent plane
[06:25:53] =========== [PASSED] drm_test_framebuffer_create ===========
[06:25:53] [PASSED] drm_test_framebuffer_free
[06:25:53] [PASSED] drm_test_framebuffer_init
[06:25:53] [PASSED] drm_test_framebuffer_init_bad_format
[06:25:53] [PASSED] drm_test_framebuffer_init_dev_mismatch
[06:25:53] [PASSED] drm_test_framebuffer_lookup
[06:25:53] [PASSED] drm_test_framebuffer_lookup_inexistent
[06:25:53] [PASSED] drm_test_framebuffer_modifiers_not_supported
[06:25:53] ================= [PASSED] drm_framebuffer =================
[06:25:53] ================ drm_gem_shmem (8 subtests) ================
[06:25:53] [PASSED] drm_gem_shmem_test_obj_create
[06:25:53] [PASSED] drm_gem_shmem_test_obj_create_private
[06:25:53] [PASSED] drm_gem_shmem_test_pin_pages
[06:25:53] [PASSED] drm_gem_shmem_test_vmap
[06:25:53] [PASSED] drm_gem_shmem_test_get_sg_table
[06:25:53] [PASSED] drm_gem_shmem_test_get_pages_sgt
[06:25:53] [PASSED] drm_gem_shmem_test_madvise
[06:25:53] [PASSED] drm_gem_shmem_test_purge
[06:25:53] ================== [PASSED] drm_gem_shmem ==================
[06:25:53] === drm_atomic_helper_connector_hdmi_check (29 subtests) ===
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[06:25:53] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 =======
[06:25:53] [PASSED] Automatic
[06:25:53] [PASSED] Full
[06:25:53] [PASSED] Limited 16:235
[06:25:53] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[06:25:53] [PASSED] drm_test_check_disable_connector
[06:25:53] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[06:25:53] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[06:25:53] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[06:25:53] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[06:25:53] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[06:25:53] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[06:25:53] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[06:25:53] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[06:25:53] [PASSED] drm_test_check_output_bpc_dvi
[06:25:53] [PASSED] drm_test_check_output_bpc_format_vic_1
[06:25:53] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[06:25:53] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[06:25:53] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[06:25:53] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[06:25:53] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[06:25:53] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[06:25:53] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[06:25:53] ============ drm_test_check_hdmi_color_format =============
[06:25:53] [PASSED] AUTO -> RGB
[06:25:53] [PASSED] YCBCR422 -> YUV422
[06:25:53] [PASSED] YCBCR420 -> YUV420
[06:25:53] [PASSED] YCBCR444 -> YUV444
[06:25:53] [PASSED] RGB -> RGB
[06:25:53] ======== [PASSED] drm_test_check_hdmi_color_format =========
[06:25:53] ======== drm_test_check_hdmi_color_format_420_only ========
[06:25:53] [PASSED] RGB should fail
[06:25:53] [PASSED] YUV444 should fail
[06:25:53] [PASSED] YUV422 should fail
[06:25:53] [PASSED] YUV420 should work
[06:25:53] ==== [PASSED] drm_test_check_hdmi_color_format_420_only ====
[06:25:53] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[06:25:53] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[06:25:53] [PASSED] drm_test_check_broadcast_rgb_value
[06:25:53] [PASSED] drm_test_check_bpc_8_value
[06:25:53] [PASSED] drm_test_check_bpc_10_value
[06:25:53] [PASSED] drm_test_check_bpc_12_value
[06:25:53] [PASSED] drm_test_check_format_value
[06:25:53] [PASSED] drm_test_check_tmds_char_value
[06:25:53] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[06:25:53] = drm_atomic_helper_connector_hdmi_mode_valid (7 subtests) =
[06:25:53] [PASSED] drm_test_check_mode_valid
[06:25:53] [PASSED] drm_test_check_mode_valid_reject
[06:25:53] [PASSED] drm_test_check_mode_valid_reject_rate
[06:25:53] [PASSED] drm_test_check_mode_valid_reject_max_clock
[06:25:53] [PASSED] drm_test_check_mode_valid_yuv420_only_max_clock
[06:25:53] [PASSED] drm_test_check_mode_valid_reject_yuv420_only_connector
[06:25:53] [PASSED] drm_test_check_mode_valid_accept_yuv420_also_connector_rgb
[06:25:53] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[06:25:53] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[06:25:53] [PASSED] drm_test_check_infoframes
[06:25:53] [PASSED] drm_test_check_reject_avi_infoframe
[06:25:53] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[06:25:53] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[06:25:53] [PASSED] drm_test_check_reject_audio_infoframe
[06:25:53] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[06:25:53] ================= drm_managed (2 subtests) =================
[06:25:53] [PASSED] drm_test_managed_release_action
[06:25:53] [PASSED] drm_test_managed_run_action
[06:25:53] =================== [PASSED] drm_managed ===================
[06:25:53] =================== drm_mm (6 subtests) ====================
[06:25:53] [PASSED] drm_test_mm_init
[06:25:53] [PASSED] drm_test_mm_debug
[06:25:53] [PASSED] drm_test_mm_align32
[06:25:53] [PASSED] drm_test_mm_align64
[06:25:53] [PASSED] drm_test_mm_lowest
[06:25:53] [PASSED] drm_test_mm_highest
[06:25:53] ===================== [PASSED] drm_mm ======================
[06:25:53] ============= drm_modes_analog_tv (5 subtests) =============
[06:25:53] [PASSED] drm_test_modes_analog_tv_mono_576i
[06:25:53] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[06:25:53] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[06:25:53] [PASSED] drm_test_modes_analog_tv_pal_576i
[06:25:53] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[06:25:53] =============== [PASSED] drm_modes_analog_tv ===============
[06:25:53] ============== drm_panic_helper (3 subtests) ===============
[06:25:53] ============= drm_test_panic_screen_user_map ==============
[06:25:53] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258)
[06:25:53] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258)
[06:25:53] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[06:25:53] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752)
[06:25:53] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752)
[06:25:53] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258)
[06:25:53] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258)
[06:25:53] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[06:25:53] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752)
[06:25:53] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752)
[06:25:53] ========= [PASSED] drm_test_panic_screen_user_map ==========
[06:25:53] ============= drm_test_panic_screen_user_page =============
[06:25:53] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752)
[06:25:54] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752)
[06:25:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752)
[06:25:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752)
[06:25:54] ========= [PASSED] drm_test_panic_screen_user_page =========
[06:25:54] ========== drm_test_panic_screen_user_set_pixel ===========
[06:25:54] [PASSED] Panic screen user, mode: 1024 x 768 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen user, mode: 494 x 494 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen user, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen user, mode: 1024 x 768 RG16 little-endian (0x36314752)
[06:25:54] [PASSED] Panic screen user, mode: 1024 x 768 RG24 little-endian (0x34324752)
[06:25:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen kmsg, mode: 494 x 494 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen kmsg, mode: 1920 x 1080 XR24 little-endian (0x34325258)
[06:25:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG16 little-endian (0x36314752)
[06:25:54] [PASSED] Panic screen kmsg, mode: 1024 x 768 RG24 little-endian (0x34324752)
[06:25:54] ====== [PASSED] drm_test_panic_screen_user_set_pixel =======
[06:25:54] ================ [PASSED] drm_panic_helper =================
[06:25:54] ============== drm_plane_helper (2 subtests) ===============
[06:25:54] =============== drm_test_check_plane_state ================
[06:25:54] [PASSED] clipping_simple
[06:25:54] [PASSED] clipping_rotate_reflect
[06:25:54] [PASSED] positioning_simple
[06:25:54] [PASSED] upscaling
[06:25:54] [PASSED] downscaling
[06:25:54] [PASSED] rounding1
[06:25:54] [PASSED] rounding2
[06:25:54] [PASSED] rounding3
[06:25:54] [PASSED] rounding4
[06:25:54] =========== [PASSED] drm_test_check_plane_state ============
[06:25:54] =========== drm_test_check_invalid_plane_state ============
[06:25:54] [PASSED] positioning_invalid
[06:25:54] [PASSED] upscaling_invalid
[06:25:54] [PASSED] downscaling_invalid
[06:25:54] ======= [PASSED] drm_test_check_invalid_plane_state ========
[06:25:54] ================ [PASSED] drm_plane_helper =================
[06:25:54] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[06:25:54] ====== drm_test_connector_helper_tv_get_modes_check =======
[06:25:54] [PASSED] None
[06:25:54] [PASSED] PAL
[06:25:54] [PASSED] NTSC
[06:25:54] [PASSED] Both, NTSC Default
[06:25:54] [PASSED] Both, PAL Default
[06:25:54] [PASSED] Both, NTSC Default, with PAL on command-line
[06:25:54] [PASSED] Both, PAL Default, with NTSC on command-line
[06:25:54] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[06:25:54] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[06:25:54] ================== drm_rect (9 subtests) ===================
[06:25:54] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[06:25:54] [PASSED] drm_test_rect_clip_scaled_not_clipped
[06:25:54] [PASSED] drm_test_rect_clip_scaled_clipped
[06:25:54] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[06:25:54] ================= drm_test_rect_intersect =================
[06:25:54] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[06:25:54] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[06:25:54] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[06:25:54] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[06:25:54] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[06:25:54] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[06:25:54] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[06:25:54] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[06:25:54] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[06:25:54] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[06:25:54] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[06:25:54] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[06:25:54] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[06:25:54] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[06:25:54] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[06:25:54] ============= [PASSED] drm_test_rect_intersect =============
[06:25:54] ================ drm_test_rect_calc_hscale ================
[06:25:54] [PASSED] normal use
[06:25:54] [PASSED] out of max range
[06:25:54] [PASSED] out of min range
[06:25:54] [PASSED] zero dst
[06:25:54] [PASSED] negative src
[06:25:54] [PASSED] negative dst
[06:25:54] ============ [PASSED] drm_test_rect_calc_hscale ============
[06:25:54] ================ drm_test_rect_calc_vscale ================
[06:25:54] [PASSED] normal use
[06:25:54] [PASSED] out of max range
[06:25:54] [PASSED] out of min range
[06:25:54] [PASSED] zero dst
[06:25:54] [PASSED] negative src
[06:25:54] [PASSED] negative dst
[06:25:54] ============ [PASSED] drm_test_rect_calc_vscale ============
[06:25:54] ================== drm_test_rect_rotate ===================
[06:25:54] [PASSED] reflect-x
[06:25:54] [PASSED] reflect-y
[06:25:54] [PASSED] rotate-0
[06:25:54] [PASSED] rotate-90
[06:25:54] [PASSED] rotate-180
[06:25:54] [PASSED] rotate-270
[06:25:54] ============== [PASSED] drm_test_rect_rotate ===============
[06:25:54] ================ drm_test_rect_rotate_inv =================
[06:25:54] [PASSED] reflect-x
[06:25:54] [PASSED] reflect-y
[06:25:54] [PASSED] rotate-0
[06:25:54] [PASSED] rotate-90
[06:25:54] [PASSED] rotate-180
[06:25:54] [PASSED] rotate-270
[06:25:54] ============ [PASSED] drm_test_rect_rotate_inv =============
[06:25:54] ==================== [PASSED] drm_rect =====================
[06:25:54] ============ drm_sysfb_modeset_test (1 subtest) ============
[06:25:54] ============ drm_test_sysfb_build_fourcc_list =============
[06:25:54] [PASSED] no native formats
[06:25:54] [PASSED] XRGB8888 as native format
[06:25:54] [PASSED] remove duplicates
[06:25:54] [PASSED] convert alpha formats
[06:25:54] [PASSED] random formats
[06:25:54] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[06:25:54] ============= [PASSED] drm_sysfb_modeset_test ==============
[06:25:54] ================== drm_fixp (2 subtests) ===================
[06:25:54] [PASSED] drm_test_int2fixp
[06:25:54] [PASSED] drm_test_sm2fixp
[06:25:54] ==================== [PASSED] drm_fixp =====================
[06:25:54] ============================================================
[06:25:54] Testing complete. Ran 667 tests: passed: 667
[06:25:54] Elapsed time: 28.886s total, 2.585s configuring, 25.935s building, 0.343s running
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
[06:25:54] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[06:25:56] 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=48
[06:26:07] Starting KUnit Kernel (1/1)...
[06:26:07] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[06:26:07] ================= ttm_device (5 subtests) ==================
[06:26:07] [PASSED] ttm_device_init_basic
[06:26:07] [PASSED] ttm_device_init_multiple
[06:26:07] [PASSED] ttm_device_fini_basic
[06:26:07] [PASSED] ttm_device_init_no_vma_man
[06:26:07] ================== ttm_device_init_pools ==================
[06:26:07] [PASSED] No DMA allocations, no DMA32 required
[06:26:07] [PASSED] DMA allocations, DMA32 required
[06:26:07] [PASSED] No DMA allocations, DMA32 required
[06:26:07] [PASSED] DMA allocations, no DMA32 required
[06:26:07] ============== [PASSED] ttm_device_init_pools ==============
[06:26:07] =================== [PASSED] ttm_device ====================
[06:26:07] ================== ttm_pool (8 subtests) ===================
[06:26:07] ================== ttm_pool_alloc_basic ===================
[06:26:07] [PASSED] One page
[06:26:07] [PASSED] More than one page
[06:26:07] [PASSED] Above the allocation limit
[06:26:07] [PASSED] One page, with coherent DMA mappings enabled
[06:26:07] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[06:26:07] ============== [PASSED] ttm_pool_alloc_basic ===============
[06:26:07] ============== ttm_pool_alloc_basic_dma_addr ==============
[06:26:07] [PASSED] One page
[06:26:07] [PASSED] More than one page
[06:26:07] [PASSED] Above the allocation limit
[06:26:07] [PASSED] One page, with coherent DMA mappings enabled
[06:26:07] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[06:26:07] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[06:26:07] [PASSED] ttm_pool_alloc_order_caching_match
[06:26:07] [PASSED] ttm_pool_alloc_caching_mismatch
[06:26:07] [PASSED] ttm_pool_alloc_order_mismatch
[06:26:07] [PASSED] ttm_pool_free_dma_alloc
[06:26:07] [PASSED] ttm_pool_free_no_dma_alloc
[06:26:07] [ERROR] Test: ttm_pool: missing expected subtest!
[06:26:07]
[06:26:07] Pid: 80, comm: kunit_try_catch Tainted: G W N 7.4.0-rc4-gc7d3b10d7020
[06:26:07] RIP: 0033:list_lru_count_node+0xe/0x20
[06:26:07] RSP: 00000000dc0dbef8 EFLAGS: 00010246
[06:26:07] RAX: 0000000000000001 RBX: 00000000dc003c90 RCX: 0000000000000021
[06:26:07] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 000000009c053030
[06:26:07] RBP: 000000009c053000 R08: 00000000dc0dbe98 R09: 0000000000000000
[06:26:07] R10: 00000000dabc7a60 R11: 0000000000000000 R12: 0000000060121160
[06:26:07] R13: 000000009c053030 R14: 000000006046f120 R15: 00000000604ba488
[06:26:07] Kernel panic - not syncing: Segfault with no mm
[06:26:07] [CRASHED]
[06:26:07] [ERROR] Test: ttm_pool: missing subtest result line!
[06:26:07] # module: ttm_pool_test
[06:26:07] ==================== [CRASHED] ttm_pool ====================
[06:26:07] [ERROR] Test: main: missing expected subtest!
[06:26:07] [CRASHED]
[06:26:07] [ERROR] Test: main: missing expected subtest!
[06:26:07] [CRASHED]
[06:26:07] [ERROR] Test: main: missing expected subtest!
[06:26:07] [CRASHED]
[06:26:07] [ERROR] Test: main: missing expected subtest!
[06:26:07] [CRASHED]
[06:26:07] ============================================================
[06:26:07] Testing complete. Ran 28 tests: passed: 23, crashed: 5, errors: 6
The kernel seems to have crashed; you can decode the stack traces with:
$ scripts/decode_stacktrace.sh .kunit/vmlinux .kunit < .kunit/test.log | tee .kunit/decoded.log | /kernel/tools/testing/kunit/kunit.py parse
[06:26:07] Elapsed time: 13.176s total, 2.490s configuring, 10.420s building, 0.266s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2 02/11] drm/ttm: Add TTM_NUMA_POLICY_BIND
2026-11-24 6:21 ` [RFC v2 02/11] drm/ttm: Add TTM_NUMA_POLICY_BIND Himal Prasad Ghimiray
@ 2026-11-24 6:29 ` sashiko-bot
0 siblings, 0 replies; 16+ messages in thread
From: sashiko-bot @ 2026-11-24 6:29 UTC (permalink / raw)
To: Himal Prasad Ghimiray; +Cc: dri-devel, intel-xe, amd-gfx
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] drm/ttm: __ttm_pool_alloc() only checks first_node() in pool
for BIND policy
- [Medium] drm/ttm: ttm_pool_alloc_bind_pass() omits __GFP_NOWARN on
non-final nodes
- [Low] drm/ttm: inaccurate node order in TTM_NUMA_POLICY_BIND
kernel-doc comment
--
commit a807e823bf27ab4c849adb0b91f8553524818abe
Author: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
drm/ttm: Add TTM_NUMA_POLICY_BIND
This commit adds TTM_NUMA_POLICY_BIND to enum ttm_numa_policy to restrict
system page allocations to the nodes in ttm_operation_ctx.numa_info.nodes,
trying them in nearest-first order from the pool's local node.
> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> index e9e6ee266c2ff..8976de3a552d1 100644
> --- a/drivers/gpu/drm/ttm/ttm_pool.c
> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> @@ -780,6 +780,56 @@ static unsigned int ttm_pool_alloc_find_order(unsigned int highest,
> return min_t(unsigned int, highest, __fls(alloc->remaining_pages));
> }
>
> +/*
> + * Try the nodes in @nodes once each, nearest first from the local node.
> + * __GFP_THISNODE prevents fallback to nodes outside the policy.
> + */
> +static struct page *ttm_pool_alloc_bind_pass(struct ttm_pool *pool,
> + gfp_t gfp_flags, unsigned int order,
> + const nodemask_t *nodes)
> +{
> + int local = ttm_pool_nid(pool);
> + nodemask_t todo = *nodes;
> + struct page *p = NULL;
> +
> + while (!nodes_empty(todo)) {
> + int nid = first_node(todo), n;
> +
> + for_each_node_mask(n, todo) {
> + if (node_distance(local, n) < node_distance(local, nid))
> + nid = n;
> + }
> + node_clear(nid, todo);
> +
> + p = ttm_pool_alloc_page(pool, gfp_flags | __GFP_THISNODE, order,
> + nid);
> + if (p)
> + break;
> + }
> +
> + return p;
> +}
[Severity: Medium]
Can ttm_pool_alloc_bind_pass() emit a spurious warn_alloc() splat when
direct reclaim fails on an earlier node in todo even though a later node in
the bind mask succeeds?
In the second pass of ttm_pool_alloc_bind(), gfp_flags lacks __GFP_NOWARN
for order-0 allocations when !ctx->gfp_retry_mayfail, and
ttm_pool_alloc_page() only adds __GFP_NOWARN when order != 0. Passing
__GFP_NOWARN while !nodes_empty(todo) would avoid warning before all bound
nodes have been tried.
[ ... ]
> @@ -858,8 +908,12 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
> if (!p) {
> page_caching = ttm_cached;
> allow_pools = false;
> - p = ttm_pool_alloc_page(pool, gfp_flags, order,
> - alloc_nid);
> + if (policy == TTM_NUMA_POLICY_BIND)
> + p = ttm_pool_alloc_bind(pool, gfp_flags, order,
> + ctx->numa_info.nodes);
> + else
> + p = ttm_pool_alloc_page(pool, gfp_flags, order,
> + alloc_nid);
> }
> /* If that fails, lower the order if possible and retry. */
> if (!p) {
[Severity: High]
Does the TTM pool lookup above this fallback only check
first_node(*ctx->numa_info.nodes) for TTM_NUMA_POLICY_BIND instead of
trying the bound nodes in nearest-first order?
drivers/gpu/drm/ttm/ttm_pool.c:__ttm_pool_alloc() {
...
if (policy != TTM_NUMA_POLICY_NONE) {
/* Start at the single node of the policy */
alloc_nid = first_node(*ctx->numa_info.nodes);
take_nid = alloc_nid;
}
...
pt = ttm_pool_select_type(pool, page_caching, order);
if (pt && allow_pools)
p = ttm_pool_type_take(pt, take_nid);
...
}
For ttm_write_combined or ttm_uncached allocations with a multi-node bind
mask (for example {0, 1} when ttm_pool_nid(pool) is node 1),
ttm_pool_type_take() takes pooled pages from remote node 0 ahead of local
node 1.
When node 0's pool is empty, ttm_pool_type_take(pt, 0) fails without
checking node 1's pool, disables pool usage for the order, allocates fresh
write-back pages on nearest node 1 via ttm_pool_alloc_bind(), and pays for
cross-CPU set_pages_array_wc() or set_pages_array_uc() TLB shootdowns.
When those pages are later freed, ttm_pool_type_give() returns them to node
1's LRU, where subsequent BIND allocations with mask {0, 1} never check.
> diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> index 5289c17cd4496..e7605e7e97ecc 100644
> --- a/include/drm/ttm/ttm_bo.h
> +++ b/include/drm/ttm/ttm_bo.h
> @@ -58,10 +58,14 @@ struct ttm_tt;
> * @TTM_NUMA_POLICY_NONE: No policy. Use the pool default node.
> * @TTM_NUMA_POLICY_PREFERRED: Prefer the single node in
> * ttm_operation_ctx.numa_info.nodes. Falls back to other nodes.
> + * @TTM_NUMA_POLICY_BIND: Allocate only from the nodes in
> + * ttm_operation_ctx.numa_info.nodes, in ascending node order. Never falls
> + * back to other nodes.
> */
> enum ttm_numa_policy {
> TTM_NUMA_POLICY_NONE = 0,
> TTM_NUMA_POLICY_PREFERRED,
> + TTM_NUMA_POLICY_BIND,
> };
[Severity: Low]
This comment says nodes are tried "in ascending node order", whereas
ttm_pool_alloc_bind_pass() orders nodes nearest-first from ttm_pool_nid()
by node_distance() and only uses ascending node ID to break ties.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124062123.2431244-13-himal.prasad.ghimiray@intel.com?part=2
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2 05/11] drm/amdgpu: Use ttm_operation_ctx numa_info instead of per-partition pools
2026-11-24 6:21 ` [RFC v2 05/11] drm/amdgpu: Use ttm_operation_ctx numa_info instead of per-partition pools Himal Prasad Ghimiray
@ 2026-11-24 6:31 ` sashiko-bot
0 siblings, 0 replies; 16+ messages in thread
From: sashiko-bot @ 2026-11-24 6:31 UTC (permalink / raw)
To: Himal Prasad Ghimiray; +Cc: dri-devel, intel-xe, amd-gfx
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/amdgpu: -EOPNOTSUPP in amdgpu_ttm_tt_populate() when
need_swiotlb is set
--
commit 0d7e02838b040282a0c34d64857fd1fdc0a04ed6
Author: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
drm/amdgpu: Use ttm_operation_ctx numa_info instead of per-partition pools
This commit removes the per-partition TTM pools on APUs with memory
partitions and allocates pages from the device pool using
TTM_NUMA_POLICY_PREFERRED in ttm_operation_ctx.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index d3a875a32af1e..8740b7a76ad19 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
[ ... ]
> @@ -1242,7 +1245,9 @@ static int amdgpu_ttm_tt_populate(struct ttm_device *bdev,
> {
> struct amdgpu_device *adev = amdgpu_ttm_adev(bdev);
> struct amdgpu_ttm_tt *gtt = ttm_to_amdgpu_ttm_tt(ttm);
> - struct ttm_pool *pool;
> + /* ctx is shared by every BO of the operation; set the node locally */
> + struct ttm_operation_ctx node_ctx = *ctx;
> + nodemask_t preferred;
> pgoff_t i;
> int ret;
>
> @@ -1257,11 +1262,13 @@ static int amdgpu_ttm_tt_populate(struct ttm_device *bdev,
> if (ttm->page_flags & TTM_TT_FLAG_EXTERNAL)
> return 0;
>
> - if (adev->mman.ttm_pools && gtt->pool_id >= 0)
> - pool = &adev->mman.ttm_pools[gtt->pool_id];
> - else
> - pool = &adev->mman.bdev.pool;
> - ret = ttm_pool_alloc(pool, ttm, ctx);
> + if (gtt->numa_node != NUMA_NO_NODE) {
> + nodes_clear(preferred);
> + node_set(gtt->numa_node, preferred);
> + node_ctx.numa_info.policy = TTM_NUMA_POLICY_PREFERRED;
> + node_ctx.numa_info.nodes = &preferred;
> + }
> + ret = ttm_pool_alloc(&adev->mman.bdev.pool, ttm, &node_ctx);
[Severity: High]
Will ttm_pool_alloc() fail with -EOPNOTSUPP when adev->need_swiotlb is set
on a partitioned APU?
amdgpu_ttm_init() initializes adev->mman.bdev.pool with
TTM_ALLOCATION_POOL_USE_DMA_ALLOC when adev->need_swiotlb is true (for
example, under SME/SEV memory encryption), whereas the old
amdgpu_ttm_pools_init() omitted that flag on the per-partition pools.
Because ttm_pool_check_numa() rejects any policy other than
TTM_NUMA_POLICY_NONE when TTM_ALLOCATION_POOL_USE_DMA_ALLOC is set on the
pool, populating any BO with a partition NUMA node will now fail with
-EOPNOTSUPP.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124062123.2431244-13-himal.prasad.ghimiray@intel.com?part=5
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2 03/11] drm/ttm: Add TTM_NUMA_POLICY_INTERLEAVE
2026-11-24 6:21 ` [RFC v2 03/11] drm/ttm: Add TTM_NUMA_POLICY_INTERLEAVE Himal Prasad Ghimiray
@ 2026-11-24 6:32 ` sashiko-bot
0 siblings, 0 replies; 16+ messages in thread
From: sashiko-bot @ 2026-11-24 6:32 UTC (permalink / raw)
To: Himal Prasad Ghimiray; +Cc: dri-devel, intel-xe, amd-gfx
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] drm/ttm: broken interleave node rotation on order decrease in
__ttm_pool_alloc()
- [Medium] drm/ttm: unconstrained order-0 fallback and reclaim in
ttm_pool_alloc_interleave()
- [Medium] drm/ttm: cross-node pool take in
ttm_pool_type_take_interleave() before alloc
--
commit 99e6c53830405c25271c091f8f19cad519333639
Author: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
drm/ttm: Add TTM_NUMA_POLICY_INTERLEAVE
This commit adds TTM_NUMA_POLICY_INTERLEAVE to rotate TTM page allocations
and pool lookups across the NUMA nodes in ttm_operation_ctx.numa_info.nodes.
> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> index 8976de3a552d1..210d443185644 100644
> --- a/drivers/gpu/drm/ttm/ttm_pool.c
> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> @@ -373,6 +373,38 @@ static struct page *ttm_pool_type_take(struct ttm_pool_type *pt, int nid)
> return p;
> }
>
> +/* Return the node in @nodes nearest to @from, lowest node id on ties */
> +static int ttm_pool_nearest_node(int from, const nodemask_t *nodes)
> +{
> + int n, nid = first_node(*nodes);
> +
> + for_each_node_mask(n, *nodes) {
> + if (node_distance(from, n) < node_distance(from, nid))
> + nid = n;
> + }
> +
> + return nid;
> +}
> +
> +/* Take from @nid first, then from the other nodes nearest to @nid first */
> +static struct page *ttm_pool_type_take_interleave(struct ttm_pool_type *pt,
> + int nid, const nodemask_t *nodes)
> +{
> + nodemask_t todo = *nodes;
> + struct page *p;
> +
> + p = ttm_pool_type_take(pt, nid);
> + node_clear(nid, todo);
> + while (!p && !nodes_empty(todo)) {
> + int n = ttm_pool_nearest_node(nid, &todo);
> +
> + node_clear(n, todo);
> + p = ttm_pool_type_take(pt, n);
> + }
> +
> + return p;
> +}
[Severity: Medium]
Does ttm_pool_type_take_interleave() take cached pool pages from other nodes
in @nodes before trying a fresh page allocation on @nid?
When @nid's pool for a write-combined or uncached order is empty,
__ttm_pool_alloc() drains pooled pages from sibling policy nodes even when
@nid has free system memory. Because ttm_pool_free() returns freed pages to
the pool of page_to_nid(p), @nid's pool remains empty and interleaved WC/UC
allocations collapse onto whichever node already had cached pool pages.
[ ... ]
> @@ -830,6 +873,31 @@ static struct page *ttm_pool_alloc_bind(struct ttm_pool *pool, gfp_t gfp_flags,
> return p;
> }
>
> +/*
> + * Allocate pages of size 1 << order for TTM_NUMA_POLICY_INTERLEAVE. Try the
> + * interleaved node @nid first, then the other nodes in @nodes nearest to @nid
> + * first, as the per-node zonelist fallback of core mm does, before the caller
> + * lowers the order.
> + */
> +static struct page *ttm_pool_alloc_interleave(struct ttm_pool *pool,
> + gfp_t gfp_flags, unsigned int order,
> + int nid, const nodemask_t *nodes)
> +{
> + nodemask_t todo = *nodes;
> + struct page *p;
> +
> + p = ttm_pool_alloc_page(pool, gfp_flags, order, nid);
> + node_clear(nid, todo);
> + while (!p && !nodes_empty(todo)) {
> + int n = ttm_pool_nearest_node(nid, &todo);
> +
> + node_clear(n, todo);
> + p = ttm_pool_alloc_page(pool, gfp_flags, order, n);
> + }
> +
> + return p;
> +}
[Severity: Medium]
Does ttm_pool_alloc_interleave() fall back outside @nodes on order-0
allocations and stall in reclaim before trying other policy nodes?
ttm_pool_alloc_page() only sets __GFP_THISNODE when order > 0. At order 0,
the first ttm_pool_alloc_page() call walks @nid's unfiltered fallback
zonelist, which can allocate from a node outside @nodes before the remaining
nodes in @todo are tried, and if all zones are exhausted the while loop
repeats system-wide direct reclaim once for each remaining node in @todo.
In addition, unlike ttm_pool_alloc_bind(), ttm_pool_alloc_interleave() does
not try a non-reclaim pass across @nodes first, so a depleted @nid enters
direct reclaim and compaction even when another node in @nodes has free
pages of that order.
[ ... ]
> @@ -893,11 +961,24 @@ static int __ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
> order = ttm_pool_alloc_find_order(order, alloc)) {
> struct ttm_pool_type *pt;
>
> + if (policy == TTM_NUMA_POLICY_INTERLEAVE) {
> + unsigned int slot = tt->num_pages - alloc->remaining_pages;
> +
> + alloc_nid = ttm_pool_policy_nth_node(ctx->numa_info.nodes,
> + slot >> order);
> + take_nid = alloc_nid;
> + }
[Severity: High]
Does computing the node index as slot >> order fail to rotate across
ctx->numa_info.nodes whenever the allocation order decreases?
In __ttm_pool_alloc(), order is monotonically non-increasing, and slot is the
sum of 1 << prev_order for all prior chunks. Whenever a chunk has a smaller
order than the chunks before it, every prior chunk contributed an even
multiple of 1 << order pages to slot, so slot >> order is always even. When
nodes_weight(*ctx->numa_info.nodes) is even, such as a 2-node mask,
(slot >> order) % nodes_weight(...) is always 0 on every decreased order.
For example, a 3 MiB buffer (orders 9 and 8) or any buffer smaller than
8 MiB whose size is not a multiple of 4 MiB places all of its chunks on the
first policy node instead of interleaving them. Counting allocated chunks
with a separate counter that increments once per allocated page would rotate
across nodes regardless of order changes.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124062123.2431244-13-himal.prasad.ghimiray@intel.com?part=3
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-11-24 6:32 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 6:21 [RFC v2 00/11] drm/ttm, drm/xe: Per-BO host NUMA memory policy Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 01/11] drm/ttm: Add NUMA placement policy to ttm_operation_ctx Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 02/11] drm/ttm: Add TTM_NUMA_POLICY_BIND Himal Prasad Ghimiray
2026-11-24 6:29 ` sashiko-bot
2026-11-24 6:21 ` [RFC v2 03/11] drm/ttm: Add TTM_NUMA_POLICY_INTERLEAVE Himal Prasad Ghimiray
2026-11-24 6:32 ` sashiko-bot
2026-11-24 6:21 ` [RFC v2 04/11] drm/ttm/pool: enforce per-node cache limits on free Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 05/11] drm/amdgpu: Use ttm_operation_ctx numa_info instead of per-partition pools Himal Prasad Ghimiray
2026-11-24 6:31 ` sashiko-bot
2026-11-24 6:21 ` [RFC v2 06/11] drm/ttm/pool: Drop the nid argument from ttm_pool_init() Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 07/11] drm/xe/uapi: Add GEM_CREATE host NUMA mempolicy extension Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 08/11] drm/xe/bo: Carry a per-BO host NUMA mempolicy Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 09/11] drm/xe/uapi: Wire up GEM_CREATE mempolicy extension handler Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 10/11] drm/xe/uapi: Add device query for supported host NUMA mempolicy modes Himal Prasad Ghimiray
2026-11-24 6:21 ` [RFC v2 11/11] drm/xe: Implement the host NUMA mempolicy device query Himal Prasad Ghimiray
2026-11-24 6:26 ` ✗ CI.KUnit: failure for drm/ttm, drm/xe: Per-BO host NUMA memory policy Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox