Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, suraj.kandpal@intel.com
Subject: [PATCH 10/10] drm/i915/dp: Add support for 3 vdsc engines and 12 slices.
Date: Thu, 17 Oct 2024 13:53:48 +0530	[thread overview]
Message-ID: <20241017082348.3413727-11-ankit.k.nautiyal@intel.com> (raw)
In-Reply-To: <20241017082348.3413727-1-ankit.k.nautiyal@intel.com>

Certain resolutions require 12 DSC slices support along with ultrajoiner.
For such cases, the third VDSC Engine per Pipe is enabled. Each VDSC
Engine processes 1 Slice, resulting in a total of 12 VDSC Instances
(4 Pipes * 3 VDSC Instances per Pipe).
Add support for 12 DSC slices and 3 VDSC engines for such modes.

v2: Add missing check for 3 slices support only with 4 joined pipes.
(Suraj)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index ef96b9235636..91ae29d76cf5 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -110,8 +110,10 @@ static const u8 valid_dsc_bpp[] = {6, 8, 10, 12, 15};
 
 /* With Single pipe configuration, HW is capable of supporting maximum
  * of 4 slices per line.
+ * For higher resolutions where 12 slice support is required with
+ * ultrajoiner, only then each pipe can support 3 slices.
  */
-static const u8 valid_dsc_slicecount[] = {1, 2, 4};
+static const u8 valid_dsc_slicecount[] = {1, 2, 3, 4};
 
 /**
  * intel_dp_is_edp - is the given port attached to an eDP panel (either CPU or PCH)
@@ -1043,6 +1045,13 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
 	for (i = 0; i < ARRAY_SIZE(valid_dsc_slicecount); i++) {
 		u8 test_slice_count = valid_dsc_slicecount[i] * num_joined_pipes;
 
+		/*
+		 * 3 DSC Slices per pipe need 3 DSC engines,
+		 * which is supported only with Ultrajoiner.
+		 */
+		if (valid_dsc_slicecount[i] == 3 && num_joined_pipes != 4)
+			continue;
+
 		if (test_slice_count >
 		    drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd, false))
 			break;
@@ -2463,8 +2472,13 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
 	 * VDSC engine operates at 1 Pixel per clock, so if peak pixel rate
 	 * is greater than the maximum Cdclock and if slice count is even
 	 * then we need to use 2 VDSC instances.
+	 * In case of Ultrajoiner along with 12 slices we need to use 3
+	 * VDSC instances.
 	 */
-	if (pipe_config->joiner_pipes || pipe_config->dsc.slice_count > 1)
+	if (pipe_config->joiner_pipes && num_joined_pipes == 4 &&
+	    pipe_config->dsc.slice_count == 12)
+		pipe_config->dsc.dsc_split = INTEL_DSC_SPLIT_3_STREAMS;
+	else if (pipe_config->joiner_pipes || pipe_config->dsc.slice_count > 1)
 		pipe_config->dsc.dsc_split = INTEL_DSC_SPLIT_2_STREAMS;
 
 	ret = intel_dp_dsc_compute_params(connector, pipe_config);
-- 
2.45.2


  parent reply	other threads:[~2024-10-17  8:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17  8:23 [PATCH 00/10] Add support for 3 VDSC engines 12 slices Ankit Nautiyal
2024-10-17  8:23 ` [PATCH 01/10] drm/i915/display: Prepare for dsc 3 stream splitter Ankit Nautiyal
2024-10-17  8:58   ` Kandpal, Suraj
2024-10-17  8:23 ` [PATCH 02/10] drm/i915/vdsc: Use VDSC0/VDSC1 for LEFT/RIGHT VDSC engine Ankit Nautiyal
2024-10-17  9:04   ` Kandpal, Suraj
2024-10-17  8:23 ` [PATCH 03/10] drm/i915/vdsc: Add register bits for VDSC2 engine Ankit Nautiyal
2024-10-17  9:10   ` Kandpal, Suraj
2024-10-17  8:23 ` [PATCH 04/10] drm/i915/vdsc: Add support for read/write PPS for DSC3 Ankit Nautiyal
2024-10-18  2:17   ` Kandpal, Suraj
2024-10-21 12:14     ` Nautiyal, Ankit K
2024-10-17  8:23 ` [PATCH 05/10] drm/i915/dp: Add check for hdisplay divisible by slice count Ankit Nautiyal
2024-10-17  9:45   ` Kandpal, Suraj
2024-10-17  8:23 ` [PATCH 06/10] drm/i915/display: Add DSC pixel replication Ankit Nautiyal
2024-10-17  9:33   ` Kandpal, Suraj
2024-10-24 22:18   ` kernel test robot
2024-10-17  8:23 ` [PATCH 07/10] drm/i915/dp: Compute pixel replication count for DSC 12 slices case Ankit Nautiyal
2024-10-17  9:44   ` Kandpal, Suraj
2024-10-17  8:23 ` [PATCH 08/10] drm/i915/display: Account for pixel replication in pipe_src Ankit Nautiyal
2024-10-17  8:23 ` [PATCH 09/10] drm/i915/dsc: Account for Odd pixel removal Ankit Nautiyal
2024-10-17  8:23 ` Ankit Nautiyal [this message]
2024-10-17  8:42 ` ✓ CI.Patch_applied: success for Add support for 3 VDSC engines 12 slices (rev3) Patchwork
2024-10-17  8:42 ` ✓ CI.checkpatch: " Patchwork
2024-10-17  8:43 ` ✓ CI.KUnit: " Patchwork
2024-10-17  8:55 ` ✓ CI.Build: " Patchwork
2024-10-17  8:57 ` ✓ CI.Hooks: " Patchwork
2024-10-17  8:59 ` ✗ CI.checksparse: warning " Patchwork
2024-10-17  9:24 ` ✓ CI.BAT: success " Patchwork
2024-10-17 18:15 ` ✗ CI.FULL: 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=20241017082348.3413727-11-ankit.k.nautiyal@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suraj.kandpal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox