All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kahola, Mika" <mika.kahola@intel.com>
To: "Hogander, Jouni" <jouni.hogander@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 1/4] tests/i915/kms_psr2_sf.c: Fix for setting wrong size for cursor fb
Date: Mon, 30 May 2022 08:34:15 +0000	[thread overview]
Message-ID: <MWHPR1101MB21574EAD0796C806F212025EEFDD9@MWHPR1101MB2157.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220530060701.406219-2-jouni.hogander@intel.com>

> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Jouni
> Högander
> Sent: Monday, May 30, 2022 9:07 AM
> To: igt-dev@lists.freedesktop.org
> Subject: [igt-dev] [PATCH i-g-t 1/4] tests/i915/kms_psr2_sf.c: Fix for setting
> wrong size for cursor fb
> 
> Current code is setting wrong size for cursor framebuffer. Fix thi by handling all
> plane types separately.
> 
> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/6064
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

> ---
>  tests/i915/kms_psr2_sf.c | 20 +++++++++++++++-----
>  1 file changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/i915/kms_psr2_sf.c b/tests/i915/kms_psr2_sf.c index
> 1ccbd11a..f9f514ab 100644
> --- a/tests/i915/kms_psr2_sf.c
> +++ b/tests/i915/kms_psr2_sf.c
> @@ -710,8 +710,7 @@ static void plane_move_continuous(data_t *data)  static
> void damaged_plane_update(data_t *data)  {
>  	igt_plane_t *test_plane = data->test_plane;
> -	uint32_t h = data->mode->hdisplay;
> -	uint32_t v = data->mode->vdisplay;
> +	uint32_t h, v;
>  	int x, y;
> 
>  	if (data->big_fb_test) {
> @@ -721,9 +720,20 @@ static void damaged_plane_update(data_t *data)
>  		x = y = 0;
>  	}
> 
> -	if (data->test_plane_id == DRM_PLANE_TYPE_OVERLAY) {
> -		h = h/2;
> -		v = v/2;
> +	switch (data->test_plane_id) {
> +	case DRM_PLANE_TYPE_OVERLAY:
> +		h = data->mode->hdisplay / 2;
> +		v = data->mode->vdisplay / 2;
> +		break;
> +	case DRM_PLANE_TYPE_PRIMARY:
> +		h = data->mode->hdisplay;
> +		v = data->mode->vdisplay;
> +		break;
> +	case DRM_PLANE_TYPE_CURSOR:
> +		h = v = CUR_SIZE;
> +		break;
> +	default:
> +		igt_assert(false);
>  	}
> 
>  	if (data->screen_changes & 1) {
> --
> 2.25.1


  reply	other threads:[~2022-05-30  8:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30  6:06 [igt-dev] [PATCH i-g-t 0/4] Fixes for big_fb test handling Jouni Högander
2022-05-30  6:06 ` [igt-dev] [PATCH i-g-t 1/4] tests/i915/kms_psr2_sf.c: Fix for setting wrong size for cursor fb Jouni Högander
2022-05-30  8:34   ` Kahola, Mika [this message]
2022-05-30  6:06 ` [igt-dev] [PATCH i-g-t 2/4] tests/i915_kms_psr2_sf: Set big_fb_test as 0 by default Jouni Högander
2022-05-30  8:34   ` Kahola, Mika
2022-05-30  6:07 ` [igt-dev] [PATCH i-g-t 3/4] tests/i915/kms_psr2_sf: Make setting fb and plane sz/pos more clear Jouni Högander
2022-05-30  8:34   ` Kahola, Mika
2022-05-30  6:07 ` [igt-dev] [PATCH i-g-t 4/4] tests/i915/kms_psr2_sf: Fix setting wrong fb size Jouni Högander
2022-05-30  8:35   ` Kahola, Mika
2022-05-30  6:41 ` [igt-dev] ✓ Fi.CI.BAT: success for Fixes for big_fb test handling Patchwork
2022-05-30  7:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-05-30 12:53 ` [igt-dev] [PATCH i-g-t 0/4] " Hogander, Jouni

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=MWHPR1101MB21574EAD0796C806F212025EEFDD9@MWHPR1101MB2157.namprd11.prod.outlook.com \
    --to=mika.kahola@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jouni.hogander@intel.com \
    /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.