Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: Melissa Wen <mwen@igalia.com>,
	Petri Latvala <adrinael@adrinael.net>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
	Swati Sharma <swati2.sharma@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/3] tests/kms_plane_scaling: remove unused parameters
Date: Mon, 24 Apr 2023 15:34:00 -0300	[thread overview]
Message-ID: <20230424183400.465464-3-mcanal@igalia.com> (raw)
In-Reply-To: <20230424183400.465464-1-mcanal@igalia.com>

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@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

  parent reply	other threads:[~2023-04-24 18:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 18:33 [igt-dev] [PATCH i-g-t 1/3] tests/kms_plane_scaling: negative tests can return -EINVAL or -ERANGE Maíra Canal
2023-04-24 18:33 ` [igt-dev] [PATCH i-g-t 2/3] tests/kms_plane_scaling: fix variable misspelling Maíra Canal
2023-04-25  7:55   ` Kamil Konieczny
2023-04-24 18:34 ` Maíra Canal [this message]
2023-04-25  9:09   ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_plane_scaling: remove unused parameters Kamil Konieczny
2023-04-24 19:50 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_plane_scaling: negative tests can return -EINVAL or -ERANGE Patchwork
2023-04-25  0:23 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-04-25  9:00 ` [igt-dev] [PATCH i-g-t 1/3] " Kamil Konieczny

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=20230424183400.465464-3-mcanal@igalia.com \
    --to=mcanal@igalia.com \
    --cc=adrinael@adrinael.net \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=mwen@igalia.com \
    --cc=swati2.sharma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox