Skip to content

Commit 02c8d56

Browse files
committed
drm/i915/dp: Remove unused DSC caps from intel_dp
The previous patches converted all users of the DSC DPCD caps to look these up from the connector, so remove the version stored in intel_dp. A follow-up patchset will read out the MST connector specific capabilities in intel_dp_add_mst_connector() -> intel_dp_mst_read_decompression_port_dsc_caps(). v2: - Rebased on intel_edp_get_dsc_sink_cap() addition in the patchset. v3: - Rebased on read-out fix for eDP in the patchset. Reviewed-by: Stanislav Lisovskiy <[email protected]> (v1) 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 d19daff commit 02c8d56

File tree

4 files changed

+7
-30
lines changed

4 files changed

+7
-30
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,10 +1725,8 @@ struct intel_dp {
17251725
u8 psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE];
17261726
u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS];
17271727
u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE];
1728-
u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE];
17291728
u8 lttpr_common_caps[DP_LTTPR_COMMON_CAP_SIZE];
17301729
u8 lttpr_phy_caps[DP_MAX_LTTPR_COUNT][DP_LTTPR_PHY_CAP_SIZE];
1731-
u8 fec_capable;
17321730
u8 pcon_dsc_dpcd[DP_PCON_DSC_ENCODER_CAP_SIZE];
17331731
/* source rates */
17341732
int num_source_rates;

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

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3490,10 +3490,9 @@ static void intel_dp_read_dsc_dpcd(struct drm_dp_aux *aux,
34903490
dsc_dpcd);
34913491
}
34923492

3493-
void intel_dp_get_dsc_sink_cap(u8 dpcd_rev, struct intel_dp *intel_dp,
3494-
struct intel_connector *connector)
3493+
void intel_dp_get_dsc_sink_cap(u8 dpcd_rev, struct intel_connector *connector)
34953494
{
3496-
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
3495+
struct drm_i915_private *i915 = to_i915(connector->base.dev);
34973496

34983497
/*
34993498
* Clear the cached register set to avoid using stale values
@@ -3518,27 +3517,14 @@ void intel_dp_get_dsc_sink_cap(u8 dpcd_rev, struct intel_dp *intel_dp,
35183517

35193518
drm_dbg_kms(&i915->drm, "FEC CAPABILITY: %x\n",
35203519
connector->dp.fec_capability);
3521-
3522-
/*
3523-
* TODO: remove the following intel_dp copies once all users
3524-
* are converted to look up DSC DPCD/FEC capability via the
3525-
* connector.
3526-
*/
3527-
memcpy(intel_dp->dsc_dpcd, connector->dp.dsc_dpcd,
3528-
sizeof(intel_dp->dsc_dpcd));
3529-
intel_dp->fec_capable = connector->dp.fec_capability;
35303520
}
35313521

3532-
static void intel_edp_get_dsc_sink_cap(u8 edp_dpcd_rev, struct intel_dp *intel_dp,
3533-
struct intel_connector *connector)
3522+
static void intel_edp_get_dsc_sink_cap(u8 edp_dpcd_rev, struct intel_connector *connector)
35343523
{
35353524
if (edp_dpcd_rev < DP_EDP_14)
35363525
return;
35373526

35383527
intel_dp_read_dsc_dpcd(connector->dp.dsc_decompression_aux, connector->dp.dsc_dpcd);
3539-
3540-
memcpy(intel_dp->dsc_dpcd, connector->dp.dsc_dpcd,
3541-
sizeof(intel_dp->dsc_dpcd));
35423528
}
35433529

35443530
static void intel_edp_mso_mode_fixup(struct intel_connector *connector,
@@ -3710,7 +3696,6 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp, struct intel_connector *connector
37103696
/* Read the eDP DSC DPCD registers */
37113697
if (HAS_DSC(dev_priv))
37123698
intel_edp_get_dsc_sink_cap(intel_dp->edp_dpcd[0],
3713-
intel_dp,
37143699
connector);
37153700

37163701
/*
@@ -5390,10 +5375,10 @@ intel_dp_detect_dsc_caps(struct intel_dp *intel_dp, struct intel_connector *conn
53905375

53915376
if (intel_dp_is_edp(intel_dp))
53925377
intel_edp_get_dsc_sink_cap(intel_dp->edp_dpcd[0],
5393-
intel_dp, connector);
5378+
connector);
53945379
else
53955380
intel_dp_get_dsc_sink_cap(intel_dp->dpcd[DP_DPCD_REV],
5396-
intel_dp, connector);
5381+
connector);
53975382
}
53985383

53995384
static int
@@ -5427,11 +5412,6 @@ intel_dp_detect(struct drm_connector *connector,
54275412

54285413
if (status == connector_status_disconnected) {
54295414
memset(&intel_dp->compliance, 0, sizeof(intel_dp->compliance));
5430-
/*
5431-
* TODO: Remove clearing the DPCD in intel_dp, once all
5432-
* user are converted to using the DPCD in connector.
5433-
*/
5434-
memset(intel_dp->dsc_dpcd, 0, sizeof(intel_dp->dsc_dpcd));
54355415
memset(intel_connector->dp.dsc_dpcd, 0, sizeof(intel_connector->dp.dsc_dpcd));
54365416

54375417
if (intel_dp->is_mst) {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp,
163163
bool dsc,
164164
struct link_config_limits *limits);
165165

166-
void intel_dp_get_dsc_sink_cap(u8 dpcd_rev, struct intel_dp *intel_dp,
167-
struct intel_connector *connector);
166+
void intel_dp_get_dsc_sink_cap(u8 dpcd_rev, struct intel_connector *connector);
168167

169168
#endif /* __INTEL_DP_H__ */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ intel_dp_mst_read_decompression_port_dsc_caps(struct intel_dp *intel_dp,
11361136
if (drm_dp_read_dpcd_caps(connector->dp.dsc_decompression_aux, dpcd_caps) < 0)
11371137
return;
11381138

1139-
intel_dp_get_dsc_sink_cap(dpcd_caps[DP_DPCD_REV], intel_dp, connector);
1139+
intel_dp_get_dsc_sink_cap(dpcd_caps[DP_DPCD_REV], connector);
11401140
}
11411141

11421142
static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,

0 commit comments

Comments
 (0)