drm/i915/lspcon: Fail LSPCON probe if the start of DPCD can't be read
All types of DP devices (eDP, DP sink, DP branch) will fail their probe if the start of DPCD can't be read. The LSPCON PCON functionality also depends on accessing this area, so fail the probe if the read fails. Cc: Shashank Sharma <shashank.sharma@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1477326811-30431-6-git-send-email-imre.deak@intel.com
This commit is contained in:
parent
7b3fc170d6
commit
24e807e79f
|
@ -3497,7 +3497,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
|
|||
intel_dp->DP = DP;
|
||||
}
|
||||
|
||||
static bool
|
||||
bool
|
||||
intel_dp_read_dpcd(struct intel_dp *intel_dp)
|
||||
{
|
||||
if (drm_dp_dpcd_read(&intel_dp->aux, 0x000, intel_dp->dpcd,
|
||||
|
|
|
@ -1467,6 +1467,8 @@ static inline unsigned int intel_dp_unused_lane_mask(int lane_count)
|
|||
return ~((1 << lane_count) - 1) & 0xf;
|
||||
}
|
||||
|
||||
bool intel_dp_read_dpcd(struct intel_dp *intel_dp);
|
||||
|
||||
/* intel_dp_aux_backlight.c */
|
||||
int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector);
|
||||
|
||||
|
|
|
@ -131,6 +131,11 @@ bool lspcon_init(struct intel_digital_port *intel_dig_port)
|
|||
}
|
||||
}
|
||||
|
||||
if (!intel_dp_read_dpcd(dp)) {
|
||||
DRM_ERROR("LSPCON DPCD read failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("Success: LSPCON init\n");
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue