[Intel-gfx] [PATCH 2/2] drm/i915: Don't give up waiting on INVALID_MODE
Imre Deak
imre.deak at intel.com
Wed Aug 16 14:06:41 UTC 2017
On Fri, Aug 11, 2017 at 06:58:27PM +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 at intel.com>
> Cc: Daniel Vetter <daniel.vetter at intel.com>
> Signed-off-by: Shashank Sharma <shashank.sharma at intel.com>
> Signed-off-by: Mahesh Kumar <Mahesh1.kumar at intel.com>
Reviewed-by: Imre Deak <imre.deak at intel.com>
> ---
> 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);
> if (current_mode != mode)
> DRM_DEBUG_KMS("LSPCON mode hasn't settled\n");
>
> --
> 2.7.4
>
More information about the Intel-gfx
mailing list