From: Daniel Vetter <daniel@ffwll.ch>
To: Uma Shankar <uma.shankar@intel.com>
Cc: igt-dev@lists.freedesktop.org, ville.syrjala@intel.com,
daniel@ffwll.ch, maarten.lankhorst@intel.com
Subject: Re: [igt-dev] [v6] tests/kms_color: Fix CRC mismatch issues with ctm test
Date: Wed, 3 Apr 2019 15:44:40 +0200 [thread overview]
Message-ID: <20190403134440.GF2665@phenom.ffwll.local> (raw)
In-Reply-To: <1554294010-9191-1-git-send-email-uma.shankar@intel.com>
On Wed, Apr 03, 2019 at 05:50:10PM +0530, Uma Shankar wrote:
> Due to Gamma/Degamma limitation wrt representation of intermediate
> values between 0 and 1.0 causing rounding issues and inaccuracies,
> applying linear gamma affects crc. This patch fixes the same by
> making ctm max test independent of gamma/degamma.
>
> v2: Disable degamma/gamma programming for ctm max test as it
> leads to crc mimsmatch. Limiting it to this test case alone as
> other tests need it to be enabled, hence not touching those
> scenarios.
>
> v3: Fixed a fumble with compilation.
>
> v4: Disabling degamma and gamma for ctm max tests, after the logic
> in kernel has been updated by Ville's series.
>
> v5: Disabled gamma/degamma for all ctm tests as suggested by Ville.
>
> v6: Restricting disabling of linear gamma luts for ctm max test.
> Updated the commit message and comment as suggested by Daniel.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108147
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> tests/kms_color.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index decf3c2..3aac7fb 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -696,8 +696,20 @@ static bool test_pipe_ctm(data_t *data,
> igt_assert(fb_modeset_id);
> igt_plane_set_fb(primary, &fb_modeset);
>
> - set_degamma(data, primary->pipe, degamma_linear);
> - set_gamma(data, primary->pipe, gamma_linear);
> + /*
> + * Don't program LUT's for max CTM cases, as limitation of
> + * representing intermediate values between 0 and 1.0 causes
> + * rounding issues and inaccuracies leading to crc mismatch.
> + */
> + if (memcmp(before, after, sizeof(color_t))) {
> + set_degamma(data, primary->pipe, degamma_linear);
> + set_gamma(data, primary->pipe, gamma_linear);
> + } else {
> + /* Disable Degamma and Gamma for ctm max test */
> + disable_degamma(primary->pipe);
> + disable_gamma(primary->pipe);
> + }
> +
> disable_ctm(primary->pipe);
> igt_display_commit(&data->display);
>
> --
> 1.9.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 12:20 [igt-dev] [v6] tests/kms_color: Fix CRC mismatch issues with ctm test Uma Shankar
2019-04-03 12:24 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: Fix CRC mismatch issues with ctm test (rev9) Patchwork
2019-04-03 13:44 ` Daniel Vetter [this message]
2019-04-04 3:11 ` [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=20190403134440.GF2665@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=igt-dev@lists.freedesktop.org \
--cc=maarten.lankhorst@intel.com \
--cc=uma.shankar@intel.com \
--cc=ville.syrjala@intel.com \
/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