All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Subject: [PATCH v2 01/12] drm/i915/dp_mst: Use the correct connector while computing the link BPP limit on MST
Date: Mon, 28 Apr 2025 16:31:12 +0300	[thread overview]
Message-ID: <20250428133135.3396080-2-imre.deak@intel.com> (raw)
In-Reply-To: <20250428133135.3396080-1-imre.deak@intel.com>

Atm, on an MST link in DSC mode
intel_dp_compute_config_link_bpp_limits() calculates the maximum link
bpp limit using the MST root connector's DSC capabilities. That's not
correct in general: the decompression could be performed by a branch
device downstream of the root branch device or the sink itself.

Fix the above by passing to intel_dp_compute_config_link_bpp_limits()
the actual connector being modeset, containing the correct DSC
capabilities.

Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Fixes: 1c5b72daff46 ("drm/i915/dp: Set the DSC link limits in intel_dp_compute_config_link_bpp_limits")
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c     | 7 ++++---
 drivers/gpu/drm/i915/display/intel_dp.h     | 1 +
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 +++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 607aea1bf6fa2..d63aea7ee9c80 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2523,6 +2523,7 @@ intel_dp_dsc_compute_pipe_bpp_limits(struct intel_dp *intel_dp,
 
 bool
 intel_dp_compute_config_limits(struct intel_dp *intel_dp,
+			       struct intel_connector *connector,
 			       struct intel_crtc_state *crtc_state,
 			       bool respect_downstream_limits,
 			       bool dsc,
@@ -2576,7 +2577,7 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
 	intel_dp_test_compute_config(intel_dp, crtc_state, limits);
 
 	return intel_dp_compute_config_link_bpp_limits(intel_dp,
-						       intel_dp->attached_connector,
+						       connector,
 						       crtc_state,
 						       dsc,
 						       limits);
@@ -2637,7 +2638,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
 	joiner_needs_dsc = intel_dp_joiner_needs_dsc(display, num_joined_pipes);
 
 	dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
-		     !intel_dp_compute_config_limits(intel_dp, pipe_config,
+		     !intel_dp_compute_config_limits(intel_dp, connector, pipe_config,
 						     respect_downstream_limits,
 						     false,
 						     &limits);
@@ -2671,7 +2672,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
 			    str_yes_no(ret), str_yes_no(joiner_needs_dsc),
 			    str_yes_no(intel_dp->force_dsc_en));
 
-		if (!intel_dp_compute_config_limits(intel_dp, pipe_config,
+		if (!intel_dp_compute_config_limits(intel_dp, connector, pipe_config,
 						    respect_downstream_limits,
 						    true,
 						    &limits))
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index 9189db4c25946..98f90955fdb1d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -194,6 +194,7 @@ void intel_dp_wait_source_oui(struct intel_dp *intel_dp);
 int intel_dp_output_bpp(enum intel_output_format output_format, int bpp);
 
 bool intel_dp_compute_config_limits(struct intel_dp *intel_dp,
+				    struct intel_connector *connector,
 				    struct intel_crtc_state *crtc_state,
 				    bool respect_downstream_limits,
 				    bool dsc,
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index d19ef1fef452b..49b836cd8816c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -621,12 +621,13 @@ adjust_limits_for_dsc_hblank_expansion_quirk(struct intel_dp *intel_dp,
 
 static bool
 mst_stream_compute_config_limits(struct intel_dp *intel_dp,
-				 const struct intel_connector *connector,
+				 struct intel_connector *connector,
 				 struct intel_crtc_state *crtc_state,
 				 bool dsc,
 				 struct link_config_limits *limits)
 {
-	if (!intel_dp_compute_config_limits(intel_dp, crtc_state, false, dsc,
+	if (!intel_dp_compute_config_limits(intel_dp, connector,
+					    crtc_state, false, dsc,
 					    limits))
 		return false;
 
-- 
2.44.2


  reply	other threads:[~2025-04-28 13:31 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-28 13:31 [PATCH v2 00/12] drm/i915/dp_mst: Add support for fractional link bpps Imre Deak
2025-04-28 13:31 ` Imre Deak [this message]
2025-05-06  8:45   ` [PATCH v2 01/12] drm/i915/dp_mst: Use the correct connector while computing the link BPP limit on MST Nautiyal, Ankit K
2025-05-06  9:39   ` Luca Coelho
2025-04-28 13:31 ` [PATCH v2 02/12] drm/i915/dp_mst: Simplify handling the single-bpp case during state computation Imre Deak
2025-05-06  9:51   ` Nautiyal, Ankit K
2025-05-06 10:00     ` Imre Deak
2025-05-06 12:32       ` Nautiyal, Ankit K
2025-05-06  9:53   ` Luca Coelho
2025-04-28 13:31 ` [PATCH v2 03/12] drm/i915/dp_mst: Validate compressed bpp vs. platform restrictions Imre Deak
2025-05-06  9:54   ` Nautiyal, Ankit K
2025-05-06 10:03   ` Luca Coelho
2025-04-28 13:31 ` [PATCH v2 04/12] drm/i915/dp_mst: Update the total link slot count early Imre Deak
2025-05-06  9:55   ` Nautiyal, Ankit K
2025-05-06 10:07   ` Luca Coelho
2025-04-28 13:31 ` [PATCH v2 05/12] drm/i915/dp_mst: Check BW limit on the local MST link early Imre Deak
2025-05-06 10:06   ` Nautiyal, Ankit K
2025-04-28 13:31 ` [PATCH v2 06/12] drm/i915/dp_mst: Simplify computing the min/max compressed bpp limits Imre Deak
2025-05-06 10:11   ` Luca Coelho
2025-05-06 10:16   ` Nautiyal, Ankit K
2025-04-28 13:31 ` [PATCH v2 07/12] drm/i915/dp: Limit max link bpp properly to a fractional value on SST Imre Deak
2025-05-06 10:27   ` Luca Coelho
2025-05-06 12:34   ` Nautiyal, Ankit K
2025-04-28 13:31 ` [PATCH v2 08/12] drm/i915/dp_mst: Add support for fractional compressed link bpps on MST Imre Deak
2025-05-06 13:02   ` Nautiyal, Ankit K
2025-04-28 13:31 ` [PATCH v2 09/12] drm/i915/display: Factor out intel_display_{min, max}_pipe_bpp() Imre Deak
2025-05-06 13:07   ` Nautiyal, Ankit K
2025-05-06 15:16     ` Imre Deak
2025-05-07  3:59       ` Nautiyal, Ankit K
2025-05-07 10:58         ` Imre Deak
2025-05-07 12:44           ` Nautiyal, Ankit K
2025-04-28 13:31 ` [PATCH v2 10/12] drm/i915/dp: Export intel_dp_dsc_min_src_compressed_bpp() Imre Deak
2025-05-06 13:16   ` Nautiyal, Ankit K
2025-04-28 13:31 ` [PATCH v2 11/12] drm/i915: Add support for forcing the link bpp on a connector Imre Deak
2025-05-07  5:37   ` Nautiyal, Ankit K
2025-05-07 12:03     ` Imre Deak
2025-05-07 12:41       ` Nautiyal, Ankit K
2025-04-28 13:31 ` [PATCH v2 12/12] drm/i915/dp_mst: Enable fractional link bpps on MST if the bpp is forced Imre Deak
2025-05-06 13:15   ` Nautiyal, Ankit K
2025-04-28 13:59 ` ✓ CI.Patch_applied: success for drm/i915/dp_mst: Add support for fractional link bpps (rev2) Patchwork
2025-04-28 13:59 ` ✗ CI.checkpatch: warning " Patchwork
2025-04-28 14:00 ` ✓ CI.KUnit: success " Patchwork
2025-04-28 14:09 ` ✓ CI.Build: " Patchwork
2025-04-28 14:11 ` ✓ CI.Hooks: " Patchwork
2025-04-28 14:12 ` ✗ CI.checksparse: warning " Patchwork
2025-04-28 17:03 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-28 17:21 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2025-04-28 18:00 ` ✗ i915.CI.BAT: failure " Patchwork
2025-05-07 14:09   ` Imre Deak
2025-05-08 11:46     ` Ravali, JupallyX
2025-04-28 18:01 ` Patchwork
2025-04-28 18:01 ` Patchwork
2025-04-28 18:02 ` Patchwork
2025-04-28 18:02 ` Patchwork
2025-04-28 18:03 ` Patchwork
2025-04-28 18:03 ` Patchwork
2025-04-28 18:03 ` Patchwork
2025-04-28 18:03 ` Patchwork
2025-04-28 18:04 ` Patchwork
2025-04-28 18:05 ` Patchwork
2025-04-28 18:05 ` Patchwork
2025-04-28 18:06 ` Patchwork
2025-04-28 18:06 ` Patchwork
2025-04-28 18:06 ` Patchwork
2025-05-06  8:37 ` ✓ Xe.CI.BAT: success " Patchwork
2025-05-08 14:37 ` ✗ Fi.CI.BUILD: failure for drm/i915/dp_mst: Add support for fractional link bpps (rev3) 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=20250428133135.3396080-2-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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.