All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
To: "José Roberto de Souza" <jose.souza@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2 4/4] tests/kms_psr: Add drmModeDirtyFB() calls to handle frontbuffer rendering tests
Date: Thu, 2 Sep 2021 22:48:46 +0300	[thread overview]
Message-ID: <70d72cb5-f7c1-73dd-6c42-3515885e5909@intel.com> (raw)
In-Reply-To: <20210818222419.210879-4-jose.souza@intel.com>

Looks good to me. but in kms_frontbuffer_tracking.c, there is a function 
with the same role called fb_dirty_ioctl(), so it seems good to use it 
as a common igt function in the future.
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>

On 8/19/21 1:24 AM, José Roberto de Souza wrote:
> Without this i915 don't know that frontbuffer was updated.
> This will be a problem when frontbuffer rendering is dropped from i915
> in modern platforms.
> 
> Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>   tests/kms_psr.c | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index 8f2fbb8a3..f85626d21 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -259,6 +259,20 @@ static bool drrs_disabled(data_t *data)
>   	return !strstr(buf, "DRRS Enabled : Yes\n");
>   }
>   
> +static void fb_dirty_fb_ioctl(data_t *data, struct igt_fb *fb)
> +{
> +	int ret;
> +	drmModeClip clip = {
> +		.x1 = 0,
> +		.x2 = fb->width,
> +		.y1 = 0,
> +		.y2 = fb->height
> +	};
> +
> +	ret = drmModeDirtyFB(data->drm_fd, fb->fb_id, &clip, 1);
> +	igt_assert(ret == 0 || ret == -ENOSYS);
> +}
> +
>   static void run_test(data_t *data)
>   {
>   	uint32_t handle = data->fb_white.gem_handle;
> @@ -299,6 +313,7 @@ static void run_test(data_t *data)
>   			       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
>   		memset(ptr, 0xcc, data->mod_size);
>   		munmap(ptr, data->mod_size);
> +		fb_dirty_fb_ioctl(data, &data->fb_white);
>   		expected = "BLACK or TRANSPARENT mark on top of plane in test";
>   		break;
>   	case MMAP_CPU:
> @@ -309,14 +324,17 @@ static void run_test(data_t *data)
>   		memset(ptr, 0, data->mod_size);
>   		munmap(ptr, data->mod_size);
>   		gem_sw_finish(data->drm_fd, handle);
> +		fb_dirty_fb_ioctl(data, &data->fb_white);
>   		expected = "BLACK or TRANSPARENT mark on top of plane in test";
>   		break;
>   	case BLT:
>   		fill_blt(data, &data->fb_white, 0);
> +		fb_dirty_fb_ioctl(data, &data->fb_white);
>   		expected = "BLACK or TRANSPARENT mark on top of plane in test";
>   		break;
>   	case RENDER:
>   		fill_render(data, &data->fb_white, 0);
> +		fb_dirty_fb_ioctl(data, &data->fb_white);
>   		expected = "BLACK or TRANSPARENT mark on top of plane in test";
>   		break;
>   	case PLANE_MOVE:
> 

  reply	other threads:[~2021-09-02 19:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 22:24 [igt-dev] [PATCH i-g-t v2 1/4] tests/kms_cursor_legacy: Handle cursor movements as slow patch for display 9+ José Roberto de Souza
2021-08-18 22:24 ` [igt-dev] [PATCH i-g-t v2 2/4] tests/kms_psr2_su: Set the damaged clip in page flips José Roberto de Souza
2021-09-02 19:32   ` Gwan-gyeong Mun
2021-08-18 22:24 ` [igt-dev] [PATCH i-g-t v2 3/4] test/kms_frontbuffer_tracking: Fix multidraw test José Roberto de Souza
2021-09-02 19:42   ` Gwan-gyeong Mun
2021-08-18 22:24 ` [igt-dev] [PATCH i-g-t v2 4/4] tests/kms_psr: Add drmModeDirtyFB() calls to handle frontbuffer rendering tests José Roberto de Souza
2021-09-02 19:48   ` Gwan-gyeong Mun [this message]
2021-09-07 18:01 [igt-dev] [PATCH i-g-t v2 1/4] tests/kms_cursor_legacy: Handle cursor movements as slow patch for display 9+ José Roberto de Souza
2021-09-07 18:01 ` [igt-dev] [PATCH i-g-t v2 4/4] tests/kms_psr: Add drmModeDirtyFB() calls to handle frontbuffer rendering tests José Roberto de Souza

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=70d72cb5-f7c1-73dd-6c42-3515885e5909@intel.com \
    --to=gwan-gyeong.mun@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jose.souza@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.