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>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>
Subject: [PATCH i-g-t v7 4/5] tests/kms_plane_scaling: Find display mode fitting in BW for rotations
Date: Thu, 18 Jul 2024 19:35:45 +0530 [thread overview]
Message-ID: <20240718140546.676903-5-ramanaidu.naladala@intel.com> (raw)
In-Reply-To: <20240718140546.676903-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 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.
Example for failure:
[drm:intel_compute_min_cdclk [xe]] required cdclk (1066500 kHz) exceeds max (652800 kHz)
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: Update check_scaling_pipe_plane_rot to handle
scaling mode failure by trying next lower mode
v6: Update commit subject/message and add driver return value
in igt_debug and igt_skip print (kamil)
v7: Update message string to single line (Ankit)
Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
tests/kms_plane_scaling.c | 93 +++++++++++++++++++++------------------
1 file changed, 51 insertions(+), 42 deletions(-)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index af255aa7c..90bfb0047 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -582,53 +582,62 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,
int w, h;
int width, height;
- mode = igt_output_get_mode(output);
- if (is_clip_clamp == true) {
- width = mode->hdisplay + 100;
- height = mode->vdisplay + 100;
- } else {
- width = get_width(mode, sf_plane);
- height = get_height(mode, sf_plane);
- }
-
- if (is_upscale) {
- w = width;
- h = height;
- } else {
- w = mode->hdisplay;
- h = mode->vdisplay;
- }
-
- /*
- * guarantee even value width/height to avoid fractional
- * uv component in chroma subsampling for yuv 4:2:0 formats
- * */
- w = ALIGN(w, 2);
- h = ALIGN(h, 2);
-
- igt_create_fb(display->drm_fd, w, h, pixel_format, modifier, &d->fb[0]);
-
- igt_plane_set_fb(plane, &d->fb[0]);
- igt_fb_set_position(&d->fb[0], plane, 0, 0);
- igt_fb_set_size(&d->fb[0], plane, w, h);
- igt_plane_set_position(plane, 0, 0);
+ for_each_connector_mode(output) {
+ mode = &output->config.connector->modes[j__];
+ igt_debug("Trying mode %dx%d\n",
+ mode->hdisplay, mode->vdisplay);
- if (is_upscale)
- igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
- else
- igt_plane_set_size(plane, width, height);
+ if (is_clip_clamp == true) {
+ width = mode->hdisplay + 100;
+ height = mode->vdisplay + 100;
+ } else {
+ width = get_width(mode, sf_plane);
+ height = get_height(mode, sf_plane);
+ }
- if (rot != IGT_ROTATION_0)
- igt_plane_set_rotation(plane, rot);
- commit_ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
+ if (is_upscale) {
+ w = width;
+ h = height;
+ } else {
+ w = mode->hdisplay;
+ h = mode->vdisplay;
+ }
- igt_plane_set_fb(plane, NULL);
- igt_plane_set_position(plane, 0, 0);
- cleanup_fbs(d);
+ /*
+ * guarantee even value width/height to avoid fractional
+ * uv component in chroma subsampling for yuv 4:2:0 formats
+ */
+ w = ALIGN(w, 2);
+ h = ALIGN(h, 2);
+
+ igt_create_fb(display->drm_fd, w, h, pixel_format, modifier, &d->fb[0]);
+
+ igt_plane_set_fb(plane, &d->fb[0]);
+ igt_fb_set_position(&d->fb[0], plane, 0, 0);
+ igt_fb_set_size(&d->fb[0], plane, w, h);
+ igt_plane_set_position(plane, 0, 0);
+
+ if (is_upscale)
+ igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
+ else
+ igt_plane_set_size(plane, width, height);
+
+ if (rot != IGT_ROTATION_0)
+ igt_plane_set_rotation(plane, rot);
+ commit_ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
+ if (commit_ret == -ERANGE || commit_ret == -EINVAL)
+ igt_debug("Unsupported scaling factor with fb size %dx%d with return value %s\n",
+ w, h, (commit_ret == -EINVAL) ? "-EINVAL" : "-ERANGE");
+ igt_plane_set_fb(plane, NULL);
+ igt_plane_set_position(plane, 0, 0);
+ cleanup_fbs(d);
+ if (commit_ret == 0)
+ break;
+ }
igt_skip_on_f(commit_ret == -ERANGE || commit_ret == -EINVAL,
- "Unsupported scaling factor with fb size %dx%d\n",
- w, h);
+ "Unsupported scaling operation in driver with return value %s\n",
+ (commit_ret == -EINVAL) ? "-EINVAL" : "-ERANGE");
igt_assert_eq(commit_ret, 0);
}
--
2.43.0
next prev parent reply other threads:[~2024-07-18 14:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 14:05 [PATCH i-g-t v7 0/5] tests/kms_plane_scaling: Improvise the scaling BW issues Naladala Ramanaidu
2024-07-18 14:05 ` [PATCH i-g-t v7 1/5] tests/kms_plane_scaling: Update the single plane scaling function arguments Naladala Ramanaidu
2024-07-18 14:22 ` Nautiyal, Ankit K
2024-07-18 14:05 ` [PATCH i-g-t v7 2/5] tests/kms_plane_scaling: Update the multi " Naladala Ramanaidu
2024-07-18 14:05 ` [PATCH i-g-t v7 3/5] tests/kms_plane_scaling: Find display mode fitting in BW Naladala Ramanaidu
2024-07-18 14:05 ` Naladala Ramanaidu [this message]
2024-07-18 14:05 ` [PATCH i-g-t v7 5/5] HAX patch do not merge Naladala Ramanaidu
2024-07-18 14:24 ` [PATCH i-g-t v7 0/5] tests/kms_plane_scaling: Improvise the scaling BW issues Nautiyal, Ankit K
2024-07-18 14:42 ` ✗ GitLab.Pipeline: warning for tests/kms_plane_scaling: Improvise the scaling BW issues. (rev7) Patchwork
2024-07-18 15:04 ` ✗ CI.xeBAT: failure " Patchwork
2024-07-18 20:00 ` ✗ CI.xeBAT: failure for tests/kms_plane_scaling: Improvise the scaling BW issues. (rev8) Patchwork
2024-07-18 21:06 ` ✗ CI.xeFULL: failure for tests/kms_plane_scaling: Improvise the scaling BW issues. (rev7) Patchwork
2024-07-19 2:16 ` ✗ CI.xeFULL: failure for tests/kms_plane_scaling: Improvise the scaling BW issues. (rev8) Patchwork
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=20240718140546.676903-5-ramanaidu.naladala@intel.com \
--to=ramanaidu.naladala@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--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