Re: [PATCH 1/2] drm/i915: Replace initial plane_config.tiling with fb modifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 24, 2016 at 09:56:29AM +0100, Chris Wilson wrote:
> On Wed, Aug 24, 2016 at 10:47:22AM +0200, David Weinehall wrote:
> > On Wed, Aug 24, 2016 at 08:20:31AM +0100, Chris Wilson wrote:
> > > When determining the initial plane config we set the same information in
> > > both the framebuffer (fb.modifier[0]) and in plane_config.tiling.
> > > Ultimately, we only need the information in the framebuffer so remove
> > > the redundant copy from plane_config.tiling
> > > 
> > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > > ---
> > >  drivers/gpu/drm/i915/intel_display.c | 23 +++++++----------------
> > >  drivers/gpu/drm/i915/intel_drv.h     |  1 -
> > >  2 files changed, 7 insertions(+), 17 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > > index d61c264d5a37..e363a68d97ed 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -2700,7 +2700,7 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
> > >  		return false;
> > >  	}
> > >  
> > > -	if (plane_config->tiling == I915_TILING_X)
> > > +	if (fb->modifier[0] == I915_FORMAT_MOD_X_TILED)
> > >  		obj->tiling_and_stride = fb->pitches[0] | I915_TILING_X;
> > >  
> > >  	mode_cmd.pixel_format = fb->pixel_format;
> > > @@ -8730,12 +8730,8 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
> > >  
> > >  	fb = &intel_fb->base;
> > >  
> > > -	if (INTEL_INFO(dev)->gen >= 4) {
> > > -		if (val & DISPPLANE_TILED) {
> > > -			plane_config->tiling = I915_TILING_X;
> > > -			fb->modifier[0] = I915_FORMAT_MOD_X_TILED;
> > > -		}
> > > -	}
> > > +	if (INTEL_GEN(dev) >= 4 && val & DISPPLANE_TILED)
> > > +		fb->modifier[0] = I915_FORMAT_MOD_X_TILED;
> > 
> > dev_priv
> 
> Would be a bit odd by itself until some one does a mass convert ;)

Working on it, but anything that helps turning the mass convert into
a small scale sermon convert[1] will ease review / merge,
 and as you're doing the INTEL_INFO()->gen to INTEL_GEN() conversion
anyway, and since the function has a pointer to dev_priv already, I
think it's a sensible idea.  YMMV.


Kind regards, David Weinehall

[1] OK, my sense of humour is horrible.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux