From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [i-g-t] tests/kms_color: Fix ctm-0.* tests
Date: Mon, 26 Sep 2022 12:32:32 +0300 [thread overview]
Message-ID: <YzFxsBVY80ntHxHz@intel.com> (raw)
In-Reply-To: <20220925160050.2149579-1-bhanuprakash.modem@intel.com>
On Sun, Sep 25, 2022 at 09:30:50PM +0530, Bhanuprakash Modem wrote:
> As we are testing with a few values around the expected result
> because of the hardware rounded values, fix the logic to generate
> the expected values to deal with those hardware rounding issues.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> tests/kms_color.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index ab285af8..2804bde8 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -770,7 +770,7 @@ run_ctm_tests_for_pipe(data_t *data, enum pipe p,
> expected_colors[0].r =
> expected_colors[1].g =
> expected_colors[2].b =
> - 0.5 + delta * (i - 2);
> + ctm[0] + delta * (i - (iter / 2));
The name 'iter' is not a particularly great choice here.
Based on that name I would expect it to be an iterator
of some sort.
Another thing I don't really like here is that this guy is
mutating expected_colors, which was passed all the way from
the top and really should be const (since the whole ctm_tests[]
should be const). would be much better to have a local thing
to mutate here.
> if (test_pipe_ctm(data, data->primary, red_green_blue,
> expected_colors, ctm)) {
> success = true;
> --
> 2.37.3
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-09-26 9:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-25 16:00 [igt-dev] [i-g-t] tests/kms_color: Fix ctm-0.* tests Bhanuprakash Modem
2022-09-25 16:40 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2022-09-25 17:24 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: Fix ctm-0.* tests (rev2) Patchwork
2022-09-25 18:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-09-26 9:32 ` Ville Syrjälä [this message]
2022-09-26 14:19 ` [igt-dev] [i-g-t] tests/kms_color: Fix ctm-0.* tests Modem, Bhanuprakash
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=YzFxsBVY80ntHxHz@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