Skip to content

Commit 9212733

Browse files
committed
drm/i915/dp: Pass intel_output_format to intel_dp_dsc_sink_{min_max}_compressed_bpp()
Prepare for follow-up changes also calling intel_dp_dsc_min_sink_compressed_bpp() / intel_dp_dsc_max_sink_compressed_bpp_x16() without an intel_crtc_state. While at it remove the stale function declarations from the header file. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20251222153547.713360-9-imre.deak@intel.com
1 parent 756009d commit 9212733

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,7 +2157,7 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,
21572157

21582158
static
21592159
u16 intel_dp_dsc_max_sink_compressed_bppx16(const struct intel_connector *connector,
2160-
const struct intel_crtc_state *pipe_config,
2160+
enum intel_output_format output_format,
21612161
int bpc)
21622162
{
21632163
u16 max_bppx16 = drm_edp_dsc_sink_output_bpp(connector->dp.dsc_dpcd);
@@ -2168,43 +2168,43 @@ u16 intel_dp_dsc_max_sink_compressed_bppx16(const struct intel_connector *connec
21682168
* If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
21692169
* values as given in spec Table 2-157 DP v2.0
21702170
*/
2171-
switch (pipe_config->output_format) {
2171+
switch (output_format) {
21722172
case INTEL_OUTPUT_FORMAT_RGB:
21732173
case INTEL_OUTPUT_FORMAT_YCBCR444:
21742174
return (3 * bpc) << 4;
21752175
case INTEL_OUTPUT_FORMAT_YCBCR420:
21762176
return (3 * (bpc / 2)) << 4;
21772177
default:
2178-
MISSING_CASE(pipe_config->output_format);
2178+
MISSING_CASE(output_format);
21792179
break;
21802180
}
21812181

21822182
return 0;
21832183
}
21842184

2185-
int intel_dp_dsc_sink_min_compressed_bpp(const struct intel_crtc_state *pipe_config)
2185+
static int intel_dp_dsc_sink_min_compressed_bpp(enum intel_output_format output_format)
21862186
{
21872187
/* From Mandatory bit rate range Support Table 2-157 (DP v2.0) */
2188-
switch (pipe_config->output_format) {
2188+
switch (output_format) {
21892189
case INTEL_OUTPUT_FORMAT_RGB:
21902190
case INTEL_OUTPUT_FORMAT_YCBCR444:
21912191
return 8;
21922192
case INTEL_OUTPUT_FORMAT_YCBCR420:
21932193
return 6;
21942194
default:
2195-
MISSING_CASE(pipe_config->output_format);
2195+
MISSING_CASE(output_format);
21962196
break;
21972197
}
21982198

21992199
return 0;
22002200
}
22012201

2202-
int intel_dp_dsc_sink_max_compressed_bpp(const struct intel_connector *connector,
2203-
const struct intel_crtc_state *pipe_config,
2204-
int bpc)
2202+
static int intel_dp_dsc_sink_max_compressed_bpp(const struct intel_connector *connector,
2203+
enum intel_output_format output_format,
2204+
int bpc)
22052205
{
22062206
return intel_dp_dsc_max_sink_compressed_bppx16(connector,
2207-
pipe_config, bpc) >> 4;
2207+
output_format, bpc) >> 4;
22082208
}
22092209

22102210
int intel_dp_dsc_min_src_compressed_bpp(void)
@@ -2684,7 +2684,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector,
26842684
int joiner_max_bpp;
26852685

26862686
dsc_src_min_bpp = intel_dp_dsc_min_src_compressed_bpp();
2687-
dsc_sink_min_bpp = intel_dp_dsc_sink_min_compressed_bpp(crtc_state);
2687+
dsc_sink_min_bpp = intel_dp_dsc_sink_min_compressed_bpp(crtc_state->output_format);
26882688
dsc_min_bpp = max(dsc_src_min_bpp, dsc_sink_min_bpp);
26892689
limits->link.min_bpp_x16 = fxp_q4_from_int(dsc_min_bpp);
26902690

@@ -2698,7 +2698,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector,
26982698
adjusted_mode->hdisplay,
26992699
intel_crtc_num_joined_pipes(crtc_state));
27002700
dsc_sink_max_bpp = intel_dp_dsc_sink_max_compressed_bpp(connector,
2701-
crtc_state,
2701+
crtc_state->output_format,
27022702
limits->pipe.max_bpp / 3);
27032703
dsc_max_bpp = min(dsc_sink_max_bpp, dsc_src_max_bpp);
27042704
dsc_max_bpp = min(dsc_max_bpp, joiner_max_bpp);

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,6 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct intel_display *display,
150150
enum intel_output_format output_format,
151151
u32 pipe_bpp,
152152
u32 timeslots);
153-
int intel_dp_dsc_sink_min_compressed_bpp(const struct intel_crtc_state *pipe_config);
154-
int intel_dp_dsc_sink_max_compressed_bpp(const struct intel_connector *connector,
155-
const struct intel_crtc_state *pipe_config,
156-
int bpc);
157153
bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16);
158154
u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
159155
int mode_clock, int mode_hdisplay,

0 commit comments

Comments
 (0)