diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c index 8ae8f42f430a..d2408bb95bb1 100644 --- a/drivers/gpu/drm/i915/intel_lspcon.c +++ b/drivers/gpu/drm/i915/intel_lspcon.c @@ -66,6 +66,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon, enum drm_lspcon_mode mode) { enum drm_lspcon_mode current_mode; + int retry; current_mode = lspcon_get_current_mode(lspcon); if (current_mode == mode) @@ -74,9 +75,16 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon, DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n", lspcon_mode_name(mode)); - wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100); - if (current_mode != mode) - DRM_ERROR("LSPCON mode hasn't settled\n"); + for (retry = 0; retry < 6; retry++) { + if (retry) + usleep_range(500, 1000); + wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100); + + if (current_mode == mode) + break; + + DRM_ERROR("LSPCON mode hasn't settled, retrying\n"); + } out: DRM_DEBUG_KMS("Current LSPCON mode %s\n",