[igt-dev] [PATCH v7 09/14] fb: Add more formats

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Sep 25 12:18:30 UTC 2018


On Tue, Sep 25, 2018 at 09:49:43AM +0200, Maxime Ripard wrote:
> On Wed, Sep 19, 2018 at 04:14:22PM +0300, Ville Syrjälä wrote:
> > On Tue, Sep 11, 2018 at 10:47:36AM +0200, Maxime Ripard wrote:
> > > We're going to need some DRM formats, and we're going to need the igt_fb
> > > code to handle them. Since it relies on the format_desc structure to map
> > > the DRM fourcc to the pixman and cairo formats, we need to add these new
> > > formats to that structure.
> > > 
> > > Reviewed-by: Eric Anholt <eric at anholt.net>
> > > Signed-off-by: Maxime Ripard <maxime.ripard at bootlin.com>
> > > ---
> > >  lib/igt_fb.c | 35 +++++++++++++++++++++++++++++++++++
> > >  1 file changed, 35 insertions(+)
> > > 
> > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > > index f83ad0d2679c..425f98e23380 100644
> > > --- a/lib/igt_fb.c
> > > +++ b/lib/igt_fb.c
> > > @@ -72,16 +72,46 @@ static struct format_desc_struct {
> > >  	int num_planes;
> > >  	int plane_bpp[4];
> > >  } format_desc[] = {
> > > +	{ .name = "ARGB1555", .depth = 16, .drm_id = DRM_FORMAT_ARGB1555,
> > > +	  .cairo_id = CAIRO_FORMAT_INVALID,
> > > +	  .pixman_id = PIXMAN_a1r5g5b5,
> > > +	  .num_planes = 1, .plane_bpp = { 16, },
> > > +	},
> > > +	{ .name = "XRGB1555", .depth = 15, .drm_id = DRM_FORMAT_XRGB1555,
> > > +	  .cairo_id = CAIRO_FORMAT_INVALID,
> > > +	  .pixman_id = PIXMAN_x1r5g5b5,
> > > +	  .num_planes = 1, .plane_bpp = { 16, },
> > > +	},
> > 
> > I think this is going to mess up the depth->format behaviour that
> > bunch of tests expect. So nak on adding .depth to these.
> 
> What is your suggestion then?

Do you actually need the depth for something?

-- 
Ville Syrjälä
Intel


More information about the igt-dev mailing list