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/6] tests/kms_color: Allow most subtests to run with a partial color pipeline
Date: Wed, 3 Apr 2019 17:22:43 +0300 [thread overview]
Message-ID: <20190403142243.GX3888@intel.com> (raw)
In-Reply-To: <20190403135054.GG2665@phenom.ffwll.local>
On Wed, Apr 03, 2019 at 03:50:54PM +0200, Daniel Vetter wrote:
> On Tue, Apr 02, 2019 at 07:33:46PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Requiring a full color pipeline when we're just testing eg. the gamma
> > LUT is silly. Make the requirements more sensible.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > tests/kms_color.c | 47 +++++++++++++++++++++++++++++++++--------------
> > 1 file changed, 33 insertions(+), 14 deletions(-)
> >
> > diff --git a/tests/kms_color.c b/tests/kms_color.c
> > index c65bb88cd7dc..554356a04f75 100644
> > --- a/tests/kms_color.c
> > +++ b/tests/kms_color.c
> > @@ -252,9 +252,15 @@ static void set_ctm(igt_pipe_t *pipe, const double *coefficients)
> > igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_CTM, &ctm, sizeof(ctm));
> > }
> >
> > -#define disable_degamma(pipe) igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_DEGAMMA_LUT, NULL, 0)
> > -#define disable_gamma(pipe) igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_GAMMA_LUT, NULL, 0)
> > -#define disable_ctm(pipe) igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_CTM, NULL, 0)
> > +static void disable_prop(igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop)
>
> Hm, could even be an igt_kms helper function I think. For another patch.
>
> > +{
> > + if (igt_pipe_obj_has_prop(pipe, prop))
> > + igt_pipe_obj_replace_prop_blob(pipe, prop, NULL, 0);
> > +}
> > +
> > +#define disable_degamma(pipe) disable_prop(pipe, IGT_CRTC_DEGAMMA_LUT)
> > +#define disable_gamma(pipe) disable_prop(pipe, IGT_CRTC_GAMMA_LUT)
> > +#define disable_ctm(pipe) disable_prop(pipe, IGT_CRTC_CTM)
> >
> > /*
> > * Draw 3 gradient rectangles in red, green and blue, with a maxed out
> > @@ -273,6 +279,9 @@ static void test_pipe_degamma(data_t *data,
> > { 0.0, 0.0, 1.0 }
> > };
> >
> > + igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
> > + igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
> > +
> > degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> > degamma_full = generate_table_max(data->degamma_lut_size);
> >
> > @@ -356,6 +365,8 @@ static void test_pipe_gamma(data_t *data,
> > { 0.0, 0.0, 1.0 }
> > };
> >
> > + igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
> > +
> > gamma_full = generate_table_max(data->gamma_lut_size);
> >
> > for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
> > @@ -553,6 +564,11 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
> > drmModePropertyBlobPtr blob;
> > igt_output_t *output;
> >
> > + /* FIXME accept any one of these */
> > + igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
> > + igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
> > + igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_CTM));
> > +
> > degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> > gamma_zero = generate_table_zero(data->gamma_lut_size);
> >
> > @@ -663,6 +679,8 @@ static bool test_pipe_ctm(data_t *data,
> > igt_output_t *output;
> > bool ret = true;
> >
> > + igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_CTM));
>
> Hm, am I blind or did we not have any igt require for the CTM beforehand?
Looks like we did not.
> Would be good to mention that in the commit message this your patch here
> fixes that.
Sure, I'll amend the message a bit.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
>
> > +
> > degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> > gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> >
> > @@ -861,19 +879,20 @@ run_tests_for_pipe(data_t *data, enum pipe p)
> > primary->pipe->pipe,
> > INTEL_PIPE_CRC_SOURCE_AUTO);
> >
> > - igt_require(igt_pipe_obj_has_prop(&data->display.pipes[p], IGT_CRTC_DEGAMMA_LUT_SIZE));
> > - igt_require(igt_pipe_obj_has_prop(&data->display.pipes[p], IGT_CRTC_GAMMA_LUT_SIZE));
> > -
> > - data->degamma_lut_size =
> > - igt_pipe_obj_get_prop(&data->display.pipes[p],
> > - IGT_CRTC_DEGAMMA_LUT_SIZE);
> > + if (igt_pipe_obj_has_prop(&data->display.pipes[p], IGT_CRTC_DEGAMMA_LUT_SIZE)) {
> > + data->degamma_lut_size =
> > + igt_pipe_obj_get_prop(&data->display.pipes[p],
> > + IGT_CRTC_DEGAMMA_LUT_SIZE);
> > + igt_assert_lt(0, data->degamma_lut_size);
> > + }
> >
> > - data->gamma_lut_size =
> > - igt_pipe_obj_get_prop(&data->display.pipes[p],
> > - IGT_CRTC_GAMMA_LUT_SIZE);
> > + if (igt_pipe_obj_has_prop(&data->display.pipes[p], IGT_CRTC_GAMMA_LUT_SIZE)) {
> > + data->gamma_lut_size =
> > + igt_pipe_obj_get_prop(&data->display.pipes[p],
> > + IGT_CRTC_GAMMA_LUT_SIZE);
> > + igt_assert_lt(0, data->gamma_lut_size);
> > + }
> >
> > - igt_assert_lt(0, data->degamma_lut_size);
> > - igt_assert_lt(0, data->gamma_lut_size);
> > igt_display_require_output_on_pipe(&data->display, p);
> > }
> >
> > --
> > 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
next prev parent reply other threads:[~2019-04-03 14:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 16:33 [igt-dev] [PATCH i-g-t 1/6] tests/kms_color: Nuke local struct definitions Ville Syrjala
2019-04-02 16:33 ` [igt-dev] [PATCH i-g-t 2/6] tests/kms_color: Wrap LUTs in a gamma_lut_t struct Ville Syrjala
2019-04-03 10:50 ` Daniel Vetter
2019-04-02 16:33 ` [igt-dev] [PATCH i-g-t 3/6] tests/kms_color: Reuse some already compute values Ville Syrjala
2019-04-03 10:51 ` Daniel Vetter
2019-04-02 16:33 ` [igt-dev] [PATCH i-g-t 4/6] tests/kms_color: Allow most subtests to run with a partial color pipeline Ville Syrjala
2019-04-03 13:50 ` Daniel Vetter
2019-04-03 14:22 ` Ville Syrjälä [this message]
2019-04-02 16:33 ` [igt-dev] [PATCH i-g-t 5/6] tests/kms_color: Split invalid_lut_sizes() into gamma vs. degamma versions Ville Syrjala
2019-04-03 13:52 ` Daniel Vetter
2019-04-03 14:20 ` Ville Syrjälä
2019-04-02 16:33 ` [igt-dev] [PATCH i-g-t 6/6] tests/kms_color: Make legacy-gamma-reset work with a partial color pipeline Ville Syrjala
2019-04-03 13:53 ` Daniel Vetter
2019-04-02 17:37 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] tests/kms_color: Nuke local struct definitions Patchwork
2019-04-03 6:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-04-03 8:40 ` [igt-dev] [PATCH i-g-t 1/6] " 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=20190403142243.GX3888@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox