From: jsg Date: Mon, 19 Aug 2024 11:18:29 +0000 (+0000) Subject: correct vm_fault_gtt() merge error in rev 1.19 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ac8883517704c304c8c12c051153b16b99d5e0ce;p=openbsd correct vm_fault_gtt() merge error in rev 1.19 fixes panic when starting X on x40 (855GM gen 2) problem with 945GM (gen 3) and G41 (gen 4) reported by semarie@ --- 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 dcbb86323e0..8ee2a8c1f0f 100644 --- a/sys/dev/pci/drm/i915/gem/i915_gem_mman.c +++ b/sys/dev/pci/drm/i915/gem/i915_gem_mman.c @@ -753,8 +753,9 @@ vm_fault_gtt(struct i915_mmap_offset *mmo, struct uvm_faultinfo *ufi, int srcu; int ret; - obj_offset = entry->offset - drm_vma_node_start(&mmo->vma_node); + obj_offset = (entry->offset >> PAGE_SHIFT) - drm_vma_node_start(&mmo->vma_node); page_offset = (vaddr - entry->start) >> PAGE_SHIFT; + page_offset += obj_offset; trace_i915_gem_object_fault(obj, page_offset, true, write);