On Fri, Jan 20, 2017 at 04:28:43PM +0200, Ander Conselvan de Oliveira wrote:
> An error in the condition for avoiding the call to intel_hpd_poll_init()
> for valleyview and cherryview from intel_runtime_suspend() caused it to
> be called unconditionally. Fix it.
> 
> Found by coverity.
> 
> Fixes: 19625e85c6ec ("drm/i915: Enable polling when we don't have hpd")
> Cc: [email protected]
> Cc: Ville Syrjälä <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Lyude <[email protected]>
> Cc: Daniel Vetter <[email protected]>
> Cc: Jani Nikula <[email protected]>
> Cc: [email protected]
> Cc: <[email protected]> # v4.9+
> Signed-off-by: Ander Conselvan de Oliveira 
> <[email protected]>

Reviewed-by: Ville Syrjälä <[email protected]>

> ---
>  drivers/gpu/drm/i915/i915_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 4ae69eb..ca168b2 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -2377,7 +2377,7 @@ static int intel_runtime_suspend(struct device *kdev)
>  
>       assert_forcewakes_inactive(dev_priv);
>  
> -     if (!IS_VALLEYVIEW(dev_priv) || !IS_CHERRYVIEW(dev_priv))
> +     if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
>               intel_hpd_poll_init(dev_priv);
>  
>       DRM_DEBUG_KMS("Device suspended\n");
> -- 
> 2.5.5

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to