From: Sowmiya S <sowmiya.s@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: swati2.sharma@intel.com, karthik.b.s@intel.com,
Sowmiya S <sowmiya.s@intel.com>
Subject: [PATCH i-g-t v2 2/2] tests/intel/kms_pipe_stress: Clamp the source size to the FB bounds
Date: Mon, 23 Feb 2026 14:02:59 +0530 [thread overview]
Message-ID: <20260223083259.187783-3-sowmiya.s@intel.com> (raw)
In-Reply-To: <20260223083259.187783-1-sowmiya.s@intel.com>
Use min_t(int, ...) for source size calculations
to start scaling from a size guaranteed to fit in the FB.
Signed-off-by: Sowmiya S <sowmiya.s@intel.com>
---
tests/intel/kms_pipe_stress.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tests/intel/kms_pipe_stress.c b/tests/intel/kms_pipe_stress.c
index 3caef8e18..e3f6de2c4 100644
--- a/tests/intel/kms_pipe_stress.c
+++ b/tests/intel/kms_pipe_stress.c
@@ -456,11 +456,14 @@ static int pipe_stress(struct data *data, igt_output_t *output,
plane_width = cursor_width;
plane_height = cursor_height;
} else {
- universal_plane_set_fb(plane, &data->fb[pipe * MAX_PLANES + i],
- mode->hdisplay, mode->vdisplay);
+ struct igt_fb *fb = &data->fb[pipe * MAX_PLANES + i];
+ int src_width = min_t(int, mode->hdisplay, fb->width);
+ int src_height = min_t(int, mode->vdisplay, fb->height);
- plane_width = (mode->hdisplay * 3) / 4;
- plane_height = (mode->vdisplay * 3) / 4;
+ universal_plane_set_fb(plane, fb, src_width, src_height);
+
+ plane_width = (src_width * 3) / 4;
+ plane_height = (src_height * 3) / 4;
ret = try_plane_scaling(data, plane, plane_width, plane_height);
--
2.43.0
next prev parent reply other threads:[~2026-02-23 8:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 8:32 [PATCH i-g-t v2 0/2] Make pipe assignment joiner-aware Sowmiya S
2026-02-23 8:32 ` [PATCH i-g-t v2 1/2] tests/kms_pipe_stress: make " Sowmiya S
2026-02-23 8:32 ` Sowmiya S [this message]
2026-02-23 8:42 ` ✓ Xe.CI.BAT: success for Make pipe assignment joiner-aware (rev2) Patchwork
2026-02-23 9:01 ` ✓ i915.CI.BAT: " Patchwork
2026-02-23 16:39 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-23 22:29 ` ✗ Xe.CI.FULL: " 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=20260223083259.187783-3-sowmiya.s@intel.com \
--to=sowmiya.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@intel.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