diff options
author | Ankit Nautiyal <ankit.k.nautiyal@intel.com> | 2021-07-19 15:08:38 +0530 |
---|---|---|
committer | Kunal Joshi <kunal1.joshi@intel.com> | 2021-07-19 16:10:17 +0530 |
commit | e93b651b955c44a6ebd53368faec1d856a8df3a1 (patch) | |
tree | 832b66a98f94ad35dbf0faddee6e62609ec734a7 | |
parent | 364b12bef8e2651c963ed3e62662f7860aa11c92 (diff) |
tests/kms_invalid_dotclock: Modify the test for bigjoiner
Currently the test assumes that the modes with clock more than the
maximum dot clock will be rejected. This fails in case of
platforms that combine multiple pipes and modes higher than the
maximum dotclock can still be supported.
This patch modifies the test to bump the clock for the given mode
by twice if bigjoiner is supported.
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
Signed-off-by: Patnana Venkata Sai <venkata.sai.patnana@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Patnana Venkata Sai <venkata.sai.patnana@intel.com>
-rw-r--r-- | tests/kms_invalid_dotclock.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/tests/kms_invalid_dotclock.c b/tests/kms_invalid_dotclock.c index f10c0c88..e02a9491 100644 --- a/tests/kms_invalid_dotclock.c +++ b/tests/kms_invalid_dotclock.c @@ -43,6 +43,25 @@ static bool has_scaling_mode_prop(data_t *data) "scaling mode", NULL, NULL, NULL); } +static bool +can_bigjoiner(data_t *data) +{ + drmModeConnector *connector = data->output->config.connector; + uint32_t devid = intel_get_drm_devid(data->drm_fd); + + /* + * GEN11 and GEN12 require DSC to support bigjoiner. + * XELPD and later GEN support uncompressed bigjoiner. + */ + if (intel_display_ver(devid) > 12) { + igt_debug("Platform supports uncompressed bigjoiner\n"); + return true; + } else if (intel_display_ver(devid) >= 11) { + return igt_is_dp_dsc_supported(data->drm_fd, connector); + } + + return false; +} static int test_output(data_t *data) @@ -70,12 +89,25 @@ test_output(data_t *data) mode = *igt_output_get_mode(output); mode.clock = data->max_dotclock + 1; + /* + * Newer platforms can support modes higher than the maximum dot clock + * by using pipe joiner, so set the mode clock twice that of maximum + * dot clock; + */ + if (can_bigjoiner(data)) { + igt_info("Platform supports bigjoiner with %s\n", + output->name); + mode.clock *= 2; + } + igt_create_fb(data->drm_fd, mode.hdisplay, mode.vdisplay, DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, &fb); + kmstest_unset_all_crtcs(data->drm_fd, data->res); + for (i = 0; i < data->res->count_crtcs; i++) { int ret; @@ -135,8 +167,6 @@ igt_simple_main data.res = drmModeGetResources(data.drm_fd); igt_assert(data.res); - kmstest_unset_all_crtcs(data.drm_fd, data.res); - data.max_dotclock = i915_max_dotclock(&data); igt_info("Max dotclock: %d kHz\n", data.max_dotclock); |