[PATCH 01/12] drm/i915: Use struct resource for memory region IO as well

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Dec 13 17:01:18 UTC 2023


On Wed, Dec 13, 2023 at 02:59:07AM +0200, Ville Syrjälä wrote:
> 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.

I suppose this doesn't matter anymore as we have our own .fb_mmap()
these days. So presumably we could just always leave this set to zero.

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list