[PATCH v2 1/2] drm/vc4: Fix negative X/Y positioning on SAND planes

Boris Brezillon boris.brezillon at bootlin.com
Fri Dec 7 08:19:35 UTC 2018


On Thu, 6 Dec 2018 20:29:19 +0100
Boris Brezillon <boris.brezillon at bootlin.com> wrote:

> On Thu, 06 Dec 2018 10:59:17 -0800
> Eric Anholt <eric at anholt.net> wrote:
> 
> > > +
> > > +		/*
> > > +		 * SCALER_PITCH0_SINK_PIX does not seem to work for SAND
> > > +		 * formats. Specify a negative START_X instead, even if it's
> > > +		 * less efficient.
> > > +		 */
> > > +		if (x_off)
> > > +			vc4_state->crtc_x = -x_off;    
> > 
> > Wait. If we were supposed to start at a nonzero x position within the
> > FB, then we instead put the image off the left hand side of the screen?
> > That seems wrong.  
> 
> Yep, I overlooked this case.
> 
> > 
> > Did you test if we can just vc4_state->offsets[i] += x_off * cpp?  
> 
> Yep, I tried, and it doesn't seem to work.

Okay, looks like you were right. It seems the HVS engine knows that it
must skip pixels on each new line when the initial offset is not
aligned on a tile. I must have tested something slightly different.

Thanks,

Boris


More information about the dri-devel mailing list