Skip to content

Commit 7bca1b8

Browse files
committed
drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_get_slice_count()
Use the connector's DSC DPCD capabilities in intel_dp_dsc_get_slice_count(). Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 926b726 commit 7bca1b8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -823,11 +823,11 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct drm_i915_private *i915,
823823
return bits_per_pixel;
824824
}
825825

826-
u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp,
826+
u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
827827
int mode_clock, int mode_hdisplay,
828828
bool bigjoiner)
829829
{
830-
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
830+
struct drm_i915_private *i915 = to_i915(connector->base.dev);
831831
u8 min_slice_count, i;
832832
int max_slice_width;
833833

@@ -845,7 +845,7 @@ u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp,
845845
if (mode_clock >= ((i915->display.cdclk.max_cdclk_freq * 85) / 100))
846846
min_slice_count = max_t(u8, min_slice_count, 2);
847847

848-
max_slice_width = drm_dp_dsc_sink_max_slice_width(intel_dp->dsc_dpcd);
848+
max_slice_width = drm_dp_dsc_sink_max_slice_width(connector->dp.dsc_dpcd);
849849
if (max_slice_width < DP_DSC_MIN_SLICE_WIDTH_VALUE) {
850850
drm_dbg_kms(&i915->drm,
851851
"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,
862862
u8 test_slice_count = valid_dsc_slicecount[i] << bigjoiner;
863863

864864
if (test_slice_count >
865-
drm_dp_dsc_sink_max_slice_count(intel_dp->dsc_dpcd, false))
865+
drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd, false))
866866
break;
867867

868868
/* big joiner needs small joiner to be enabled */
@@ -1238,7 +1238,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
12381238
output_format,
12391239
pipe_bpp, 64);
12401240
dsc_slice_count =
1241-
intel_dp_dsc_get_slice_count(intel_dp,
1241+
intel_dp_dsc_get_slice_count(connector,
12421242
target_clock,
12431243
mode->hdisplay,
12441244
bigjoiner);
@@ -2161,7 +2161,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
21612161
u8 dsc_dp_slice_count;
21622162

21632163
dsc_dp_slice_count =
2164-
intel_dp_dsc_get_slice_count(intel_dp,
2164+
intel_dp_dsc_get_slice_count(connector,
21652165
adjusted_mode->crtc_clock,
21662166
adjusted_mode->crtc_hdisplay,
21672167
pipe_config->bigjoiner_pipes);

drivers/gpu/drm/i915/display/intel_dp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct drm_i915_private *i915,
125125
enum intel_output_format output_format,
126126
u32 pipe_bpp,
127127
u32 timeslots);
128-
u8 intel_dp_dsc_get_slice_count(struct intel_dp *intel_dp,
128+
u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
129129
int mode_clock, int mode_hdisplay,
130130
bool bigjoiner);
131131
bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,

drivers/gpu/drm/i915/display/intel_dp_mst.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
10141014
INTEL_OUTPUT_FORMAT_RGB,
10151015
pipe_bpp, 64);
10161016
dsc_slice_count =
1017-
intel_dp_dsc_get_slice_count(intel_dp,
1017+
intel_dp_dsc_get_slice_count(intel_connector,
10181018
target_clock,
10191019
mode->hdisplay,
10201020
bigjoiner);

0 commit comments

Comments
 (0)