On Wed, Dec 13, 2023 at 02:42:26AM +0200, Ville Syrjala wrote:
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev_fb.c 
> b/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
> index 717c3a3237c4..1ac05d90b2e8 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev_fb.c
> @@ -78,7 +78,7 @@ int intel_fbdev_fb_fill_info(struct drm_i915_private *i915, 
> struct fb_info *info
>  
>               /* Use fbdev's framebuffer from lmem for discrete */
>               info->fix.smem_start =
> -                     (unsigned long)(mem->io_start +
> +                     (unsigned long)(mem->io.start +
>                                       i915_gem_object_get_dma_address(obj, 
> 0));

Hmm. That looks wrong for MTL actually since dma address is relative
to the start of LMEMBAR but stolen io.start will be LMEMBAR+8MiB (or
just DSMBASE which points to the same place, with the w/a in place).
So we need to subtract mem->region.start from this to get the correct
value.

-- 
Ville Syrjälä
Intel

Reply via email to