drm/i915: Remove high level intel_edp_vdd_{on, off}() from hpd/detect
want_panel_vdd is a bool so it can't cope with interleaving on/off calls from multiple threads. If we want to make that possible we'd need to convert want_panel_vdd into a proper ref count. But an easier fix is to remove the high level vdd on/off calls from detect/hpd code paths and just rely on the delayed vdd off to avoid needless vdd on<->off ping pong. After this change only the encoder enable/disable paths use the high level functions, which is fine since both the on and off low level edp vdd calls from intel_dp_aux_ch() happen without dropping pps_mutex in between and so want_panel_vdd can't change in between. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Родитель
c17ed5b5a4
Коммит
7a66800e03
|
@ -3846,8 +3846,6 @@ intel_dp_probe_oui(struct intel_dp *intel_dp)
|
||||||
if (!(intel_dp->dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_OUI_SUPPORT))
|
if (!(intel_dp->dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_OUI_SUPPORT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
intel_edp_panel_vdd_on(intel_dp);
|
|
||||||
|
|
||||||
if (intel_dp_dpcd_read_wake(&intel_dp->aux, DP_SINK_OUI, buf, 3) == 3)
|
if (intel_dp_dpcd_read_wake(&intel_dp->aux, DP_SINK_OUI, buf, 3) == 3)
|
||||||
DRM_DEBUG_KMS("Sink OUI: %02hx%02hx%02hx\n",
|
DRM_DEBUG_KMS("Sink OUI: %02hx%02hx%02hx\n",
|
||||||
buf[0], buf[1], buf[2]);
|
buf[0], buf[1], buf[2]);
|
||||||
|
@ -3855,8 +3853,6 @@ intel_dp_probe_oui(struct intel_dp *intel_dp)
|
||||||
if (intel_dp_dpcd_read_wake(&intel_dp->aux, DP_BRANCH_OUI, buf, 3) == 3)
|
if (intel_dp_dpcd_read_wake(&intel_dp->aux, DP_BRANCH_OUI, buf, 3) == 3)
|
||||||
DRM_DEBUG_KMS("Branch OUI: %02hx%02hx%02hx\n",
|
DRM_DEBUG_KMS("Branch OUI: %02hx%02hx%02hx\n",
|
||||||
buf[0], buf[1], buf[2]);
|
buf[0], buf[1], buf[2]);
|
||||||
|
|
||||||
intel_edp_panel_vdd_off(intel_dp, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -3870,7 +3866,6 @@ intel_dp_probe_mst(struct intel_dp *intel_dp)
|
||||||
if (intel_dp->dpcd[DP_DPCD_REV] < 0x12)
|
if (intel_dp->dpcd[DP_DPCD_REV] < 0x12)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
intel_edp_panel_vdd_on(intel_dp);
|
|
||||||
if (intel_dp_dpcd_read_wake(&intel_dp->aux, DP_MSTM_CAP, buf, 1)) {
|
if (intel_dp_dpcd_read_wake(&intel_dp->aux, DP_MSTM_CAP, buf, 1)) {
|
||||||
if (buf[0] & DP_MST_CAP) {
|
if (buf[0] & DP_MST_CAP) {
|
||||||
DRM_DEBUG_KMS("Sink is MST capable\n");
|
DRM_DEBUG_KMS("Sink is MST capable\n");
|
||||||
|
@ -3880,7 +3875,6 @@ intel_dp_probe_mst(struct intel_dp *intel_dp)
|
||||||
intel_dp->is_mst = false;
|
intel_dp->is_mst = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
intel_edp_panel_vdd_off(intel_dp, false);
|
|
||||||
|
|
||||||
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, intel_dp->is_mst);
|
drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, intel_dp->is_mst);
|
||||||
return intel_dp->is_mst;
|
return intel_dp->is_mst;
|
||||||
|
@ -5086,9 +5080,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
|
||||||
intel_edp_panel_vdd_sanitize(intel_encoder);
|
intel_edp_panel_vdd_sanitize(intel_encoder);
|
||||||
|
|
||||||
/* Cache DPCD and EDID for edp. */
|
/* Cache DPCD and EDID for edp. */
|
||||||
intel_edp_panel_vdd_on(intel_dp);
|
|
||||||
has_dpcd = intel_dp_get_dpcd(intel_dp);
|
has_dpcd = intel_dp_get_dpcd(intel_dp);
|
||||||
intel_edp_panel_vdd_off(intel_dp, false);
|
|
||||||
|
|
||||||
if (has_dpcd) {
|
if (has_dpcd) {
|
||||||
if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11)
|
if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче