From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [V5 i-g-t 5/5] tests/kms_setmode: Fix Bigjoiner checks
Date: Thu, 29 Jun 2023 20:33:24 +0530 [thread overview]
Message-ID: <20230629150324.3079878-6-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20230629150324.3079878-1-bhanuprakash.modem@intel.com>
Bigjoiner will come in the picture when the resolution > 5K or
clock > max dot-clock. Add a support to check the selected mode
clock is greater than the max dot-clock.
V2: - Limit the bigjoiner checks to intel hardware
V3: - Rebase
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_setmode.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 035bbd0b0..96db5dce3 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -41,13 +41,12 @@
/* restricted pipe count */
#define CRTC_RESTRICT_CNT 2
-#define MAX_HDISPLAY_PER_CRTC 5120
-
static int drm_fd;
static drmModeRes *drm_resources;
static int filter_test_id;
static bool dry_run;
static bool extended = false;
+static int max_dotclock;
const drmModeModeInfo mode_640_480 = {
.name = "640x480",
@@ -661,28 +660,35 @@ static void test_one_combination(const struct test_config *tconf,
pos += get_test_name_str(&crtcs[i], &test_name[pos], ARRAY_SIZE(test_name) - pos);
}
+ if (!is_intel_device(drm_fd))
+ goto test;
+
for (i = 0; i < crtc_count; i++) {
struct crtc_config *crtc = &crtcs[i];
/*
- * if mode.hdisplay > 5120, then ignore
+ * Handle BW limitations on intel hardware:
+ *
+ * if mode resolution > 5K (or) mode clock > max_dotclock,
+ * then ignore
* - last crtc in single/multi-connector config
* - consecutive crtcs in multi-connector config
*
* in multi-connector config ignore if
- * - previous crtc mode.hdisplay > 5120 and
+ * - previous crtc (mode resolution > 5K (or)
+ * mode clock > max_dotclock) and
* - current & previous crtcs are consecutive
*/
- if (((crtc->mode.hdisplay > MAX_HDISPLAY_PER_CRTC) &&
+ if ((igt_bigjoiner_possible(&crtc->mode, max_dotclock) &&
((crtc->crtc_idx >= (tconf->resources->count_crtcs - 1)) ||
((i < (crtc_count - 1)) && (abs(crtcs[i + 1].crtc_idx - crtc->crtc_idx) <= 1)))) ||
- ((i > 0) && (crtc[i - 1].mode.hdisplay > MAX_HDISPLAY_PER_CRTC) &&
+ ((i > 0) && igt_bigjoiner_possible(&crtc[i - 1].mode, max_dotclock) &&
(abs(crtc->crtc_idx - crtcs[i - 1].crtc_idx) <= 1))) {
igt_info("Combo: %s is not possible with selected mode(s).\n", test_name);
goto out;
}
}
-
+test:
igt_dynamic_f("%s", test_name)
test_crtc_config(tconf, crtcs, crtc_count);
}
@@ -955,6 +961,8 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
drm_resources = drmModeGetResources(drm_fd);
igt_require(drm_resources);
+
+ max_dotclock = igt_get_max_dotclock(drm_fd);
}
for (i = 0; i < ARRAY_SIZE(tests); i++) {
--
2.40.0
next prev parent reply other threads:[~2023-06-29 15:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 15:03 [igt-dev] [V5 i-g-t 0/5] Fix Bigjoiner checks Bhanuprakash Modem
2023-06-29 15:03 ` [igt-dev] [V5 i-g-t 1/5] tests: s/i915_pipe_output_combo_valid/intel_pipe_output_combo_valid/ Bhanuprakash Modem
2023-06-29 15:03 ` [igt-dev] [V5 i-g-t 2/5] lib/igt_kms: s/is_i915_device/is_intel_device Bhanuprakash Modem
2023-06-29 15:03 ` [igt-dev] [V5 i-g-t 3/5] tests/i915/kms_big_joiner: Fix Bigjoiner checks Bhanuprakash Modem
2023-06-29 15:03 ` [igt-dev] [V5 i-g-t 4/5] tests/kms_flip: " Bhanuprakash Modem
2023-06-29 15:03 ` Bhanuprakash Modem [this message]
2023-06-29 16:37 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix Bigjoiner checks (rev8) Patchwork
2023-06-30 4:45 ` Modem, Bhanuprakash
2023-06-30 4:49 ` Modem, Bhanuprakash
2023-06-30 8:32 ` Yedireswarapu, SaiX Nandan
2023-06-30 7:34 ` Patchwork
2023-06-30 7:38 ` Patchwork
2023-06-30 7:42 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-06-30 15:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20230629150324.3079878-6-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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