All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 15/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_get_slice_count()
Date: Fri,  6 Oct 2023 16:37:23 +0300	[thread overview]
Message-ID: <20231006133727.1822579-16-imre.deak@intel.com> (raw)
In-Reply-To: <20231006133727.1822579-1-imre.deak@intel.com>

Use the connector's DSC DPCD capabilities in
intel_dp_dsc_get_slice_count().

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c     | 12 ++++++------
 drivers/gpu/drm/i915/display/intel_dp.h     |  2 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 846a25a85d6b6..7449ff145a842 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -823,11 +823,11 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct drm_i915_private *i915,
 	return bits_per_pixel;
 }
 
-u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp,
+u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
 				int mode_clock, int mode_hdisplay,
 				bool bigjoiner)
 {
-	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
+	struct drm_i915_private *i915 = to_i915(connector->base.dev);
 	u8 min_slice_count, i;
 	int max_slice_width;
 
@@ -845,7 +845,7 @@ u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp,
 	if (mode_clock >= ((i915->display.cdclk.max_cdclk_freq * 85) / 100))
 		min_slice_count = max_t(u8, min_slice_count, 2);
 
-	max_slice_width = drm_dp_dsc_sink_max_slice_width(intel_dp->dsc_dpcd);
+	max_slice_width = drm_dp_dsc_sink_max_slice_width(connector->dp.dsc_dpcd);
 	if (max_slice_width < DP_DSC_MIN_SLICE_WIDTH_VALUE) {
 		drm_dbg_kms(&i915->drm,
 			    "Unsupported slice width %d by DP DSC Sink device\n",
@@ -862,7 +862,7 @@ u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp,
 		u8 test_slice_count = valid_dsc_slicecount[i] << bigjoiner;
 
 		if (test_slice_count >
-		    drm_dp_dsc_sink_max_slice_count(intel_dp->dsc_dpcd, false))
+		    drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd, false))
 			break;
 
 		/* big joiner needs small joiner to be enabled */
@@ -1238,7 +1238,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
 								    output_format,
 								    pipe_bpp, 64);
 			dsc_slice_count =
-				intel_dp_dsc_get_slice_count(intel_dp,
+				intel_dp_dsc_get_slice_count(connector,
 							     target_clock,
 							     mode->hdisplay,
 							     bigjoiner);
@@ -2161,7 +2161,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
 		u8 dsc_dp_slice_count;
 
 		dsc_dp_slice_count =
-			intel_dp_dsc_get_slice_count(intel_dp,
+			intel_dp_dsc_get_slice_count(connector,
 						     adjusted_mode->crtc_clock,
 						     adjusted_mode->crtc_hdisplay,
 						     pipe_config->bigjoiner_pipes);
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index af87aa2a5ed67..51edb587e4d24 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -125,7 +125,7 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct drm_i915_private *i915,
 					enum intel_output_format output_format,
 					u32 pipe_bpp,
 					u32 timeslots);
-u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp,
+u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
 				int mode_clock, int mode_hdisplay,
 				bool bigjoiner);
 bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 303734ab7ef4e..115d4d8870b03 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1014,7 +1014,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
 								    INTEL_OUTPUT_FORMAT_RGB,
 								    pipe_bpp, 64);
 			dsc_slice_count =
-				intel_dp_dsc_get_slice_count(intel_dp,
+				intel_dp_dsc_get_slice_count(intel_connector,
 							     target_clock,
 							     mode->hdisplay,
 							     bigjoiner);
-- 
2.39.2


  parent reply	other threads:[~2023-10-06 13:37 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 13:37 [Intel-gfx] [PATCH 00/19] drm/i915: Store DSC DPCD capabilities in the connector Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 01/19] drm/i915/dp: Sanitize DPCD revision check in intel_dp_get_dsc_sink_cap() Imre Deak
2023-10-06 14:59   ` Lisovskiy, Stanislav
2023-10-10 10:14     ` Imre Deak
2023-10-09 14:48   ` Ville Syrjälä
2023-10-10  9:20     ` Imre Deak
2023-10-10 11:25   ` [Intel-gfx] [PATCH v2 " Imre Deak
2023-10-11 17:16     ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 02/19] drm/i915/dp: Store DSC DPCD capabilities in the connector Imre Deak
2023-10-09 11:17   ` Lisovskiy, Stanislav
2023-10-10 11:25   ` [Intel-gfx] [PATCH v2 " Imre Deak
2023-10-11 17:16     ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 03/19] drm/i915/dp_mst: Set connector DSC capabilities and decompression AUX Imre Deak
2023-10-09 13:51   ` Lisovskiy, Stanislav
2023-10-10 11:25   ` [Intel-gfx] [PATCH v2 " Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 04/19] drm/i915/dp: Use i915/intel connector local variables in i915_dsc_fec_support_show() Imre Deak
2023-10-09 13:58   ` Lisovskiy, Stanislav
2023-10-06 13:37 ` [Intel-gfx] [PATCH 05/19] drm/i915/dp: Use connector DSC DPCD " Imre Deak
2023-10-09 14:04   ` Lisovskiy, Stanislav
2023-10-06 13:37 ` [Intel-gfx] [PATCH 06/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_compute_max_bpp() Imre Deak
2023-10-09 20:16   ` Lisovskiy, Stanislav
2023-10-06 13:37 ` [Intel-gfx] [PATCH 07/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_supports_fec() Imre Deak
2023-10-09 20:17   ` Lisovskiy, Stanislav
2023-10-06 13:37 ` [Intel-gfx] [PATCH 08/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_supports_dsc() Imre Deak
2023-10-09 20:18   ` Lisovskiy, Stanislav
2023-10-06 13:37 ` [Intel-gfx] [PATCH 09/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_max_sink_compressed_bppx16() Imre Deak
2023-10-09 20:19   ` Lisovskiy, Stanislav
2023-10-06 13:37 ` [Intel-gfx] [PATCH 10/19] drm/i915/dp: Pass connector DSC DPCD to drm_dp_dsc_sink_supported_input_bpcs() Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 11/19] drm/i915/dp: Pass only the required i915 to intel_dp_source_dsc_version_minor() Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 12/19] drm/i915/dp: Pass only the required DSC DPCD to intel_dp_sink_dsc_version_minor() Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 13/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_compute_params() Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 14/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_supports_format() Imre Deak
2023-10-06 13:37 ` Imre Deak [this message]
2023-10-06 13:37 ` [Intel-gfx] [PATCH 16/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_mode_valid() Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 17/19] drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_compute_config() Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 18/19] drm/i915/dp_mst: Use connector DSC DPCD in intel_dp_mst_mode_valid_ctx() Imre Deak
2023-10-06 13:37 ` [Intel-gfx] [PATCH 19/19] drm/i915/dp: Remove unused DSC caps from intel_dp Imre Deak
2023-10-09 14:05   ` Lisovskiy, Stanislav
2023-10-10 11:25   ` [Intel-gfx] [PATCH v2 " Imre Deak
2023-10-11 17:16     ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-10-06 17:56 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Store DSC DPCD capabilities in the connector Patchwork
2023-10-06 18:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-10-07  7:23 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-10 16:17 ` [Intel-gfx] [PATCH 00/19] " Ville Syrjälä
2023-10-10 21:50 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Store DSC DPCD capabilities in the connector (rev5) Patchwork
2023-10-10 22:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-10-11 10:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-13  5:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Store DSC DPCD capabilities in the connector (rev9) Patchwork
2023-10-13  5:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-10-14  5:20 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-16 14:15   ` Imre Deak

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=20231006133727.1822579-16-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@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.