@@ -562,12 +562,21 @@ static bool intel_dp_can_link_train_fallback_for_edp(struct intel_dp *intel_dp,
uint8_t lane_count)
{
struct drm_display_mode *fixed_mode = intel_dp->attached_connector->panel.fixed_mode;
+ struct drm_display_mode *downclock_mode =
+ intel_dp->attached_connector->panel.downclock_mode;
int mode_rate, max_rate;
mode_rate = intel_dp_link_required(fixed_mode->clock, 18);
max_rate = intel_dp_max_data_rate(link_rate, lane_count);
- if (mode_rate > max_rate)
+ if (mode_rate > max_rate) {
+ if (downclock_mode) {
+ mode_rate = intel_dp_link_required(downclock_mode->clock,
+ 18);
+ if (mode_rate > max_rate)
+ return false;
+ }
return false;
+ }
return true;
}
If link training fails on eDP then we fallback to lower link rate and lane count. If the fallback link BW cannot fit the panel's native mode and if the downclock mode exists then we should check if the fallback BW can fit this downclock mode. Suggested-by: Jani Nikula <jani.nikula@linux.intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com> --- drivers/gpu/drm/i915/intel_dp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)