@@ -517,6 +517,15 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state,
*/
ret = update_connector_routing(state, connector,
connector_state);
+ /* Set crtc->mode_changed and crtc->connectors_changed if
+ * link_train_retry flag is set in the connector.
+ */
+ if (connector->link_train_retry) {
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
+ connector->state->crtc);
+ crtc_state->connectors_changed = true;
+ crtc_state->mode_changed = true;
+ }
if (ret)
return ret;
}
@@ -2152,7 +2152,8 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper)
fb_crtc->desired_mode = mode;
fb_crtc->x = offset->x;
fb_crtc->y = offset->y;
- if (modeset->mode)
+ if (modeset->mode &&
+ !(fb_helper->connector_info[i]->connector->link_train_retry))
drm_mode_destroy(dev, modeset->mode);
modeset->mode = drm_mode_duplicate(dev,
fb_crtc->desired_mode);
The link_train_retry property of the connector needs to be checked to see if a full modeset is required. If this is set, then link train retry is requested possibly due to linktrain failure in the previous modeset. Hence we need to indicate connector status changed in order to trigger a full modeset. Cc: dri-devel@lists.freedesktop.org Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com> --- drivers/gpu/drm/drm_atomic_helper.c | 9 +++++++++ drivers/gpu/drm/drm_fb_helper.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-)