@@ -2157,7 +2157,7 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,
21572157
21582158static
21592159u16 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
22102210int 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 );
0 commit comments