Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH 1/2] [i-g-t] tests/kms_cursor_crc: Fix cursor crop on AMD gpu
@ 2023-10-16 20:53 Hersen Wu
  2023-10-16 20:53 ` [igt-dev] [PATCH 2/2] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures " Hersen Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hersen Wu @ 2023-10-16 20:53 UTC (permalink / raw)
  To: igt-dev, juhapekka.heikkila, kamil.konieczny, rodrigo.siqueira,
	aurabindo.pillai, alex.hung, hamza.mahfooz, sunpeng.li
  Cc: Hersen Wu, markyacoub

Remove extra line when create cursor fb for AMD gpu.

AMD gpu does not support cursor buffer crop. AMD driver
fails validation with fb size not equal to cursor size.

Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_cursor_crc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 76c01f557..ba29ff65d 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -560,14 +560,18 @@ static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
 {
 	cairo_t *cr;
 	uint32_t fb_id;
+	int cur_h_extra_line = 1;
 
+	/* Cropping is not supported for cursor plane by AMD */
+	if (is_amdgpu_device(data->drm_fd))
+		cur_h_extra_line = 0;
 	/*
 	 * Make the FB slightly taller and leave the extra
 	 * line opaque white, so that we can see that the
 	 * hardware won't scan beyond what it should (esp.
 	 * with non-square cursors).
 	 */
-	fb_id = igt_create_color_fb(data->drm_fd, cur_w, cur_h + 1,
+	fb_id = igt_create_color_fb(data->drm_fd, cur_w, cur_h + cur_h_extra_line,
 				    DRM_FORMAT_ARGB8888,
 				    DRM_FORMAT_MOD_LINEAR,
 				    1.0, 1.0, 1.0,
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [igt-dev] [PATCH 1/2] [i-g-t] tests/kms_cursor_crc: Fix cursor crop on AMD gpu
@ 2023-10-16 20:58 Hersen Wu
  2023-10-16 20:58 ` [igt-dev] [PATCH 2/2] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures " Hersen Wu
  0 siblings, 1 reply; 7+ messages in thread
From: Hersen Wu @ 2023-10-16 20:58 UTC (permalink / raw)
  To: igt-dev, juhapekka.heikkila, kamil.konieczny, rodrigo.siqueira,
	aurabindo.pillai, alex.hung, hamza.mahfooz, sunpeng.li
  Cc: Hersen Wu, markyacoub

Remove extra line when create cursor fb for AMD gpu.

AMD gpu does not support cursor buffer crop. AMD driver
fails validation with fb size not equal to cursor size.

Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_cursor_crc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 76c01f557..ba29ff65d 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -560,14 +560,18 @@ static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
 {
 	cairo_t *cr;
 	uint32_t fb_id;
+	int cur_h_extra_line = 1;
 
+	/* Cropping is not supported for cursor plane by AMD */
+	if (is_amdgpu_device(data->drm_fd))
+		cur_h_extra_line = 0;
 	/*
 	 * Make the FB slightly taller and leave the extra
 	 * line opaque white, so that we can see that the
 	 * hardware won't scan beyond what it should (esp.
 	 * with non-square cursors).
 	 */
-	fb_id = igt_create_color_fb(data->drm_fd, cur_w, cur_h + 1,
+	fb_id = igt_create_color_fb(data->drm_fd, cur_w, cur_h + cur_h_extra_line,
 				    DRM_FORMAT_ARGB8888,
 				    DRM_FORMAT_MOD_LINEAR,
 				    1.0, 1.0, 1.0,
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [igt-dev] [PATCH 1/2] [i-g-t] tests/kms_cursor_crc: Fix tests be skipped on AMD gpu
@ 2023-10-01 16:28 Hersen Wu
  2023-10-01 16:28 ` [igt-dev] [PATCH 2/2] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures " Hersen Wu
  0 siblings, 1 reply; 7+ messages in thread
From: Hersen Wu @ 2023-10-01 16:28 UTC (permalink / raw)
  To: igt-dev, rodrigo.siqueira, aurabindo.pillai, alex.hung,
	hamza.mahfooz, sunpeng.li
  Cc: Hersen Wu, markyacoub

Remove extra line when create cursor fb for AMD gpu.

AMD gpu does not support cursor buffer crop. AMD driver
fails validation with fb size not equal to cursor size.

Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
---
 tests/kms_cursor_crc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 76c01f557..ba29ff65d 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -560,14 +560,18 @@ static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
 {
 	cairo_t *cr;
 	uint32_t fb_id;
+	int cur_h_extra_line = 1;
 
+	/* Cropping is not supported for cursor plane by AMD */
+	if (is_amdgpu_device(data->drm_fd))
+		cur_h_extra_line = 0;
 	/*
 	 * Make the FB slightly taller and leave the extra
 	 * line opaque white, so that we can see that the
 	 * hardware won't scan beyond what it should (esp.
 	 * with non-square cursors).
 	 */
-	fb_id = igt_create_color_fb(data->drm_fd, cur_w, cur_h + 1,
+	fb_id = igt_create_color_fb(data->drm_fd, cur_w, cur_h + cur_h_extra_line,
 				    DRM_FORMAT_ARGB8888,
 				    DRM_FORMAT_MOD_LINEAR,
 				    1.0, 1.0, 1.0,
-- 
2.25.1

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

end of thread, other threads:[~2023-10-16 23:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16 20:53 [igt-dev] [PATCH 1/2] [i-g-t] tests/kms_cursor_crc: Fix cursor crop on AMD gpu Hersen Wu
2023-10-16 20:53 ` [igt-dev] [PATCH 2/2] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures " Hersen Wu
2023-10-16 23:00 ` [igt-dev] ✗ CI.xeBAT: failure for series starting with [1/2,i-g-t] tests/kms_cursor_crc: Fix cursor crop " Patchwork
2023-10-16 23:07 ` [igt-dev] ✗ Fi.CI.BAT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-10-16 20:58 [igt-dev] [PATCH 1/2] [i-g-t] " Hersen Wu
2023-10-16 20:58 ` [igt-dev] [PATCH 2/2] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures " Hersen Wu
2023-10-01 16:28 [igt-dev] [PATCH 1/2] [i-g-t] tests/kms_cursor_crc: Fix tests be skipped " Hersen Wu
2023-10-01 16:28 ` [igt-dev] [PATCH 2/2] [i-g-t] tests/kms_cursor_crc: Fix test intermittent failures " Hersen Wu
2023-10-02  8:01   ` Juha-Pekka Heikkila

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox