[igt-dev] [PATCH i-g-t] tests/kms_writeback: fix kms_writeback failure for XRGB8888 only devices

Jessica Zhang quic_jesszhan at quicinc.com
Thu Nov 30 23:10:43 UTC 2023



On 11/29/2023 7:21 PM, Abhinav Kumar wrote:
> commit ac56ba97248b ("tests/kms_writeback: support DRM_FORMAT_XRGB2101010
> for writeback") seems to have broken kms_writeback for devices which
> support only XRGB8888 because check_writeback_config() will return a value
> based on the last format in the fourcc[] array.
> 
> For devices such as MSM which do not support DRM_FORMAT_XRGB2101010, this
> will return an error and overall kms_writeback_get_output() will not
> return a valid output for the writeback connector.
> 
> Change the return of check_writeback_config() to return based on the
> supported_colors bitmask so that only when neither XRGB8888 or
> DRM_FORMAT_XRGB2101010 is supported, then the test is skipped.
> 
> Signed-off-by: Abhinav Kumar <quic_abhinavk at quicinc.com>

Applied, thanks!

BR,

Jessica Zhang

> ---
>   tests/kms_writeback.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
> index 25b49eccdbd3..f6e55c809de1 100644
> --- a/tests/kms_writeback.c
> +++ b/tests/kms_writeback.c
> @@ -171,7 +171,7 @@ static bool check_writeback_config(igt_display_t *display, igt_output_t *output,
>   			data.supported_colors |= 1 << i;
>   	}
>   
> -	return !ret;
> +	return data.supported_colors;
>   }
>   
>   static igt_output_t *kms_writeback_get_output(igt_display_t *display)
> -- 
> 2.40.1
> 


More information about the igt-dev mailing list