Commit e6ed2a1b authored by Jani Nikula's avatar Jani Nikula

drm/i915/edp: clean up code and comments around eDP DPCD read

Some minor drive-by cleanups.
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171026142932.17737-2-jani.nikula@intel.com
parent 0501a3b0
...@@ -3747,11 +3747,11 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp) ...@@ -3747,11 +3747,11 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV, if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) == intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
sizeof(intel_dp->edp_dpcd)) sizeof(intel_dp->edp_dpcd))
DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd), DRM_DEBUG_KMS("eDP DPCD: %*ph\n", (int) sizeof(intel_dp->edp_dpcd),
intel_dp->edp_dpcd); intel_dp->edp_dpcd);
/* Intermediate frequency support */ /* Read the eDP 1.4+ supported link rates. */
if (intel_dp->edp_dpcd[0] >= 0x03) { /* eDp v1.4 or higher */ if (intel_dp->edp_dpcd[0] >= DP_EDP_14) {
__le16 sink_rates[DP_MAX_SUPPORTED_RATES]; __le16 sink_rates[DP_MAX_SUPPORTED_RATES];
int i; int i;
...@@ -3775,6 +3775,10 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp) ...@@ -3775,6 +3775,10 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
intel_dp->num_sink_rates = i; intel_dp->num_sink_rates = i;
} }
/*
* Use DP_LINK_RATE_SET if DP_SUPPORTED_LINK_RATES are available,
* default to DP_MAX_LINK_RATE and DP_LINK_BW_SET otherwise.
*/
if (intel_dp->num_sink_rates) if (intel_dp->num_sink_rates)
intel_dp->use_rate_select = true; intel_dp->use_rate_select = true;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment