[i-g-t v2 25/27] tests/i915/kms: Add support to move the ctx creation logic to lib

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Jan 24 07:35:09 UTC 2023


As ctx creation logic moved to lib, fix kms tests to support the
updated logic.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/i915/kms_draw_crc.c             | 12 ++++++------
 tests/i915/kms_frontbuffer_tracking.c | 12 ++++++------
 tests/i915/kms_psr_stress_test.c      |  6 +++---
 tools/intel_residency.c               |  2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/tests/i915/kms_draw_crc.c b/tests/i915/kms_draw_crc.c
index c2ac4721..b278aab7 100644
--- a/tests/i915/kms_draw_crc.c
+++ b/tests/i915/kms_draw_crc.c
@@ -115,23 +115,23 @@ static void get_method_crc(enum igt_draw_method method, uint32_t drm_format,
 		      drm_format, modifier, &fb);
 	igt_plane_set_fb(primary, &fb);
 
-	igt_draw_rect_fb(drm_fd, bops, 0, &fb, method,
+	igt_draw_rect_fb(drm_fd, bops, &fb, method,
 			 0, 0, fb.width, fb.height,
 			 get_color(drm_format, 0, 0, 1));
 
-	igt_draw_rect_fb(drm_fd, bops, 0, &fb, method,
+	igt_draw_rect_fb(drm_fd, bops, &fb, method,
 			 fb.width / 4, fb.height / 4,
 			 fb.width / 2, fb.height / 2,
 			 get_color(drm_format, 0, 1, 0));
-	igt_draw_rect_fb(drm_fd, bops, 0, &fb, method,
+	igt_draw_rect_fb(drm_fd, bops, &fb, method,
 			 fb.width / 8, fb.height / 8,
 			 fb.width / 4, fb.height / 4,
 			 get_color(drm_format, 1, 0, 0));
-	igt_draw_rect_fb(drm_fd, bops, 0, &fb, method,
+	igt_draw_rect_fb(drm_fd, bops, &fb, method,
 			 fb.width / 2, fb.height / 2,
 			 fb.width / 3, fb.height / 3,
 			 get_color(drm_format, 1, 0, 1));
-	igt_draw_rect_fb(drm_fd, bops, 0, &fb, method, 1, 1, 15, 15,
+	igt_draw_rect_fb(drm_fd, bops, &fb, method, 1, 1, 15, 15,
 			 get_color(drm_format, 0, 1, 1));
 
 	rc = igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
@@ -196,7 +196,7 @@ static void fill_fb_subtest(void)
 
 	igt_plane_set_fb(primary, &fb);
 
-	igt_draw_rect_fb(drm_fd, bops, 0, &fb,
+	igt_draw_rect_fb(drm_fd, bops, &fb,
 			 gem_has_mappable_ggtt(drm_fd) ? IGT_DRAW_MMAP_GTT :
 							 IGT_DRAW_MMAP_WC,
 			 0, 0, fb.width, fb.height, 0xFF);
diff --git a/tests/i915/kms_frontbuffer_tracking.c b/tests/i915/kms_frontbuffer_tracking.c
index 5b47999e..81123687 100644
--- a/tests/i915/kms_frontbuffer_tracking.c
+++ b/tests/i915/kms_frontbuffer_tracking.c
@@ -1127,7 +1127,7 @@ static void draw_rect(struct draw_pattern_info *pattern, struct fb_region *fb,
 {
 	struct rect rect = pattern->get_rect(fb, r);
 
-	igt_draw_rect_fb(drm.fd, drm.bops, 0, fb->fb, method,
+	igt_draw_rect_fb(drm.fd, drm.bops, fb->fb, method,
 			 fb->x + rect.x, fb->y + rect.y,
 			 rect.w, rect.h, rect.color);
 
@@ -1153,7 +1153,7 @@ static void fill_fb_region(struct fb_region *region, enum color ecolor)
 {
 	uint32_t color = pick_color(region->fb, ecolor);
 
-	igt_draw_rect_fb(drm.fd, drm.bops, 0, region->fb, IGT_DRAW_BLT,
+	igt_draw_rect_fb(drm.fd, drm.bops, region->fb, IGT_DRAW_BLT,
 			 region->x, region->y, region->w, region->h,
 			 color);
 }
@@ -1188,7 +1188,7 @@ static bool disable_features(const struct test_mode *t)
 static void *busy_thread_func(void *data)
 {
 	while (!busy_thread.stop)
-		igt_draw_rect(drm.fd, drm.bops, 0, busy_thread.handle,
+		igt_draw_rect(drm.fd, drm.bops, busy_thread.handle,
 			      busy_thread.size, busy_thread.stride,
 			      busy_thread.tiling, IGT_DRAW_BLT, 0, 0,
 			      busy_thread.width, busy_thread.height,
@@ -2701,14 +2701,14 @@ static void scaledprimary_subtest(const struct test_mode *t)
 		  t->tiling, t->plane, &new_fb);
 	fill_fb(&new_fb, COLOR_BLUE);
 
-	igt_draw_rect_fb(drm.fd, drm.bops, 0, &new_fb, t->method,
+	igt_draw_rect_fb(drm.fd, drm.bops, &new_fb, t->method,
 			 reg->x, reg->y, reg->w / 2, reg->h / 2,
 			 pick_color(&new_fb, COLOR_GREEN));
-	igt_draw_rect_fb(drm.fd, drm.bops, 0, &new_fb, t->method,
+	igt_draw_rect_fb(drm.fd, drm.bops, &new_fb, t->method,
 			 reg->x + reg->w / 2, reg->y + reg->h / 2,
 			 reg->w / 2, reg->h / 2,
 			 pick_color(&new_fb, COLOR_RED));
-	igt_draw_rect_fb(drm.fd, drm.bops, 0, &new_fb, t->method,
+	igt_draw_rect_fb(drm.fd, drm.bops, &new_fb, t->method,
 			 reg->x + reg->w / 2, reg->y + reg->h / 2,
 			 reg->w / 4, reg->h / 4,
 			 pick_color(&new_fb, COLOR_MAGENTA));
diff --git a/tests/i915/kms_psr_stress_test.c b/tests/i915/kms_psr_stress_test.c
index daac41d4..11e81061 100644
--- a/tests/i915/kms_psr_stress_test.c
+++ b/tests/i915/kms_psr_stress_test.c
@@ -105,7 +105,7 @@ static void primary_draw(data_t *data, struct igt_fb *fb, uint8_t i)
 		cl.g = 0xff;
 	}
 
-	igt_draw_rect_fb(data->drm_fd, data->bops, 0, fb, DRAW_METHOD, x, y,
+	igt_draw_rect_fb(data->drm_fd, data->bops, fb, DRAW_METHOD, x, y,
 			 w, h, cl.val);
 }
 
@@ -130,7 +130,7 @@ static void overlay_draw(data_t *data, struct igt_fb *fb, uint8_t i)
 		cl.g = cl.b = 0x0;
 	}
 
-	igt_draw_rect_fb(data->drm_fd, data->bops, 0, fb, DRAW_METHOD, x, y,
+	igt_draw_rect_fb(data->drm_fd, data->bops, fb, DRAW_METHOD, x, y,
 			 w, h, cl.val);
 }
 
@@ -374,4 +374,4 @@ igt_main
 		close(data.debugfs_fd);
 		close(data.drm_fd);
 	}
-}
\ No newline at end of file
+}
diff --git a/tools/intel_residency.c b/tools/intel_residency.c
index 0932e362..68b000bc 100644
--- a/tools/intel_residency.c
+++ b/tools/intel_residency.c
@@ -236,7 +236,7 @@ static void draw_rect(struct igt_fb *fb, enum igt_draw_method method,
 		igt_assert(false);
 	}
 
-	igt_draw_rect_fb(drm.fd, drm.bops, 0, fb, method, clip.x1, clip.y1,
+	igt_draw_rect_fb(drm.fd, drm.bops, fb, method, clip.x1, clip.y1,
 			 clip.x2 - clip.x1, clip.y2 - clip.y1, color);
 
 	if (method == IGT_DRAW_MMAP_WC) {
-- 
2.39.0



More information about the Intel-gfx-trybot mailing list