From: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, kunal1.joshi@intel.com,
Naladala Ramanaidu <ramanaidu.naladala@intel.com>
Subject: [PATCH i-g-t 3/5] tests/kms_plane_scaling: Improvise the planes scaling BW issues
Date: Wed, 17 Jul 2024 20:33:44 +0530 [thread overview]
Message-ID: <20240717150346.650276-4-ramanaidu.naladala@intel.com> (raw)
In-Reply-To: <20240717150346.650276-1-ramanaidu.naladala@intel.com>
Anticipating bandwidth issues, we expect many tests to fail. To
address these failures, we will switch to the next lower display
mode. Some higher display modes will be identified as insufficient
for downscaling operations on multi-plane scaling. As a solution,
we will implement a fix: when bandwidth is inadequate for current
modes, the test will automatically attempt the next lower
display mode.
v2: Fix some styling issues in the patch (Ankit)
v3: Split single plane and multi plane scaling
functions arguments in separate patch (Ankit)
v4: Split single plane and multi plane scaling
functions in separate patch (Ankit)
v5: Add return value to function __test_planes_scaling_combo,
update test_planes_scaling_combo function, and add
igt_debug prints.
Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
---
tests/kms_plane_scaling.c | 103 ++++++++++++++++++++------------------
1 file changed, 55 insertions(+), 48 deletions(-)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 8a69aacfd..385f02df9 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -857,7 +857,7 @@ find_connected_pipe(igt_display_t *display, bool second, igt_output_t **output)
return pipe;
}
-static void
+static int
__test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
enum pipe pipe, igt_output_t *output,
igt_plane_t *p1, igt_plane_t *p2,
@@ -899,9 +899,9 @@ __test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
igt_plane_set_fb(p1, NULL);
igt_plane_set_fb(p2, NULL);
- igt_skip_on_f(ret == -EINVAL || ret == -ERANGE,
- "Scaling op not supported by driver\n");
- igt_assert_eq(ret, 0);
+ if (ret == -EINVAL || ret == -ERANGE)
+ igt_debug("Scaling op not supported by driver\n");
+ return ret;
}
static void setup_fb(int fd, int width, int height, struct igt_fb *fb)
@@ -923,59 +923,66 @@ test_planes_scaling_combo(data_t *d, double sf_plane1,
drmModeModeInfo *mode;
int n_planes;
int w1, h1, w2, h2;
+ int ret;
cleanup_crtc(d);
igt_output_set_pipe(output, pipe);
- mode = igt_output_get_mode(output);
-
- w1 = get_width(mode, sf_plane1);
- h1 = get_height(mode, sf_plane1);
- w2 = get_width(mode, sf_plane2);
- h2 = get_height(mode, sf_plane2);
-
- n_planes = display->pipes[pipe].n_planes;
- igt_require(n_planes >= 2);
-
- switch (test_type) {
- case TEST_PLANES_UPSCALE:
- 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, &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, &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, &d->fb[1]);
- setup_fb(display->drm_fd, w2, h2, &d->fb[2]);
- break;
- default:
- igt_assert(0);
- }
+ for_each_connector_mode(output) {
+ mode = &output->config.connector->modes[j__];
+ igt_output_override_mode(output, mode);
+ igt_debug("Trying mode %dx%d\n",
+ mode->hdisplay, mode->vdisplay);
+ w1 = get_width(mode, sf_plane1);
+ h1 = get_height(mode, sf_plane1);
+ w2 = get_width(mode, sf_plane2);
+ h2 = get_height(mode, sf_plane2);
+
+ n_planes = display->pipes[pipe].n_planes;
+ igt_require(n_planes >= 2);
+
+ switch (test_type) {
+ case TEST_PLANES_UPSCALE:
+ 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, &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, &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, &d->fb[1]);
+ setup_fb(display->drm_fd, w2, h2, &d->fb[2]);
+ break;
+ default:
+ igt_assert(0);
+ }
- for (int k = 0; k < n_planes - 1; k += 2) {
- igt_plane_t *p1, *p2;
+ for (int k = 0; k < n_planes - 1; k += 2) {
+ igt_plane_t *p1, *p2;
- p1 = &display->pipes[pipe].planes[k];
- igt_require(p1);
- p2 = &display->pipes[pipe].planes[k+1];
- igt_require(p2);
+ p1 = &display->pipes[pipe].planes[k];
+ igt_require(p1);
+ p2 = &display->pipes[pipe].planes[k+1];
+ igt_require(p2);
- if (p1->type == DRM_PLANE_TYPE_CURSOR || p2->type == DRM_PLANE_TYPE_CURSOR)
+ if (p1->type == DRM_PLANE_TYPE_CURSOR || p2->type == DRM_PLANE_TYPE_CURSOR)
continue;
-
- __test_planes_scaling_combo(d, w1, h1, w2, h2,
- pipe, output, p1, p2,
- &d->fb[1], &d->fb[2],
- test_type);
+ ret = __test_planes_scaling_combo(d, w1, h1, w2, h2,
+ pipe, output, p1, p2,
+ &d->fb[1], &d->fb[2],
+ test_type);
+ if (ret != 0)
+ break;
+ }
+ cleanup_fbs(d);
}
-
- cleanup_fbs(d);
+ igt_skip_on_f(ret == -EINVAL || ret == -ERANGE,
+ "Scaling op not supported by driver\n");
}
static void
--
2.43.0
next prev parent reply other threads:[~2024-07-17 14:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 15:03 [PATCH i-g-t 0/5] tests/kms_plane_scaling: Improvise the scaling BW issues Naladala Ramanaidu
2024-07-17 15:03 ` [PATCH i-g-t 1/5] tests/kms_plane_scaling: Update the single plane scaling function arguments Naladala Ramanaidu
2024-07-17 15:03 ` [PATCH i-g-t 2/5] tests/kms_plane_scaling: Update the multi " Naladala Ramanaidu
2024-07-17 15:03 ` Naladala Ramanaidu [this message]
2024-07-17 15:03 ` [PATCH i-g-t 4/5] tests/kms_plane_scaling: Improvise the plane scaling BW issues Naladala Ramanaidu
2024-07-17 15:03 ` [PATCH i-g-t 5/5] HAX patch do not merge Naladala Ramanaidu
2024-07-17 16:46 ` ✗ CI.xeBAT: failure for tests/kms_plane_scaling: Improvise the scaling BW issues. (rev5) Patchwork
2024-07-17 22:49 ` ✗ CI.xeFULL: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-07-15 15:46 [PATCH i-g-t 0/5] tests/kms_plane_scaling: Improvise the scaling BW issues Naladala Ramanaidu
2024-07-15 15:46 ` [PATCH i-g-t 3/5] tests/kms_plane_scaling: Improvise the planes " Naladala Ramanaidu
2024-07-16 4:32 ` Nautiyal, Ankit K
2024-07-17 14:53 ` 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=20240717150346.650276-4-ramanaidu.naladala@intel.com \
--to=ramanaidu.naladala@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kunal1.joshi@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