[igt-dev] [PATCH RFC i-g-t 02/10] lib/igt_fb.c: Update tile sizes for GEN12 CCS

Kahola, Mika mika.kahola at intel.com
Wed Oct 30 11:23:14 UTC 2019


On Tue, 2019-10-29 at 14:25 -0700, Radhakrishna Sripada wrote:
> On Wed, Sep 25, 2019 at 04:09:23PM +0300, Mika Kahola wrote:
> > Update tile sizes for GEN12 CCS.
> > 
> > BSpec: 2422
> 
> BSpec:47709 - Gen12
I'll fix this. Thanks for pointing out the correct reference and for
the review!

> Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada at intel.com>
> > 
> > Signed-off-by: Mika Kahola <mika.kahola at intel.com>
> > ---
> >  lib/igt_fb.c | 34 ++++++++++++++++++++++++++++++++--
> >  1 file changed, 32 insertions(+), 2 deletions(-)
> > 
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index bad3eeca..826d9f70 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -381,6 +381,33 @@ void igt_get_fb_tile_size(int fd, uint64_t
> > modifier, int fb_bpp,
> >  			*height_ret = 32;
> >  		}
> >  		break;
> > +	case LOCAL_I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS:
> > +		igt_require_intel(fd);
> > +		switch (fb_bpp) {
> > +		case 8:
> > +			*width_ret = 512;
> > +			*height_ret = 32;
> > +			break;
> > +		case 16:
> > +			*width_ret = 256;
> > +			*height_ret = 32;
> > +			break;
> > +		case 32:
> > +			*width_ret = 128;
> > +			*height_ret = 32;
> > +			break;
> > +		case 64:
> > +			*width_ret = 64;
> > +			*height_ret = 32;
> > +			break;
> > +		case 128:
> > +			*width_ret = 32;
> > +			*height_ret = 32;
> > +			break;
> > +		default:
> > +			igt_assert(false);
> > +		}
> > +		break;
> >  	case LOCAL_I915_FORMAT_MOD_Yf_TILED:
> >  	case LOCAL_I915_FORMAT_MOD_Yf_TILED_CCS:
> >  		igt_require_intel(fd);
> > @@ -435,8 +462,10 @@ void igt_get_fb_tile_size(int fd, uint64_t
> > modifier, int fb_bpp,
> >  
> >  static bool is_ccs_modifier(uint64_t modifier)
> >  {
> > -	return modifier == LOCAL_I915_FORMAT_MOD_Y_TILED_CCS ||
> > -		modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED_CCS;
> > +
> > +	return modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS ||
> > +		modifier == I915_FORMAT_MOD_Y_TILED_CCS ||
> > +		modifier == I915_FORMAT_MOD_Yf_TILED_CCS;
> >  }
> >  
> >  static unsigned fb_plane_width(const struct igt_fb *fb, int plane)
> > @@ -655,6 +684,7 @@ uint64_t igt_fb_mod_to_tiling(uint64_t
> > modifier)
> >  		return I915_TILING_X;
> >  	case LOCAL_I915_FORMAT_MOD_Y_TILED:
> >  	case LOCAL_I915_FORMAT_MOD_Y_TILED_CCS:
> > +	case LOCAL_I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS:
> >  		return I915_TILING_Y;
> >  	case LOCAL_I915_FORMAT_MOD_Yf_TILED:
> >  	case LOCAL_I915_FORMAT_MOD_Yf_TILED_CCS:
> > -- 
> > 2.17.1
> > 
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev


More information about the igt-dev mailing list