提交 59f3e272 编写于 作者: K Keith Packard

drm/i915: In intel_dp_init, replace read of DPCD with intel_dp_get_dpcd

Eliminates an open-coded read and also gains the retry behaviour of
intel_dp_get_dpcd, which seems like a good idea.
Signed-off-by: NKeith Packard <keithp@keithp.com>
Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: NAdam Jackson <ajax@redhat.com>
上级 26d61aad
...@@ -2015,7 +2015,7 @@ intel_dp_init(struct drm_device *dev, int output_reg) ...@@ -2015,7 +2015,7 @@ intel_dp_init(struct drm_device *dev, int output_reg)
/* Cache some DPCD data in the eDP case */ /* Cache some DPCD data in the eDP case */
if (is_edp(intel_dp)) { if (is_edp(intel_dp)) {
int ret; bool ret;
u32 pp_on, pp_div; u32 pp_on, pp_div;
pp_on = I915_READ(PCH_PP_ON_DELAYS); pp_on = I915_READ(PCH_PP_ON_DELAYS);
...@@ -2028,11 +2028,9 @@ intel_dp_init(struct drm_device *dev, int output_reg) ...@@ -2028,11 +2028,9 @@ intel_dp_init(struct drm_device *dev, int output_reg)
dev_priv->panel_t12 *= 100; /* t12 in 100ms units */ dev_priv->panel_t12 *= 100; /* t12 in 100ms units */
ironlake_edp_panel_vdd_on(intel_dp); ironlake_edp_panel_vdd_on(intel_dp);
ret = intel_dp_aux_native_read(intel_dp, DP_DPCD_REV, ret = intel_dp_get_dpcd(intel_dp);
intel_dp->dpcd,
sizeof(intel_dp->dpcd));
ironlake_edp_panel_vdd_off(intel_dp); ironlake_edp_panel_vdd_off(intel_dp);
if (ret == sizeof(intel_dp->dpcd)) { if (ret) {
if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11) if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11)
dev_priv->no_aux_handshake = dev_priv->no_aux_handshake =
intel_dp->dpcd[DP_MAX_DOWNSPREAD] & intel_dp->dpcd[DP_MAX_DOWNSPREAD] &
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册