@@ -1636,11 +1636,10 @@ static int intel_dp_get_slice_height(int vactive)
1636
1636
return 2 ;
1637
1637
}
1638
1638
1639
- static int intel_dp_dsc_compute_params (struct intel_encoder * encoder ,
1639
+ static int intel_dp_dsc_compute_params (const struct intel_connector * connector ,
1640
1640
struct intel_crtc_state * crtc_state )
1641
1641
{
1642
- struct drm_i915_private * i915 = to_i915 (encoder -> base .dev );
1643
- struct intel_dp * intel_dp = enc_to_intel_dp (encoder );
1642
+ struct drm_i915_private * i915 = to_i915 (connector -> base .dev );
1644
1643
struct drm_dsc_config * vdsc_cfg = & crtc_state -> dsc .config ;
1645
1644
u8 line_buf_depth ;
1646
1645
int ret ;
@@ -1661,17 +1660,17 @@ static int intel_dp_dsc_compute_params(struct intel_encoder *encoder,
1661
1660
return ret ;
1662
1661
1663
1662
vdsc_cfg -> dsc_version_major =
1664
- (intel_dp -> dsc_dpcd [DP_DSC_REV - DP_DSC_SUPPORT ] &
1663
+ (connector -> dp . dsc_dpcd [DP_DSC_REV - DP_DSC_SUPPORT ] &
1665
1664
DP_DSC_MAJOR_MASK ) >> DP_DSC_MAJOR_SHIFT ;
1666
1665
vdsc_cfg -> dsc_version_minor =
1667
1666
min (intel_dp_source_dsc_version_minor (i915 ),
1668
- intel_dp_sink_dsc_version_minor (intel_dp -> dsc_dpcd ));
1667
+ intel_dp_sink_dsc_version_minor (connector -> dp . dsc_dpcd ));
1669
1668
if (vdsc_cfg -> convert_rgb )
1670
1669
vdsc_cfg -> convert_rgb =
1671
- intel_dp -> dsc_dpcd [DP_DSC_DEC_COLOR_FORMAT_CAP - DP_DSC_SUPPORT ] &
1670
+ connector -> dp . dsc_dpcd [DP_DSC_DEC_COLOR_FORMAT_CAP - DP_DSC_SUPPORT ] &
1672
1671
DP_DSC_RGB ;
1673
1672
1674
- line_buf_depth = drm_dp_dsc_sink_line_buf_depth (intel_dp -> dsc_dpcd );
1673
+ line_buf_depth = drm_dp_dsc_sink_line_buf_depth (connector -> dp . dsc_dpcd );
1675
1674
if (!line_buf_depth ) {
1676
1675
drm_dbg_kms (& i915 -> drm ,
1677
1676
"DSC Sink Line Buffer Depth invalid\n" );
@@ -1686,7 +1685,7 @@ static int intel_dp_dsc_compute_params(struct intel_encoder *encoder,
1686
1685
DSC_1_1_MAX_LINEBUF_DEPTH_BITS : line_buf_depth ;
1687
1686
1688
1687
vdsc_cfg -> block_pred_enable =
1689
- intel_dp -> dsc_dpcd [DP_DSC_BLK_PREDICTION_SUPPORT - DP_DSC_SUPPORT ] &
1688
+ connector -> dp . dsc_dpcd [DP_DSC_BLK_PREDICTION_SUPPORT - DP_DSC_SUPPORT ] &
1690
1689
DP_DSC_BLK_PREDICTION_IS_SUPPORTED ;
1691
1690
1692
1691
return drm_dsc_compute_rc_parameters (vdsc_cfg );
@@ -2182,7 +2181,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
2182
2181
if (pipe_config -> bigjoiner_pipes || pipe_config -> dsc .slice_count > 1 )
2183
2182
pipe_config -> dsc .dsc_split = true;
2184
2183
2185
- ret = intel_dp_dsc_compute_params (& dig_port -> base , pipe_config );
2184
+ ret = intel_dp_dsc_compute_params (connector , pipe_config );
2186
2185
if (ret < 0 ) {
2187
2186
drm_dbg_kms (& dev_priv -> drm ,
2188
2187
"Cannot compute valid DSC parameters for Input Bpp = %d "
0 commit comments