All of lore.kernel.org
 help / color / mirror / Atom feed
From: venkata.sai.patnana@intel.com
To: igt-dev@lists.freedesktop.org
Cc: "Juha-Pekka Heikkilä" <juha-pekka.heikkila@intel.com>
Subject: [igt-dev] [PATCH i-g-t 16/17] tests/kms_invalid_dotclock: Modify the test for bigjoiner
Date: Fri, 11 Jun 2021 10:50:04 +0530	[thread overview]
Message-ID: <20210611052005.303-16-venkata.sai.patnana@intel.com> (raw)
In-Reply-To: <20210611052005.303-1-venkata.sai.patnana@intel.com>

From: Ankit Nautiyal <ankit.k.nautiyal@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@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
---
 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..bd822fe760 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)) {
+		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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2021-06-11  5:31 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  5:19 [igt-dev] [PATCH i-g-t 01/17] tests/kms_dither: New IGT to validate crtc Dithering venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 02/17] tests/kms_dither: Validate dither after CC blocks venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 03/17] tests/device_reset: Unload snd driver before i915 unbind venkata.sai.patnana
2021-06-11 15:49   ` Kai Vehmanen
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 04/17] tests/core_hotunplug: " venkata.sai.patnana
2021-06-11 15:50   ` Kai Vehmanen
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 05/17] tests/kms_force_connector_basic: Skip prune stale mode venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 06/17] tests/kms: Create buffer object from LMEM for discrete venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 07/17] tests/kms_addfb_basic: Add invalid buffer object test " venkata.sai.patnana
2021-06-11 11:40   ` Petri Latvala
2021-06-11 11:49   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11 12:09     ` Petri Latvala
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 08/17] tests/kms_dp_dsc: Read the debugfs only once venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 09/17] tests/kms_big_fb: Add max HW stride length tests venkata.sai.patnana
2021-06-15  6:00   ` Shankar, Uma
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 10/17] tests/kms_big_fb: Add max hw stride lenght async flip test venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 11/17] tests/kms_big_fb: Optimize setup_fb function venkata.sai.patnana
2021-06-11  9:59   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11 11:32     ` Karthik B S
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 12/17] tests/kms_dp_dsc: Add a subtest to force DSC output BPP venkata.sai.patnana
2021-06-15 15:25   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 13/17] lib: Add helper functions to read/write dsc debugfs venkata.sai.patnana
2021-06-15  9:13   ` Petri Latvala
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 14/17] tests/kms_dp_dsc: Assign all related data members together venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 15/17] tests/kms_dp_dsc: Use helper functions to read/write dsc debugfs venkata.sai.patnana
2021-06-15  9:15   ` Petri Latvala
2021-06-15 15:25   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11  5:20 ` venkata.sai.patnana [this message]
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 17/17] tests/kms_cdclk : Add test to validate cdclk crawling venkata.sai.patnana
2021-06-11  9:59   ` venkata.sai.patnana
2021-06-11 11:49     ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11 14:11       ` [igt-dev] [PATCH i-g-t v3 " venkata.sai.patnana
2021-06-11  6:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering Patchwork
2021-06-11  9:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-11 12:17   ` Petri Latvala
2021-06-11 10:56 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev3) Patchwork
2021-06-11 12:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-06-11 13:01 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev5) Patchwork
2021-06-11 15:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-11 15:23 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev6) Patchwork
2021-06-15  5:54 ` [igt-dev] [PATCH i-g-t 01/17] tests/kms_dither: New IGT to validate crtc Dithering Shankar, Uma
2021-06-15  5:58   ` Modem, Bhanuprakash
2021-06-15  6:11     ` Shankar, Uma
2021-06-15  9:04       ` Jani Nikula
2021-06-15 16:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev8) Patchwork
2021-06-16  0:10 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20210611052005.303-16-venkata.sai.patnana@intel.com \
    --to=venkata.sai.patnana@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juha-pekka.heikkila@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.