On Tue, Aug 15, 2017 at 12:21:14AM +0000, Pandiyan, Dhinakaran wrote: > On Fri, 2017-08-11 at 18:58 +0530, Shashank Sharma wrote: > > Our current logic to read LSPCON's current mode, stops retries and > > breaks wait-loop, if it gets LSPCON_MODE_INVALID as return from the > > core function. This doesn't allow us to try reading the mode again. > > > > This patch removes this condition and allows retries reading > > the currnt mode until timeout. > > > > This also fixes/prevents some of the noise in form of debug messages > > while running IGT CI test cases. > > > > Cc: Imre Deak <imre.deak@xxxxxxxxx> > > Cc: Daniel Vetter <daniel.vetter@xxxxxxxxx> > > Signed-off-by: Shashank Sharma <shashank.sharma@xxxxxxxxx> > > Signed-off-by: Mahesh Kumar <Mahesh1.kumar@xxxxxxxxx> > > --- > > drivers/gpu/drm/i915/intel_lspcon.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c > > index 8413a4c..e64a336 100644 > > --- a/drivers/gpu/drm/i915/intel_lspcon.c > > +++ b/drivers/gpu/drm/i915/intel_lspcon.c > > @@ -118,14 +118,13 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon, > > enum drm_lspcon_mode current_mode; > > > > current_mode = lspcon_get_current_mode(lspcon); > > - if (current_mode == mode || current_mode == DRM_LSPCON_MODE_INVALID) > > + if (current_mode == mode) > > goto out; > > > > 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 || > > - current_mode == DRM_LSPCON_MODE_INVALID, 100); > > + wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100); > > Doesn't this do the job of retries that you are adding in patch 1/2 ? No that's a workaround for a different issue, where the adaptor is initially in LS mode, but switches on its own to PCON mode after some delay. > > > if (current_mode != mode) > > DRM_DEBUG_KMS("LSPCON mode hasn't settled\n"); > > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx