All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC
@ 2021-05-21  4:08 ` Vidya Srinivas
  0 siblings, 0 replies; 16+ messages in thread
From: Vidya Srinivas @ 2021-05-21  4:08 UTC (permalink / raw)
  To: intel-gfx, dri-devel, igt-dev
  Cc: markyacoub, Charlton.Lin, Vidya Srinivas, khaled.almahallawy

Without wait for vblank, CRC mismatch is seen
between big and small CRC on few systems

Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_big_fb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index b2027b6b9d1b..7d78ff829d41 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
 static bool test_plane(data_t *data)
 {
 	igt_plane_t *plane = data->plane;
+	igt_display_t *display = &data->display;
 	struct igt_fb *small_fb = &data->small_fb;
 	struct igt_fb *big_fb = &data->big_fb;
 	int w = data->big_fb_width - small_fb->width;
@@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
 
 		igt_plane_set_fb(plane, big_fb);
 		igt_fb_set_position(big_fb, plane, x, y);
 		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
+
 		igt_plane_set_size(plane, data->width, data->height);
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
 
 		igt_plane_set_fb(plane, NULL);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-gfx] [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC
@ 2021-05-21  4:08 ` Vidya Srinivas
  0 siblings, 0 replies; 16+ messages in thread
From: Vidya Srinivas @ 2021-05-21  4:08 UTC (permalink / raw)
  To: intel-gfx, dri-devel, igt-dev; +Cc: markyacoub, Charlton.Lin

Without wait for vblank, CRC mismatch is seen
between big and small CRC on few systems

Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_big_fb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index b2027b6b9d1b..7d78ff829d41 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
 static bool test_plane(data_t *data)
 {
 	igt_plane_t *plane = data->plane;
+	igt_display_t *display = &data->display;
 	struct igt_fb *small_fb = &data->small_fb;
 	struct igt_fb *big_fb = &data->big_fb;
 	int w = data->big_fb_width - small_fb->width;
@@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
 
 		igt_plane_set_fb(plane, big_fb);
 		igt_fb_set_position(big_fb, plane, x, y);
 		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
+
 		igt_plane_set_size(plane, data->width, data->height);
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
 
 		igt_plane_set_fb(plane, NULL);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-21  4:08 ` [Intel-gfx] " Vidya Srinivas
@ 2021-05-21 11:29   ` Juha-Pekka Heikkila
  -1 siblings, 0 replies; 16+ messages in thread
From: Juha-Pekka Heikkila @ 2021-05-21 11:29 UTC (permalink / raw)
  To: Vidya Srinivas, intel-gfx, dri-devel, igt-dev; +Cc: Charlton.Lin

Hi Vidya,

on which machines this would help? I see there's many vblanks already 
being waited. There's igt_display_commit2 which probably will block and 
even if it didn't there's igt_pipe_crc_collect_crc(..) where crc 
calculation is started after flip and then get one crc before disabling 
crc counting again.

/Juha-Pekka

On 21.5.2021 7.08, Vidya Srinivas wrote:
> Without wait for vblank, CRC mismatch is seen
> between big and small CRC on few systems
> 
> Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>   tests/kms_big_fb.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
> index b2027b6b9d1b..7d78ff829d41 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
>   static bool test_plane(data_t *data)
>   {
>   	igt_plane_t *plane = data->plane;
> +	igt_display_t *display = &data->display;
>   	struct igt_fb *small_fb = &data->small_fb;
>   	struct igt_fb *big_fb = &data->big_fb;
>   	int w = data->big_fb_width - small_fb->width;
> @@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
>   
> -
> +		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
>   		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
>   
>   		igt_plane_set_fb(plane, big_fb);
>   		igt_fb_set_position(big_fb, plane, x, y);
>   		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
> +
>   		igt_plane_set_size(plane, data->width, data->height);
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
>   		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
>   
>   		igt_plane_set_fb(plane, NULL);
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC
@ 2021-05-21 11:29   ` Juha-Pekka Heikkila
  0 siblings, 0 replies; 16+ messages in thread
From: Juha-Pekka Heikkila @ 2021-05-21 11:29 UTC (permalink / raw)
  To: Vidya Srinivas, intel-gfx, dri-devel, igt-dev; +Cc: Charlton.Lin

Hi Vidya,

on which machines this would help? I see there's many vblanks already 
being waited. There's igt_display_commit2 which probably will block and 
even if it didn't there's igt_pipe_crc_collect_crc(..) where crc 
calculation is started after flip and then get one crc before disabling 
crc counting again.

/Juha-Pekka

On 21.5.2021 7.08, Vidya Srinivas wrote:
> Without wait for vblank, CRC mismatch is seen
> between big and small CRC on few systems
> 
> Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>   tests/kms_big_fb.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
> index b2027b6b9d1b..7d78ff829d41 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
>   static bool test_plane(data_t *data)
>   {
>   	igt_plane_t *plane = data->plane;
> +	igt_display_t *display = &data->display;
>   	struct igt_fb *small_fb = &data->small_fb;
>   	struct igt_fb *big_fb = &data->big_fb;
>   	int w = data->big_fb_width - small_fb->width;
> @@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
>   
> -
> +		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
>   		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
>   
>   		igt_plane_set_fb(plane, big_fb);
>   		igt_fb_set_position(big_fb, plane, x, y);
>   		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
> +
>   		igt_plane_set_size(plane, data->width, data->height);
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
>   		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
>   
>   		igt_plane_set_fb(plane, NULL);
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-21 11:29   ` [Intel-gfx] " Juha-Pekka Heikkila
@ 2021-05-21 14:22     ` Srinivas, Vidya
  -1 siblings, 0 replies; 16+ messages in thread
From: Srinivas, Vidya @ 2021-05-21 14:22 UTC (permalink / raw)
  To: juhapekka.heikkila, intel-gfx, dri-devel, igt-dev; +Cc: Lin, Charlton

Hello Juha-Pekka

We are seeing the CRC failures on Jasperlake systems. Sometimes the test passes and sometimes it fails throwing CRC error.

Regards
Vidya

-----Original Message-----
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> 
Sent: Friday, May 21, 2021 5:00 PM
To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; igt-dev@lists.freedesktop.org
Cc: Lin, Charlton <charlton.lin@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC

Hi Vidya,

on which machines this would help? I see there's many vblanks already being waited. There's igt_display_commit2 which probably will block and even if it didn't there's igt_pipe_crc_collect_crc(..) where crc calculation is started after flip and then get one crc before disabling crc counting again.

/Juha-Pekka

On 21.5.2021 7.08, Vidya Srinivas wrote:
> Without wait for vblank, CRC mismatch is seen between big and small 
> CRC on few systems
> 
> Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>   tests/kms_big_fb.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c index 
> b2027b6b9d1b..7d78ff829d41 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
>   static bool test_plane(data_t *data)
>   {
>   	igt_plane_t *plane = data->plane;
> +	igt_display_t *display = &data->display;
>   	struct igt_fb *small_fb = &data->small_fb;
>   	struct igt_fb *big_fb = &data->big_fb;
>   	int w = data->big_fb_width - small_fb->width; @@ -337,16 +338,17 @@ 
> static bool test_plane(data_t *data)
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
>   
> -
> +		igt_wait_for_vblank(data->drm_fd, 
> +display->pipes[data->pipe].crtc_offset);
>   		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
>   
>   		igt_plane_set_fb(plane, big_fb);
>   		igt_fb_set_position(big_fb, plane, x, y);
>   		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
> +
>   		igt_plane_set_size(plane, data->width, data->height);
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +		igt_wait_for_vblank(data->drm_fd, 
> +display->pipes[data->pipe].crtc_offset);
>   		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
>   
>   		igt_plane_set_fb(plane, NULL);
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC
@ 2021-05-21 14:22     ` Srinivas, Vidya
  0 siblings, 0 replies; 16+ messages in thread
From: Srinivas, Vidya @ 2021-05-21 14:22 UTC (permalink / raw)
  To: juhapekka.heikkila, intel-gfx, dri-devel, igt-dev; +Cc: Lin, Charlton

Hello Juha-Pekka

We are seeing the CRC failures on Jasperlake systems. Sometimes the test passes and sometimes it fails throwing CRC error.

Regards
Vidya

-----Original Message-----
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> 
Sent: Friday, May 21, 2021 5:00 PM
To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; igt-dev@lists.freedesktop.org
Cc: Lin, Charlton <charlton.lin@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC

Hi Vidya,

on which machines this would help? I see there's many vblanks already being waited. There's igt_display_commit2 which probably will block and even if it didn't there's igt_pipe_crc_collect_crc(..) where crc calculation is started after flip and then get one crc before disabling crc counting again.

/Juha-Pekka

On 21.5.2021 7.08, Vidya Srinivas wrote:
> Without wait for vblank, CRC mismatch is seen between big and small 
> CRC on few systems
> 
> Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>   tests/kms_big_fb.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c index 
> b2027b6b9d1b..7d78ff829d41 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
>   static bool test_plane(data_t *data)
>   {
>   	igt_plane_t *plane = data->plane;
> +	igt_display_t *display = &data->display;
>   	struct igt_fb *small_fb = &data->small_fb;
>   	struct igt_fb *big_fb = &data->big_fb;
>   	int w = data->big_fb_width - small_fb->width; @@ -337,16 +338,17 @@ 
> static bool test_plane(data_t *data)
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
>   
> -
> +		igt_wait_for_vblank(data->drm_fd, 
> +display->pipes[data->pipe].crtc_offset);
>   		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
>   
>   		igt_plane_set_fb(plane, big_fb);
>   		igt_fb_set_position(big_fb, plane, x, y);
>   		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
> +
>   		igt_plane_set_size(plane, data->width, data->height);
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +		igt_wait_for_vblank(data->drm_fd, 
> +display->pipes[data->pipe].crtc_offset);
>   		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
>   
>   		igt_plane_set_fb(plane, NULL);
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-gfx] [PATCH 4/4] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-21  4:08 ` [Intel-gfx] " Vidya Srinivas
  (?)
  (?)
@ 2021-05-27 14:31 ` Vidya Srinivas
  2021-05-27 15:09   ` [Intel-gfx] [PATCH] " Vidya Srinivas
  2021-05-27 15:09   ` [Intel-gfx] [igt-dev] [PATCH 4/4] " Juha-Pekka Heikkila
  -1 siblings, 2 replies; 16+ messages in thread
From: Vidya Srinivas @ 2021-05-27 14:31 UTC (permalink / raw)
  To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin

Without wait for vblank, CRC mismatch is seen
between big and small CRC on some intel Gen11 platforms.

Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_big_fb.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index b2027b6b9d1b..da682593429b 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
 static bool test_plane(data_t *data)
 {
 	igt_plane_t *plane = data->plane;
+	igt_display_t *display = &data->display;
 	struct igt_fb *small_fb = &data->small_fb;
 	struct igt_fb *big_fb = &data->big_fb;
 	int w = data->big_fb_width - small_fb->width;
@@ -269,6 +270,7 @@ static bool test_plane(data_t *data)
 		{ w / 3, h * 3 / 4, },
 		{ w, h, },
 	};
+	bool check_platform_intel = is_i915_device(data->drm_fd);
 
 	if (!igt_plane_has_format_mod(plane, data->format, data->modifier))
 		return false;
@@ -336,17 +338,19 @@ static bool test_plane(data_t *data)
 
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
-
-
+		if (check_platform_intel)
+			igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
 
 		igt_plane_set_fb(plane, big_fb);
 		igt_fb_set_position(big_fb, plane, x, y);
 		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
+
 		igt_plane_set_size(plane, data->width, data->height);
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
-
+		if (check_platform_intel)
+			igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
 
 		igt_plane_set_fb(plane, NULL);
-- 
2.26.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-gfx] [PATCH] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-27 14:31 ` [Intel-gfx] [PATCH 4/4] [RFC] " Vidya Srinivas
@ 2021-05-27 15:09   ` Vidya Srinivas
  2021-05-27 15:23     ` [Intel-gfx] [PATCH i-g-t] " Vidya Srinivas
  2021-05-27 15:09   ` [Intel-gfx] [igt-dev] [PATCH 4/4] " Juha-Pekka Heikkila
  1 sibling, 1 reply; 16+ messages in thread
From: Vidya Srinivas @ 2021-05-27 15:09 UTC (permalink / raw)
  To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin

Without wait for vblank, CRC mismatch is seen between
big and small CRC on some Gen11 systems

Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_big_fb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index b2027b6b9d1b..7d78ff829d41 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
 static bool test_plane(data_t *data)
 {
 	igt_plane_t *plane = data->plane;
+	igt_display_t *display = &data->display;
 	struct igt_fb *small_fb = &data->small_fb;
 	struct igt_fb *big_fb = &data->big_fb;
 	int w = data->big_fb_width - small_fb->width;
@@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
 
 		igt_plane_set_fb(plane, big_fb);
 		igt_fb_set_position(big_fb, plane, x, y);
 		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
+
 		igt_plane_set_size(plane, data->width, data->height);
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
 
 		igt_plane_set_fb(plane, NULL);
-- 
2.26.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [igt-dev] [PATCH 4/4] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-27 14:31 ` [Intel-gfx] [PATCH 4/4] [RFC] " Vidya Srinivas
  2021-05-27 15:09   ` [Intel-gfx] [PATCH] " Vidya Srinivas
@ 2021-05-27 15:09   ` Juha-Pekka Heikkila
  2021-05-27 15:13     ` Srinivas, Vidya
  1 sibling, 1 reply; 16+ messages in thread
From: Juha-Pekka Heikkila @ 2021-05-27 15:09 UTC (permalink / raw)
  To: Vidya Srinivas, intel-gfx, igt-dev; +Cc: charlton.lin

On 27.5.2021 17.31, Vidya Srinivas wrote:
> Without wait for vblank, CRC mismatch is seen
> between big and small CRC on some intel Gen11 platforms.
> 
> Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>   tests/kms_big_fb.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
> index b2027b6b9d1b..da682593429b 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
>   static bool test_plane(data_t *data)
>   {
>   	igt_plane_t *plane = data->plane;
> +	igt_display_t *display = &data->display;
>   	struct igt_fb *small_fb = &data->small_fb;
>   	struct igt_fb *big_fb = &data->big_fb;
>   	int w = data->big_fb_width - small_fb->width;
> @@ -269,6 +270,7 @@ static bool test_plane(data_t *data)
>   		{ w / 3, h * 3 / 4, },
>   		{ w, h, },
>   	};
> +	bool check_platform_intel = is_i915_device(data->drm_fd);

You will not need to do this. This test start with

drm_open_driver_master(DRIVER_INTEL)

hence will always be only on intel device.

>   
>   	if (!igt_plane_has_format_mod(plane, data->format, data->modifier))
>   		return false;
> @@ -336,17 +338,19 @@ static bool test_plane(data_t *data)
>   
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> -
> +		if (check_platform_intel)
> +			igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);

Above this line there's flip to different framebuffer and below this 
line there's restart of crc collection before get any crc. If there's 
need to wait a vblank at this place to get matching crcs the actual bug 
is somewhere else.

>   		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
>   
>   		igt_plane_set_fb(plane, big_fb);
>   		igt_fb_set_position(big_fb, plane, x, y);
>   		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
> +
>   		igt_plane_set_size(plane, data->width, data->height);
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +		if (check_platform_intel)
> +			igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);

Here it's the same story as above.

>   		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
>   
>   		igt_plane_set_fb(plane, NULL);
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [igt-dev] [PATCH 4/4] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-27 15:09   ` [Intel-gfx] [igt-dev] [PATCH 4/4] " Juha-Pekka Heikkila
@ 2021-05-27 15:13     ` Srinivas, Vidya
  0 siblings, 0 replies; 16+ messages in thread
From: Srinivas, Vidya @ 2021-05-27 15:13 UTC (permalink / raw)
  To: juhapekka.heikkila, intel-gfx, igt-dev; +Cc: Lin, Charlton

Hello Juha-Pekka,

I am sorry, this is not needed.
Thank you so much.

Regards
Vidya

-----Original Message-----
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> 
Sent: Thursday, May 27, 2021 8:40 PM
To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org
Cc: Lin, Charlton <charlton.lin@intel.com>
Subject: Re: [igt-dev] [PATCH 4/4] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC

On 27.5.2021 17.31, Vidya Srinivas wrote:
> Without wait for vblank, CRC mismatch is seen between big and small 
> CRC on some intel Gen11 platforms.
> 
> Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>   tests/kms_big_fb.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c index 
> b2027b6b9d1b..da682593429b 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
>   static bool test_plane(data_t *data)
>   {
>   	igt_plane_t *plane = data->plane;
> +	igt_display_t *display = &data->display;
>   	struct igt_fb *small_fb = &data->small_fb;
>   	struct igt_fb *big_fb = &data->big_fb;
>   	int w = data->big_fb_width - small_fb->width; @@ -269,6 +270,7 @@ 
> static bool test_plane(data_t *data)
>   		{ w / 3, h * 3 / 4, },
>   		{ w, h, },
>   	};
> +	bool check_platform_intel = is_i915_device(data->drm_fd);

You will not need to do this. This test start with

drm_open_driver_master(DRIVER_INTEL)

hence will always be only on intel device.

>   
>   	if (!igt_plane_has_format_mod(plane, data->format, data->modifier))
>   		return false;
> @@ -336,17 +338,19 @@ static bool test_plane(data_t *data)
>   
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> -
> +		if (check_platform_intel)
> +			igt_wait_for_vblank(data->drm_fd, 
> +display->pipes[data->pipe].crtc_offset);

Above this line there's flip to different framebuffer and below this line there's restart of crc collection before get any crc. If there's need to wait a vblank at this place to get matching crcs the actual bug is somewhere else.

>   		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
>   
>   		igt_plane_set_fb(plane, big_fb);
>   		igt_fb_set_position(big_fb, plane, x, y);
>   		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
> +
>   		igt_plane_set_size(plane, data->width, data->height);
>   		igt_display_commit2(&data->display, data->display.is_atomic ?
>   				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +		if (check_platform_intel)
> +			igt_wait_for_vblank(data->drm_fd, 
> +display->pipes[data->pipe].crtc_offset);

Here it's the same story as above.

>   		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
>   
>   		igt_plane_set_fb(plane, NULL);
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-27 15:09   ` [Intel-gfx] [PATCH] " Vidya Srinivas
@ 2021-05-27 15:23     ` Vidya Srinivas
  0 siblings, 0 replies; 16+ messages in thread
From: Vidya Srinivas @ 2021-05-27 15:23 UTC (permalink / raw)
  To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin

Without wait for vblank, CRC mismatch is seen
between big and small CRC on few Gen11 systems.

Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_big_fb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index b2027b6b9d1b..7d78ff829d41 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
 static bool test_plane(data_t *data)
 {
 	igt_plane_t *plane = data->plane;
+	igt_display_t *display = &data->display;
 	struct igt_fb *small_fb = &data->small_fb;
 	struct igt_fb *big_fb = &data->big_fb;
 	int w = data->big_fb_width - small_fb->width;
@@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
 
 		igt_plane_set_fb(plane, big_fb);
 		igt_fb_set_position(big_fb, plane, x, y);
 		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
+
 		igt_plane_set_size(plane, data->width, data->height);
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
 
 		igt_plane_set_fb(plane, NULL);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-28  4:27 Vidya Srinivas
  2021-06-04 18:50 ` Mark Yacoub
@ 2021-06-08  7:01 ` Modem, Bhanuprakash
  1 sibling, 0 replies; 16+ messages in thread
From: Modem, Bhanuprakash @ 2021-06-08  7:01 UTC (permalink / raw)
  To: Srinivas, Vidya, intel-gfx, igt-dev; +Cc: markyacoub, Lin, Charlton

> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Vidya
> Srinivas
> Sent: Friday, May 28, 2021 9:57 AM
> To: intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org
> Cc: markyacoub@chromium.org; Lin, Charlton <charlton.lin@intel.com>
> Subject: [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_big_fb: Wait for vblank
> before collecting CRC
> 
> Without wait for vblank, CRC mismatch is seen
> between big and small CRC on few Gen11 systems.
> 
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>  tests/kms_big_fb.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
> index b35727a09bd0..f90363c3beb2 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
>  static bool test_plane(data_t *data)
>  {
>  	igt_plane_t *plane = data->plane;
> +	igt_display_t *display = &data->display;

For code readability purpose, I think we need to update to use this variable
wherever we are using "&data->display" in this function.
s/"&data->display"/"display"/

With above change, this patch LGTM
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

>  	struct igt_fb *small_fb = &data->small_fb;
>  	struct igt_fb *big_fb = &data->big_fb;
>  	int w = data->big_fb_width - small_fb->width;
> @@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
>  		igt_display_commit2(&data->display, data->display.is_atomic ?
>  				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> 
> -
> +		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
>  		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
> 
>  		igt_plane_set_fb(plane, big_fb);
>  		igt_fb_set_position(big_fb, plane, x, y);
>  		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
> +
>  		igt_plane_set_size(plane, data->width, data->height);
>  		igt_display_commit2(&data->display, data->display.is_atomic ?
>  				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
>  		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
> 
>  		igt_plane_set_fb(plane, NULL);
> --
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-06-04 18:50 ` Mark Yacoub
@ 2021-06-05  5:46   ` Srinivas, Vidya
  0 siblings, 0 replies; 16+ messages in thread
From: Srinivas, Vidya @ 2021-06-05  5:46 UTC (permalink / raw)
  To: Mark Yacoub; +Cc: igt-dev, intel-gfx, Lin, Charlton

Thank you very much Mark, for testing the patch and providing the "Tested-by" tag.

Regards
Vidya

-----Original Message-----
From: Mark Yacoub <markyacoub@chromium.org> 
Sent: Saturday, June 5, 2021 12:20 AM
To: Srinivas, Vidya <vidya.srinivas@intel.com>
Cc: intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org; Almahallawy, Khaled <khaled.almahallawy@intel.com>; Lin, Charlton <charlton.lin@intel.com>
Subject: Re: [PATCH i-g-t] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC

On Fri, May 28, 2021 at 12:36 AM Vidya Srinivas <vidya.srinivas@intel.com> wrote:
>
> Without wait for vblank, CRC mismatch is seen between big and small 
> CRC on few Gen11 systems.
>
Tested on ChromeOS on JSL (Drawlat).
Tested-by: Mark Yacoub <markyacoub@chromium.org>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>  tests/kms_big_fb.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c index 
> b35727a09bd0..f90363c3beb2 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)  static bool 
> test_plane(data_t *data)  {
>         igt_plane_t *plane = data->plane;
> +       igt_display_t *display = &data->display;
>         struct igt_fb *small_fb = &data->small_fb;
>         struct igt_fb *big_fb = &data->big_fb;
>         int w = data->big_fb_width - small_fb->width; @@ -337,16 
> +338,17 @@ static bool test_plane(data_t *data)
>                 igt_display_commit2(&data->display, data->display.is_atomic ?
>                                     COMMIT_ATOMIC : COMMIT_UNIVERSAL);
>
> -
> +               igt_wait_for_vblank(data->drm_fd, 
> + display->pipes[data->pipe].crtc_offset);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
>
>                 igt_plane_set_fb(plane, big_fb);
>                 igt_fb_set_position(big_fb, plane, x, y);
>                 igt_fb_set_size(big_fb, plane, small_fb->width, 
> small_fb->height);
> +
>                 igt_plane_set_size(plane, data->width, data->height);
>                 igt_display_commit2(&data->display, data->display.is_atomic ?
>                                     COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +               igt_wait_for_vblank(data->drm_fd, 
> + display->pipes[data->pipe].crtc_offset);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
>
>                 igt_plane_set_fb(plane, NULL);
> --
> 2.7.4
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
  2021-05-28  4:27 Vidya Srinivas
@ 2021-06-04 18:50 ` Mark Yacoub
  2021-06-05  5:46   ` Srinivas, Vidya
  2021-06-08  7:01 ` Modem, Bhanuprakash
  1 sibling, 1 reply; 16+ messages in thread
From: Mark Yacoub @ 2021-06-04 18:50 UTC (permalink / raw)
  To: Vidya Srinivas; +Cc: igt-dev, intel-gfx, charlton.lin

On Fri, May 28, 2021 at 12:36 AM Vidya Srinivas
<vidya.srinivas@intel.com> wrote:
>
> Without wait for vblank, CRC mismatch is seen
> between big and small CRC on few Gen11 systems.
>
Tested on ChromeOS on JSL (Drawlat).
Tested-by: Mark Yacoub <markyacoub@chromium.org>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>  tests/kms_big_fb.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
> index b35727a09bd0..f90363c3beb2 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
>  static bool test_plane(data_t *data)
>  {
>         igt_plane_t *plane = data->plane;
> +       igt_display_t *display = &data->display;
>         struct igt_fb *small_fb = &data->small_fb;
>         struct igt_fb *big_fb = &data->big_fb;
>         int w = data->big_fb_width - small_fb->width;
> @@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
>                 igt_display_commit2(&data->display, data->display.is_atomic ?
>                                     COMMIT_ATOMIC : COMMIT_UNIVERSAL);
>
> -
> +               igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
>
>                 igt_plane_set_fb(plane, big_fb);
>                 igt_fb_set_position(big_fb, plane, x, y);
>                 igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
> +
>                 igt_plane_set_size(plane, data->width, data->height);
>                 igt_display_commit2(&data->display, data->display.is_atomic ?
>                                     COMMIT_ATOMIC : COMMIT_UNIVERSAL);
> -
> +               igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
>
>                 igt_plane_set_fb(plane, NULL);
> --
> 2.7.4
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
@ 2021-05-28  4:27 Vidya Srinivas
  2021-06-04 18:50 ` Mark Yacoub
  2021-06-08  7:01 ` Modem, Bhanuprakash
  0 siblings, 2 replies; 16+ messages in thread
From: Vidya Srinivas @ 2021-05-28  4:27 UTC (permalink / raw)
  To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin

Without wait for vblank, CRC mismatch is seen
between big and small CRC on few Gen11 systems.

Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_big_fb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index b35727a09bd0..f90363c3beb2 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
 static bool test_plane(data_t *data)
 {
 	igt_plane_t *plane = data->plane;
+	igt_display_t *display = &data->display;
 	struct igt_fb *small_fb = &data->small_fb;
 	struct igt_fb *big_fb = &data->big_fb;
 	int w = data->big_fb_width - small_fb->width;
@@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
 
 		igt_plane_set_fb(plane, big_fb);
 		igt_fb_set_position(big_fb, plane, x, y);
 		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
+
 		igt_plane_set_size(plane, data->width, data->height);
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
 
 		igt_plane_set_fb(plane, NULL);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_big_fb: Wait for vblank before collecting CRC
@ 2021-05-27 15:40 Vidya Srinivas
  0 siblings, 0 replies; 16+ messages in thread
From: Vidya Srinivas @ 2021-05-27 15:40 UTC (permalink / raw)
  To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin

Without wait for vblank, CRC mismatch is seen
between big and small CRC on few Gen11 systems.

Change-Id: I3bec931aa901130997e693ac1cacf389e2a8100f
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_big_fb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index b2027b6b9d1b..7d78ff829d41 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -254,6 +254,7 @@ static void unset_lut(data_t *data)
 static bool test_plane(data_t *data)
 {
 	igt_plane_t *plane = data->plane;
+	igt_display_t *display = &data->display;
 	struct igt_fb *small_fb = &data->small_fb;
 	struct igt_fb *big_fb = &data->big_fb;
 	int w = data->big_fb_width - small_fb->width;
@@ -337,16 +338,17 @@ static bool test_plane(data_t *data)
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &small_crc);
 
 		igt_plane_set_fb(plane, big_fb);
 		igt_fb_set_position(big_fb, plane, x, y);
 		igt_fb_set_size(big_fb, plane, small_fb->width, small_fb->height);
+
 		igt_plane_set_size(plane, data->width, data->height);
 		igt_display_commit2(&data->display, data->display.is_atomic ?
 				    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
-
+		igt_wait_for_vblank(data->drm_fd, display->pipes[data->pipe].crtc_offset);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &big_crc);
 
 		igt_plane_set_fb(plane, NULL);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-06-08  7:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21  4:08 [PATCH i-g-t] tests/kms_big_fb: Wait for vblank before collecting CRC Vidya Srinivas
2021-05-21  4:08 ` [Intel-gfx] " Vidya Srinivas
2021-05-21 11:29 ` [igt-dev] " Juha-Pekka Heikkila
2021-05-21 11:29   ` [Intel-gfx] " Juha-Pekka Heikkila
2021-05-21 14:22   ` Srinivas, Vidya
2021-05-21 14:22     ` [Intel-gfx] " Srinivas, Vidya
2021-05-27 14:31 ` [Intel-gfx] [PATCH 4/4] [RFC] " Vidya Srinivas
2021-05-27 15:09   ` [Intel-gfx] [PATCH] " Vidya Srinivas
2021-05-27 15:23     ` [Intel-gfx] [PATCH i-g-t] " Vidya Srinivas
2021-05-27 15:09   ` [Intel-gfx] [igt-dev] [PATCH 4/4] " Juha-Pekka Heikkila
2021-05-27 15:13     ` Srinivas, Vidya
2021-05-27 15:40 [Intel-gfx] [PATCH i-g-t] " Vidya Srinivas
2021-05-28  4:27 Vidya Srinivas
2021-06-04 18:50 ` Mark Yacoub
2021-06-05  5:46   ` Srinivas, Vidya
2021-06-08  7:01 ` Modem, Bhanuprakash

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.