[igt-dev] [PATCH i-g-t v2 4/5] tests/kms_invalid_dotclock: Modify the test for bigjoiner
Navare, Manasi
manasi.d.navare at intel.com
Mon Jun 28 22:46:56 UTC 2021
On Fri, Jun 25, 2021 at 09:20:18PM +0530, venkata.sai.patnana at intel.com wrote:
> From: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
>
> 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 at intel.com>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila at intel.com>
> Signed-off-by: Patnana Venkata Sai <venkata.sai.patnana at intel.com>
This looks good now with the fix
Reviewed-by: Manasi Navare <manasi.d.navare at intel.com>
Manasi
> ---
> tests/kms_invalid_dotclock.c | 34 ++++++++++++++++++++++++++++++++--
> 1 file changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_invalid_dotclock.c b/tests/kms_invalid_dotclock.c
> index 402629ab09..451a922f6c 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,
> LOCAL_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);
>
> --
> 2.25.1
>
More information about the igt-dev
mailing list