All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Peres <martin.peres@mupuf.org>
To: Lyude <lyude@redhat.com>,
	igt-dev@lists.freedesktop.org, nouveau@lists.freedesktop.org
Cc: Ben Skeggs <bskeggs@redhat.com>
Subject: Re: [Nouveau] [igt-dev] [PATCH i-g-t] tests/kms_plane: Don't unset primary_fb when testing other planes
Date: Thu, 18 Mar 2021 08:41:40 +0200	[thread overview]
Message-ID: <f5554f76-fc26-e307-0fe0-e59d3bca15ba@mupuf.org> (raw)
In-Reply-To: <20210317224407.447572-1-lyude@redhat.com>

On 18/03/2021 00:44, Lyude wrote:
> From: Lyude Paul <lyude@redhat.com>
> 
> Currently, nouveau doesn't support having a CRTC without a primary FB set. We
> won't reject such configurations, but the behavior is undefined which will cause
> CRCs to become undefined. So, avoid clearing the primary FB while we're testing
> non-primary planes.

Looks good to me:

Reviewed-by: Martin Peres <martin.peres@mupuf.org>

> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: Martin Peres <martin.peres@free.fr>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Jeremy Cline <jcline@redhat.com>
> ---
>   tests/kms_plane.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 298a9375..c87983a4 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -817,9 +817,10 @@ enum crc_set { PACKED_CRC_SET,
>   	       MAX_CRC_SET };
>   
>   static bool test_format_plane(data_t *data, enum pipe pipe,
> -			      igt_output_t *output, igt_plane_t *plane)
> +			      igt_output_t *output, igt_plane_t *plane, igt_fb_t *primary_fb)
>   {
>   	struct igt_fb fb = {};
> +	struct igt_fb *clear_fb = plane->type == DRM_PLANE_TYPE_PRIMARY ? primary_fb : NULL;
>   	drmModeModeInfo *mode;
>   	uint32_t format, ref_format;
>   	uint64_t modifier, ref_modifier;
> @@ -879,7 +880,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
>   			height = test_fb.height;
>   		}
>   
> -		igt_plane_set_fb(plane, NULL);
> +		igt_plane_set_fb(plane, clear_fb);
>   
>   		igt_remove_fb(data->drm_fd, &test_fb);
>   	}
> @@ -937,7 +938,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
>   
>   	igt_pipe_crc_stop(data->pipe_crc);
>   
> -	igt_plane_set_fb(plane, NULL);
> +	igt_plane_set_fb(plane, clear_fb);
>   	igt_remove_fb(data->drm_fd, &fb);
>   
>   	return result;
> @@ -1010,7 +1011,7 @@ test_pixel_formats(data_t *data, enum pipe pipe)
>   	for_each_plane_on_pipe(&data->display, pipe, plane) {
>   		if (skip_plane(data, plane))
>   			continue;
> -		result &= test_format_plane(data, pipe, output, plane);
> +		result &= test_format_plane(data, pipe, output, plane, &primary_fb);
>   	}
>   
>   	test_fini(data);
> 
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

WARNING: multiple messages have this Message-ID (diff)
From: Martin Peres <martin.peres@mupuf.org>
To: Lyude <lyude@redhat.com>,
	igt-dev@lists.freedesktop.org, nouveau@lists.freedesktop.org
Cc: Martin Peres <martin.peres@free.fr>, Ben Skeggs <bskeggs@redhat.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane: Don't unset primary_fb when testing other planes
Date: Thu, 18 Mar 2021 08:41:40 +0200	[thread overview]
Message-ID: <f5554f76-fc26-e307-0fe0-e59d3bca15ba@mupuf.org> (raw)
In-Reply-To: <20210317224407.447572-1-lyude@redhat.com>

On 18/03/2021 00:44, Lyude wrote:
> From: Lyude Paul <lyude@redhat.com>
> 
> Currently, nouveau doesn't support having a CRTC without a primary FB set. We
> won't reject such configurations, but the behavior is undefined which will cause
> CRCs to become undefined. So, avoid clearing the primary FB while we're testing
> non-primary planes.

Looks good to me:

Reviewed-by: Martin Peres <martin.peres@mupuf.org>

> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: Martin Peres <martin.peres@free.fr>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Jeremy Cline <jcline@redhat.com>
> ---
>   tests/kms_plane.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 298a9375..c87983a4 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -817,9 +817,10 @@ enum crc_set { PACKED_CRC_SET,
>   	       MAX_CRC_SET };
>   
>   static bool test_format_plane(data_t *data, enum pipe pipe,
> -			      igt_output_t *output, igt_plane_t *plane)
> +			      igt_output_t *output, igt_plane_t *plane, igt_fb_t *primary_fb)
>   {
>   	struct igt_fb fb = {};
> +	struct igt_fb *clear_fb = plane->type == DRM_PLANE_TYPE_PRIMARY ? primary_fb : NULL;
>   	drmModeModeInfo *mode;
>   	uint32_t format, ref_format;
>   	uint64_t modifier, ref_modifier;
> @@ -879,7 +880,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
>   			height = test_fb.height;
>   		}
>   
> -		igt_plane_set_fb(plane, NULL);
> +		igt_plane_set_fb(plane, clear_fb);
>   
>   		igt_remove_fb(data->drm_fd, &test_fb);
>   	}
> @@ -937,7 +938,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
>   
>   	igt_pipe_crc_stop(data->pipe_crc);
>   
> -	igt_plane_set_fb(plane, NULL);
> +	igt_plane_set_fb(plane, clear_fb);
>   	igt_remove_fb(data->drm_fd, &fb);
>   
>   	return result;
> @@ -1010,7 +1011,7 @@ test_pixel_formats(data_t *data, enum pipe pipe)
>   	for_each_plane_on_pipe(&data->display, pipe, plane) {
>   		if (skip_plane(data, plane))
>   			continue;
> -		result &= test_format_plane(data, pipe, output, plane);
> +		result &= test_format_plane(data, pipe, output, plane, &primary_fb);
>   	}
>   
>   	test_fini(data);
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2021-03-18  7:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 22:44 [Nouveau] [PATCH i-g-t] tests/kms_plane: Don't unset primary_fb when testing other planes Lyude
2021-03-17 22:44 ` [igt-dev] " Lyude
2021-03-18  0:41 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-03-18  3:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-03-18  6:41 ` Martin Peres [this message]
2021-03-18  6:41   ` [igt-dev] [PATCH i-g-t] " Martin Peres
2021-03-21 20:02   ` [Nouveau] " Juha-Pekka Heikkila
2021-03-21 20:02     ` Juha-Pekka Heikkila
2021-03-22  6:53     ` [Nouveau] " Martin Peres
2021-03-22  6:53       ` Martin Peres
2021-03-22  8:12     ` [Nouveau] " Saarinen, Jani
2021-03-22  8:12       ` Saarinen, Jani

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=f5554f76-fc26-e307-0fe0-e59d3bca15ba@mupuf.org \
    --to=martin.peres@mupuf.org \
    --cc=bskeggs@redhat.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.