[igt-dev] [PATCH i-g-t 1/2] tests/kms_rmfb: Use COMMIT_UNIVERSAL for overlay/cursor planes

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Feb 23 17:56:43 UTC 2021


Took a while to comprehend those code paths but look ok to me.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

On 23.2.2021 15.49, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Using COMMIT_LEGACY for the cursor plane makes the test fail
> because the cursor framebuffer is never handed over to the
> kernel, and instead only the BO gets passed in via the
> legacy cursor ioctl. Thus the rmfb ioctl will not turn off
> the cursor plane since the kernel is using an internal fb
> for the cursor. Let's avoid that by treating the cursor as
> just another universal plane.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>   tests/kms_rmfb.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_rmfb.c b/tests/kms_rmfb.c
> index 81932e0d830c..2d49be8ea399 100644
> --- a/tests/kms_rmfb.c
> +++ b/tests/kms_rmfb.c
> @@ -87,8 +87,10 @@ test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reo
>   			igt_plane_set_fb(plane, &fb);
>   		}
>   
> -		if (igt_display_try_commit2(&data->display, data->display.is_atomic ?
> -					    COMMIT_ATOMIC : COMMIT_LEGACY)) {
> +		if (igt_display_try_commit2(&data->display,
> +					    data->display.is_atomic ? COMMIT_ATOMIC :
> +					    plane->type == DRM_PLANE_TYPE_PRIMARY ?
> +					    COMMIT_LEGACY : COMMIT_UNIVERSAL)) {
>   			/*
>   			 * Disable any plane that fails (presumably
>   			 * due to exceeding some hardware limit).
> 



More information about the igt-dev mailing list