[igt-dev] [PATCH 2/2] tests/kms_color: Skip if current & requested BPC doesn't match
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Mon May 23 10:18:07 UTC 2022
Due to the limitaion of port clock values supported for HDMI, i915
may downgrade the requested bpc for a given mode.
This patch will skip the subtest if the requested bpc doesn't match
with crtc's current bpc.
Cc: Swati Sharma <swati2.sharma at intel.com>
CC: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_color.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 93957f50..d9ec0306 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -635,6 +635,20 @@ static void test_pipe_limited_range_ctm(data_t *data,
}
#endif
+static bool i915_clock_constraint(int fd, igt_output_t *output)
+{
+ drmModeConnector *connector = output->config.connector;
+
+ if (!is_i915_device(fd))
+ return false;
+
+ if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+ connector->connector_type == DRM_MODE_CONNECTOR_HDMIB)
+ return true;
+
+ return false;
+}
+
static void
prep_pipe(data_t *data, enum pipe p)
{
@@ -900,7 +914,13 @@ run_tests_for_pipe(data_t *data, enum pipe p)
if (!igt_check_output_bpc_equal(data->drm_fd, p, output->name, 10)) {
igt_output_set_prop_value(output, IGT_CONNECTOR_MAX_BPC, max_bpc);
- igt_fail_on_f(true, "Failed to set max_bpc as: 10\n");
+
+ igt_require_f(!i915_clock_constraint(data->drm_fd, output),
+ "%s won't support 10 bpc, due to the HDMI clock constraint.\n",
+ output->name);
+
+ igt_fail_on_f(true, "%s: Failed to set max_bpc as: 10\n",
+ output->name);
}
igt_dynamic_f("gamma-%s", output->name) {
--
2.35.1
More information about the igt-dev
mailing list