From 4250d1c2ea0362445895b8a55451b7e91541fbfd Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 13 Aug 2024 00:23:25 +0000 Subject: [PATCH] drm/i915/fbdev: Fix smem_start for LMEMBAR stolen objects From Ville Syrjala f1ee98cff3d86271491b08315fcdfa4c3f097e1e in mainline linux --- sys/dev/pci/drm/i915/display/intel_fbdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/i915/display/intel_fbdev.c b/sys/dev/pci/drm/i915/display/intel_fbdev.c index 63f6bba7df8..53c428282d2 100644 --- a/sys/dev/pci/drm/i915/display/intel_fbdev.c +++ b/sys/dev/pci/drm/i915/display/intel_fbdev.c @@ -295,7 +295,8 @@ static int intelfb_create(struct drm_fb_helper *helper, /* Use fbdev's framebuffer from lmem for discrete */ info->fix.smem_start = (unsigned long)(mem->io.start + - i915_gem_object_get_dma_address(obj, 0)); + i915_gem_object_get_dma_address(obj, 0) - + mem->region.start); info->fix.smem_len = obj->base.size; } else { /* Our framebuffer is the entirety of fbdev's system memory */ -- 2.20.1