]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/pagemap_util: Add a utility to assign an owner to a set of interconnected gpus
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 19 Dec 2025 11:33:06 +0000 (12:33 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 23 Dec 2025 09:00:47 +0000 (10:00 +0100)
commite44f47a9bf5104c9b9efcc8fc95a858c66f2d1e6
tree7cc9a531b31fcebf11c140eaa34c9725b11467c5
parent33ac8d150af6be100161ec11106a8dd3f1f5b9e0
drm/pagemap_util: Add a utility to assign an owner to a set of interconnected gpus

The hmm_range_fault() and the migration helpers currently need a common
"owner" to identify pagemaps and clients with fast interconnect.
Add a drm_pagemap utility to setup such owners by registering
drm_pagemaps, in a registry, and for each new drm_pagemap,
query which existing drm_pagemaps have fast interconnects with the new
drm_pagemap.

The "owner" scheme is limited in that it is static at drm_pagemap creation.
Ideally one would want the owner to be adjusted at run-time, but that
requires changes to hmm. If the proposed scheme becomes too limited,
we need to revisit.

v2:
- Improve documentation of DRM_PAGEMAP_OWNER_LIST_DEFINE(). (Matt Brost)

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> # For merging through drm-xe.
Link: https://patch.msgid.link/20251219113320.183860-11-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/drm_pagemap_util.c
include/drm/drm_pagemap_util.h