[igt-dev] [PATCH v3] tests/kms_plane: Handle hw without legacy gamma support
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Mon Aug 7 18:29:04 UTC 2023
Hi Rob,
On 7.8.2023 19.54, Rob Clark wrote:
> From: Rob Clark <robdclark at chromium.org>
>
> Skip the tests which require legacy gamma, instead of failing, if the hw
> does not support legacy gamma.
>
> v2: igt_require(lut_size > 0) instead
> v3: simplify patch
>
> Signed-off-by: Rob Clark <robdclark at chromium.org>
> ---
> tests/kms_plane.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 67cff61d6cd1..44cad2bf2491 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -469,6 +469,8 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
> lut_size = crtc->gamma_size;
> drmModeFreeCrtc(crtc);
>
> + igt_require(lut_size > 0);
> +
Is this something you really want on your hw? This lut stuff is
originally coming from this patch
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/093fa482371795c3aa246509994eb21907f501b9
where it is mentioned:
---
We also abuse the legacy LUT to drop the precision down to 6 bits
so that still errors causes by the RGB<->YCbCr conversion end up
being ignored.
---
With your change you'd skip testing of all available pixel
formats/modifiers combos on your driver while originally this feature is
mostly intended just to avoid hitting Intel hw related anomalies. Do
those tests work for you if you just not set that lut?
/Juha-Pekka
> lut = malloc(sizeof(uint16_t) * lut_size);
>
> for (i = 0; i < lut_size; i++)
More information about the igt-dev
mailing list