]> git.dujemihanovic.xyz Git - linux.git/commit
drm/i915/gem: Calculate object page offset for partial memory mapping
authorAndi Shyti <andi.shyti@linux.intel.com>
Wed, 7 Aug 2024 10:05:21 +0000 (11:05 +0100)
committerAndi Shyti <andi.shyti@linux.intel.com>
Wed, 21 Aug 2024 13:28:33 +0000 (15:28 +0200)
commit255fc1703e42321b5afdedc8259ad03c7cc533ec
treebb468d4280bad6b1731df269a4b69b9fca20aa1f
parent609d8b1c422cd8d1f93bf526fb236f2e07687e7c
drm/i915/gem: Calculate object page offset for partial memory mapping

To enable partial memory mapping of GPU virtual memory, it's
necessary to introduce an offset to the object's memory
(obj->mm.pages) scatterlist. This adjustment compensates for
instances when userspace mappings do not start from the beginning
of the object.

Based on a patch by Chris Wilson.

Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240807100521.478266-3-andi.shyti@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_mman.c
drivers/gpu/drm/i915/i915_mm.c
drivers/gpu/drm/i915/i915_mm.h