]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/pagemap: Add DRM pagemap
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 6 Mar 2025 01:26:29 +0000 (17:26 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 6 Mar 2025 19:35:25 +0000 (11:35 -0800)
commit73463dac9beecf583b89eb3e20465e92df04d1a9
treeb7a28042a28d918e5e3e5e17fe30c65c83f8bd84
parent1afaeb8293c9addbf4f9140bdd22635fed763459
drm/pagemap: Add DRM pagemap

Introduce drm_pagemap ops to map and unmap dma to VRAM resources. In the
local memory case it's a matter of merely providing an offset into the
device's physical address. For future p2p the map and unmap functions may
encode as needed.

Similar to how dma-buf works, let the memory provider (drm_pagemap) provide
the mapping functionality.

v3:
 - Move to drm level include
v4:
 - Fix kernel doc (G.G.)
v5:
 - s/map_dma/device_map (Thomas)
 - s/unmap_dma/device_unmap (Thomas)
v7:
 - Fix kernel doc (CI, Auld)
 - Drop P2P define (Thomas)

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250306012657.3505757-5-matthew.brost@intel.com
include/drm/drm_pagemap.h [new file with mode: 0644]