From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 4/4] tests/kms_color: Add GAMMA_LUT_3D tests
Date: Fri, 3 Sep 2021 18:18:47 +0300 [thread overview]
Message-ID: <YTI811aPfzHitaTx@intel.com> (raw)
In-Reply-To: <DM8PR11MB571915B618E4E7421425C6E78DCF9@DM8PR11MB5719.namprd11.prod.outlook.com>
On Fri, Sep 03, 2021 at 05:05:03AM +0000, Modem, Bhanuprakash wrote:
> > From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Ville
> > Syrjala
> > Sent: Friday, May 14, 2021 6:57 PM
> > To: igt-dev@lists.freedesktop.org
> > Subject: [igt-dev] [PATCH i-g-t 4/4] tests/kms_color: Add GAMMA_LUT_3D tests
> >
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Add some basic tests for 3D LUTs.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > tests/kms_color.c | 95 ++++++++++++++++++++++++++++++++++++++++
> > tests/kms_color_helper.c | 58 +++++++++++++++++++++++-
> > tests/kms_color_helper.h | 18 ++++++++
> > 3 files changed, 170 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/kms_color.c b/tests/kms_color.c
> > index 3a42532a5c27..e23e5f5fcc26 100644
> > --- a/tests/kms_color.c
> > +++ b/tests/kms_color.c
> > @@ -198,6 +198,88 @@ static void test_pipe_gamma(data_t *data,
> > free_lut(gamma_full);
> > }
> >
> > +static void test_pipe_gamma_lut_3d(data_t *data,
> > + igt_plane_t *primary)
> > +{
> > + igt_output_t *output;
> > + igt_display_t *display = &data->display;
> > + gamma_lut_t *gamma_lut_3d_linear, *gamma_lut_3d_full;
> > + color_t red_green_blue[] = {
> > + { 1.0, 0.0, 0.0 },
> > + { 0.0, 1.0, 0.0 },
> > + { 0.0, 0.0, 1.0 }
> > + };
> > +
> > + igt_require(igt_pipe_obj_has_prop(primary->pipe,
> > IGT_CRTC_GAMMA_LUT_3D));
> > +
> > + gamma_lut_3d_linear = generate_lut_3d(data->gamma_lut_3d_size, 1.0);
> > + gamma_lut_3d_full = generate_lut_3d_max(data->gamma_lut_3d_size);
> > +
> > + for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe,
> > output) {
>
> Instead of running the test on all possible "pipe-connector" combinations,
> I think it is sufficient to run on single connector, since we are trying to
> validate PIPE properties. Also we can save some CI time.
>
> I am also thinking to revamp all color tests to run on single connector.
Yeah, the connector shouldn't matter here. Any single one will do.
<snip>
> > + igt_plane_set_fb(primary, &fb);
> > + igt_display_commit(&data->display);
> > + igt_wait_for_vblank(data->drm_fd,
> > + display->pipes[primary->pipe->pipe].crtc_offset);
> > + igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
> > +
> > + /* Draw a gradient with 3D LUT to remap all
> > + * values to max red/green/blue.
> > + */
> > + paint_gradient_rectangles(data, mode, red_green_blue, &fb);
> > + igt_plane_set_fb(primary, &fb);
> > + set_gamma_lut_3d(data, primary->pipe, gamma_lut_3d_full);
> > + igt_display_commit(&data->display);
> > + igt_wait_for_vblank(data->drm_fd,
> > + display->pipes[primary->pipe->pipe].crtc_offset);
> > + igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fulllut3d);
> > +
> > + /* Verify that the CRC of the software computed output is
> > + * equal to the CRC of the degamma LUT transformation output.
>
> Typo: s/degamma/3dlut/
>
> So, is this the expectation?
> ((Solid colors + no 3dlut) == (gradient colors + 3dlut)) ? PASS : FAIL;
IIRC yes.
<snip>
> > diff --git a/tests/kms_color_helper.h b/tests/kms_color_helper.h
> > index 3f49e7cae4c0..e21adaa228ff 100644
> > --- a/tests/kms_color_helper.h
> > +++ b/tests/kms_color_helper.h
> > @@ -52,6 +52,7 @@ typedef struct {
> > uint32_t color_depth;
> > uint64_t degamma_lut_size;
> > uint64_t gamma_lut_size;
> > + uint64_t gamma_lut_3d_size;
>
> Maybe rename to gamma_3d_lut_size?
I wanted to be consistent with the naming everywhere, and because you
can't have things named "3d_lut" in C I went with the "lut_3d" order
for everything.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2021-09-03 15:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 13:26 [igt-dev] [PATCH i-g-t 0/4] tests/kms_color: 3D LUT tests Ville Syrjala
2021-05-14 13:26 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_color: Refactor invalid LUT size tests Ville Syrjala
2021-09-03 5:04 ` Modem, Bhanuprakash
2021-09-03 15:14 ` Ville Syrjälä
2021-05-14 13:26 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_color: Store r/g/b separately for LUT color tests Ville Syrjala
2021-09-03 5:04 ` Modem, Bhanuprakash
2021-05-14 13:26 ` [igt-dev] [PATCH i-g-t 3/4] lib/kms: Add GAMMA_LUT_3D support Ville Syrjala
2021-09-03 5:05 ` Modem, Bhanuprakash
2021-05-14 13:26 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_color: Add GAMMA_LUT_3D tests Ville Syrjala
2021-09-03 5:05 ` Modem, Bhanuprakash
2021-09-03 15:18 ` Ville Syrjälä [this message]
2021-05-14 14:26 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: 3D LUT tests Patchwork
2021-05-14 18:25 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-01 16:31 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: 3D LUT tests (rev2) Patchwork
2021-06-01 21:23 ` [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=YTI811aPfzHitaTx@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=bhanuprakash.modem@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