[igt-dev] [PATCH i-g-t v2] tests/kms_plane: allow pixel-format tests to run on drivers without legacy LUT

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon May 22 13:20:08 UTC 2023


Hi Maira,

On 2023-04-25 at 12:29:04 -0300, Maíra Canal wrote:
> Currently, the tests pixel-format and pixel-format-source-clamping
> fail for drivers that doesn't have support for legacy LUT, as they
> are not able to complete drmModeCrtcSetGamma() successfully. Therefore,
> if !crtc->gamma_size, don't set legacy LUT and allow the pixel-format
> tests to run even if the driver doesn't support legacy LUT.
> 
> Signed-off-by: Maíra Canal <mcanal at igalia.com>
> ---
>  tests/kms_plane.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 62aee9ad..9b49f951 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -455,6 +455,9 @@ static void set_legacy_lut(data_t *data, enum pipe pipe,
---------------------------- ^
Maybe you should change that to bool.

>  	lut_size = crtc->gamma_size;
>  	drmModeFreeCrtc(crtc);
>  
> +	if (!crtc->gamma_size)
----------- ^
Use lut_size here, see function set_c8_legacy_lut
and correct caller sites to check if it is supported.

Regards,
Kamil

> +		return;
> +
>  	lut = malloc(sizeof(uint16_t) * lut_size);
>  
>  	for (i = 0; i < lut_size; i++)
> -- 
> 2.40.0
> 


More information about the igt-dev mailing list