From 7e70941162037fffcdaf48e642045e82f6cb16af Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 15 Aug 2024 03:18:56 +0000 Subject: [PATCH] drm/i915/gem: Adjust vma offset for framebuffer mmap offset From Andi Shyti d73de3c6447644c65ed0e9a368328713dc28fb18 in linux-6.6.y/6.6.46 1ac5167b3a90c9820daa64cc65e319b2d958d686 in mainline linux --- sys/dev/pci/drm/i915/gem/i915_gem_mman.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/pci/drm/i915/gem/i915_gem_mman.c b/sys/dev/pci/drm/i915/gem/i915_gem_mman.c index 983f22fad67..dcbb86323e0 100644 --- a/sys/dev/pci/drm/i915/gem/i915_gem_mman.c +++ b/sys/dev/pci/drm/i915/gem/i915_gem_mman.c @@ -1590,6 +1590,8 @@ int i915_gem_fb_mmap(struct drm_i915_gem_object *obj, struct vm_area_struct *vma mmo = mmap_offset_attach(obj, mmap_type, NULL); if (IS_ERR(mmo)) return PTR_ERR(mmo); + + vma->vm_pgoff += drm_vma_node_start(&mmo->vma_node); } /* -- 2.20.1