]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/pagemap: Use struct drm_pagemap_addr in mapping and copy functions
authorFrancois Dugast <francois.dugast@intel.com>
Tue, 5 Aug 2025 13:59:03 +0000 (15:59 +0200)
committerFrancois Dugast <francois.dugast@intel.com>
Wed, 6 Aug 2025 11:34:42 +0000 (13:34 +0200)
commitf35a6cdf8a6d69f2fb35ece202a09f13fe7c87b2
tree427fbf6ad3369a05b22cc2ce75ee412de38faf64
parent81aa3c7c62049b42959bd4054c3a3ed34b2d5bf4
drm/pagemap: Use struct drm_pagemap_addr in mapping and copy functions

This struct embeds more information than just the DMA address. This will
help later to support folio orders greater than zero. At this point, there
is no functional change as the only struct member used is addr.

In Xe, adapt to the new drm_gpusvm_devmem_ops type signatures using struct
drm_pagemap_addr, as well as the internal xe SVM functions implementing
those operations. The use of this struct is propagated to xe_migrate as it
makes indexed accesses to the next DMA address but they are no longer
contiguous.

v2:
- Rename drm_pagemap_device_addr to drm_pagemap_addr (Matthew Brost)
- Squash with patch for Xe (Matthew Brost)
- Set proto and dir for completeness (Matthew Brost)
- Assess DMA map protocol (Matthew Brost)

Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://lore.kernel.org/r/20250805140028.599361-3-francois.dugast@intel.com
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
drivers/gpu/drm/drm_pagemap.c
drivers/gpu/drm/xe/xe_migrate.c
drivers/gpu/drm/xe/xe_migrate.h
drivers/gpu/drm/xe/xe_svm.c
include/drm/drm_pagemap.h