[igt-dev] [PATCH i-g-t 3/3] tests/kms_plane_scaling: remove unused parameters

Maíra Canal mcanal at igalia.com
Mon Apr 24 18:34:00 UTC 2023


Commit 1b9ca59a ("tests/kms_plane_scaling: reduce work on framebuffer
creation") changed the colored framebuffer to blank framebuffers.
Therefore, there is no need to pass the RGB colors as parameters to the
function setup_fb(), as it only creates a blank framebuffer.

Fixes: 1b9ca59a ("tests/kms_plane_scaling: reduce work on framebuffer creation")
Signed-off-by: Maíra Canal <mcanal at igalia.com>
---
 tests/kms_plane_scaling.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 7f5cb00d..19528a40 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -715,9 +715,7 @@ __test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
 	igt_assert_eq(ret, 0);
 }
 
-static void setup_fb(int fd, int width, int height,
-		     double r, double g, double b,
-		     struct igt_fb *fb)
+static void setup_fb(int fd, int width, int height, struct igt_fb *fb)
 {
 	igt_create_fb(fd, width, height,
 		      DRM_FORMAT_XRGB8888,
@@ -744,20 +742,20 @@ test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
 
 	switch (test_type) {
 	case TEST_PLANES_UPSCALE:
-		setup_fb(display->drm_fd, w1, h1, 1.0, 0.0, 0.0, &d->fb[1]);
-		setup_fb(display->drm_fd, w2, h2, 0.0, 1.0, 0.0, &d->fb[2]);
+		setup_fb(display->drm_fd, w1, h1, &d->fb[1]);
+		setup_fb(display->drm_fd, w2, h2, &d->fb[2]);
 		break;
 	case TEST_PLANES_DOWNSCALE:
-		setup_fb(display->drm_fd, mode->hdisplay, mode->vdisplay, 1.0, 0.0, 0.0, &d->fb[1]);
-		setup_fb(display->drm_fd, mode->hdisplay, mode->vdisplay, 0.0, 1.0, 0.0, &d->fb[2]);
+		setup_fb(display->drm_fd, mode->hdisplay, mode->vdisplay, &d->fb[1]);
+		setup_fb(display->drm_fd, mode->hdisplay, mode->vdisplay, &d->fb[2]);
 		break;
 	case TEST_PLANES_UPSCALE_DOWNSCALE:
-		setup_fb(display->drm_fd, w1, h1, 1.0, 0.0, 0.0, &d->fb[1]);
-		setup_fb(display->drm_fd, mode->hdisplay, mode->vdisplay, 0.0, 1.0, 0.0, &d->fb[2]);
+		setup_fb(display->drm_fd, w1, h1, &d->fb[1]);
+		setup_fb(display->drm_fd, mode->hdisplay, mode->vdisplay, &d->fb[2]);
 		break;
 	case TEST_PLANES_DOWNSCALE_UPSCALE:
-		setup_fb(display->drm_fd, mode->hdisplay, mode->vdisplay, 1.0, 0.0, 0.0, &d->fb[1]);
-		setup_fb(display->drm_fd, w2, h2, 0.0, 1.0, 0.0, &d->fb[2]);
+		setup_fb(display->drm_fd, mode->hdisplay, mode->vdisplay, &d->fb[1]);
+		setup_fb(display->drm_fd, w2, h2, &d->fb[2]);
 		break;
 	default:
 		igt_assert(0);
-- 
2.40.0



More information about the igt-dev mailing list