All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 4/4] tests/kms_plane: Test all modifiers as well
Date: Fri, 29 Mar 2019 13:11:55 +0200	[thread overview]
Message-ID: <20190329111155.GW3888@intel.com> (raw)
In-Reply-To: <20190329095305.GL2665@phenom.ffwll.local>

On Fri, Mar 29, 2019 at 10:53:05AM +0100, Daniel Vetter wrote:
> On Thu, Mar 28, 2019 at 07:57:27PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Instead of just testing each pixel format let's test every
> > format+modifier combo.
> > 
> > Obviously testing with solid filled fbs isn't the most effective
> > way to detect tiling problems, but we can't really do much more if
> > we want to keep comparing YUV vs. RGB results (unless we start to
> > render the RGB content in a way that matches the YUV subsampling
> > behaviour of the hardware).
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Hm, if we don't have the igt fb support for a modifier combo, I guess
> we'll now skip the entire test? More reasons to figure out the dynamic
> subtest stuff I've been talking about I guess.

Yeah, it's a bit annoying atm. Especially not having a new enough cairo
with the float support means that the test reports a skip on most modern
machines when I run it. I guess should unlazy myself and just build
cairo myself.

> 
> *shrug*
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> > ---
> >  tests/kms_plane.c | 32 ++++++++++++++++++++------------
> >  1 file changed, 20 insertions(+), 12 deletions(-)
> > 
> > diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> > index 3f14dbf8e9b9..33e2905a8d71 100644
> > --- a/tests/kms_plane.c
> > +++ b/tests/kms_plane.c
> > @@ -392,7 +392,8 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
> >  
> >  static void test_format_plane_color(data_t *data, enum pipe pipe,
> >  				    igt_plane_t *plane,
> > -				    uint32_t format, int width, int height,
> > +				    uint32_t format, uint64_t modifier,
> > +				    int width, int height,
> >  				    int color, igt_crc_t *crc, struct igt_fb *fb)
> >  {
> >  	const color_t *c = &colors[color];
> > @@ -400,7 +401,7 @@ static void test_format_plane_color(data_t *data, enum pipe pipe,
> >  
> >  	if (data->crop == 0 || format == DRM_FORMAT_XRGB8888) {
> >  		igt_create_color_fb(data->drm_fd, width, height,
> > -				    format, DRM_FORMAT_MOD_NONE,
> > +				    format, modifier,
> >  				    c->red, c->green, c->blue, fb);
> >  	} else {
> >  		/*
> > @@ -412,7 +413,7 @@ static void test_format_plane_color(data_t *data, enum pipe pipe,
> >  		igt_create_fb(data->drm_fd,
> >  			      width + data->crop * 2,
> >  			      height + data->crop * 2,
> > -			      format, DRM_FORMAT_MOD_NONE, fb);
> > +			      format, modifier, fb);
> >  
> >  		cr = igt_get_cairo_ctx(data->drm_fd, fb);
> >  
> > @@ -450,6 +451,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
> >  	struct igt_fb fb = {};
> >  	drmModeModeInfo *mode;
> >  	uint32_t format, ref_format;
> > +	uint64_t modifier, ref_modifier;
> >  	uint64_t width, height;
> >  	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
> >  	bool result = true;
> > @@ -465,6 +467,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
> >  		width = mode->hdisplay;
> >  		height = mode->vdisplay;
> >  		ref_format = format = DRM_FORMAT_XRGB8888;
> > +		ref_modifier = modifier = DRM_FORMAT_MOD_NONE;
> >  	} else {
> >  		if (!plane->drm_plane) {
> >  			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
> > @@ -473,6 +476,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
> >  		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &width));
> >  		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_HEIGHT, &height));
> >  		ref_format = format = DRM_FORMAT_ARGB8888;
> > +		ref_modifier = modifier = DRM_FORMAT_MOD_NONE;
> >  	}
> >  
> >  	igt_debug("Testing connector %s on %s plane %s.%u\n",
> > @@ -481,8 +485,8 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
> >  
> >  	igt_pipe_crc_start(data->pipe_crc);
> >  
> > -	igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
> > -		 IGT_FORMAT_ARGS(format),
> > +	igt_info("Testing format " IGT_FORMAT_FMT " / modifier 0x%" PRIx64 " on %s.%u\n",
> > +		 IGT_FORMAT_ARGS(format), modifier,
> >  		 kmstest_pipe_name(pipe), plane->index);
> >  
> >  	if (data->display.is_atomic) {
> > @@ -508,30 +512,34 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
> >  
> >  	for (int i = 0; i < ARRAY_SIZE(colors); i++) {
> >  		test_format_plane_color(data, pipe, plane,
> > -					format, width, height,
> > +					format, modifier,
> > +					width, height,
> >  					i, &ref_crc[i], &fb);
> >  	}
> >  
> > -	for (int i = 0; i < plane->drm_plane->count_formats; i++) {
> > +	for (int i = 0; i < plane->format_mod_count; i++) {
> >  		int crc_mismatch_count = 0;
> >  		int crc_mismatch_mask = 0;
> >  		igt_crc_t crc;
> >  
> > -		format = plane->drm_plane->formats[i];
> > +		format = plane->formats[i];
> > +		modifier = plane->modifiers[i];
> >  
> > -		if (format == ref_format)
> > +		if (format == ref_format &&
> > +		    modifier == ref_modifier)
> >  			continue;
> >  
> >  		if (!igt_fb_supported_format(format))
> >  			continue;
> >  
> > -		igt_info("Testing format " IGT_FORMAT_FMT " on %s.%u\n",
> > -			 IGT_FORMAT_ARGS(format),
> > +		igt_info("Testing format " IGT_FORMAT_FMT " / modifier 0x%" PRIx64 " on %s.%u\n",
> > +			 IGT_FORMAT_ARGS(format), modifier,
> >  			 kmstest_pipe_name(pipe), plane->index);
> >  
> >  		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
> >  			test_format_plane_color(data, pipe, plane,
> > -						format, width, height,
> > +						format, modifier,
> > +						width, height,
> >  						j, &crc, &fb);
> >  
> >  			if (!igt_check_crc_equal(&crc, &ref_crc[j])) {
> > -- 
> > 2.19.2
> > 
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-03-29 11:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 17:57 [igt-dev] [PATCH i-g-t 1/4] tests/kms_plane: Remove the upscaling requirement Ville Syrjala
2019-03-28 17:57 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_plane: Reduce the plane size 64x64 Ville Syrjala
2019-03-29  9:42   ` Daniel Vetter
2019-03-28 17:57 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_plane: Eliminate modeset between every plane Ville Syrjala
2019-03-29  9:45   ` Daniel Vetter
2019-03-28 17:57 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_plane: Test all modifiers as well Ville Syrjala
2019-03-29  9:53   ` Daniel Vetter
2019-03-29 11:11     ` Ville Syrjälä [this message]
2019-03-28 18:36 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] tests/kms_plane: Remove the upscaling requirement Patchwork
2019-03-29  4:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-29  9:41 ` [igt-dev] [PATCH i-g-t 1/4] " Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190329111155.GW3888@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.