From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well
Date: Wed, 31 Oct 2018 23:40:37 +0200 [thread overview]
Message-ID: <20181031214037.GY9144@intel.com> (raw)
In-Reply-To: <2196993.byX2TTvEGL@dk-thinkpad-x260>
On Wed, Oct 31, 2018 at 02:35:12PM -0700, Dhinakaran Pandiyan wrote:
> On Tuesday, October 30, 2018 9:20:37 AM PDT 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>
> > ---
> > tests/kms_plane.c | 30 +++++++++++++++++++-----------
> > 1 file changed, 19 insertions(+), 11 deletions(-)
> >
> > diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> > index 45e0a304e8ce..5e498d14856f 100644
> > --- a/tests/kms_plane.c
> > +++ b/tests/kms_plane.c
> > @@ -406,14 +406,15 @@ 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];
> > struct igt_fb old_fb = *fb;
> >
> > igt_create_color_fb(data->drm_fd, width, height,
> > - format, LOCAL_DRM_FORMAT_MOD_NONE,
> > + format, modifier,
> > c->red, c->green, c->blue, fb);
> >
> > igt_plane_set_fb(plane, fb);
> > @@ -432,6 +433,7 @@ static void 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)];
> >
> > @@ -440,6 +442,7 @@ static void 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");
> > @@ -448,6 +451,7 @@ static void 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",
> > @@ -468,22 +472,25 @@ static void test_format_plane(data_t *data, enum pipe pipe,
> > test_init(data, 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);
> >
> > for (int i = 0; i < ARRAY_SIZE(colors); i++) {
> > test_format_plane_color(data, pipe, plane,
> > - format, width, height,
> > + format, modifier,
> Use ref_format and ref_modifier here?
Yeah, seems sensible. I can then avoid the ugly double assignment
as well.
>
> I'll leave it to you if you want to address that nit.
> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
>
> > + 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++) {
> > 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))
> > @@ -499,13 +506,14 @@ static void test_format_plane(data_t *data, enum pipe pipe,
> > if (format == DRM_FORMAT_XBGR8888)
> > 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);
> >
> > igt_assert_crc_equal(&crc, &ref_crc[j]);
> >
>
>
>
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-10-31 21:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 16:20 [igt-dev] [PATCH i-g-t 1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 2/5] tests/gem_render_copy: Test Yf tiling Ville Syrjala
2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 3/5] lib/igt_fb: Use rendercopy for rendering into compressed buffers Ville Syrjala
2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 4/5] tests/kms_plane: Test all modifiers as well Ville Syrjala
2018-10-31 21:35 ` Dhinakaran Pandiyan
2018-10-31 21:40 ` Ville Syrjälä [this message]
2018-10-30 16:20 ` [igt-dev] [PATCH i-g-t 5/5] lib/igt_fb: s/tiling/modifier/ where appropriate Ville Syrjala
2018-10-31 22:48 ` Dhinakaran Pandiyan
2018-10-30 16:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Patchwork
2018-10-30 20:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20181031214037.GY9144@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dhinakaran.pandiyan@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox