Re: [PATCH 02/18] drm/exynos: use wait_event_timeout() for safety usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/14/2014 08:26 AM, YoungJun Cho wrote:
> There could be the case that the page flip operation isn't finished correctly
> with some abnormal condition such as panel reset. So this patch replaces
> wait_event() with wait_event_timeout() to avoid waiting for page flip completion
> infinitely.
>
> Signed-off-by: YoungJun Cho <yj44.cho@xxxxxxxxxxx>
> Acked-by: Inki Dae <inki.dae@xxxxxxxxxxx>
> Acked-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>

Reviewed-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>

> ---
>  drivers/gpu/drm/exynos/exynos_drm_crtc.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index 95c9435..485fa26 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -69,8 +69,9 @@ static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
>  
>  	if (mode > DRM_MODE_DPMS_ON) {
>  		/* wait for the completion of page flip. */
> -		wait_event(exynos_crtc->pending_flip_queue,
> -				atomic_read(&exynos_crtc->pending_flip) == 0);
> +		wait_event_timeout(exynos_crtc->pending_flip_queue,
> +				!atomic_read(&exynos_crtc->pending_flip),
> +				HZ/20);
>  		drm_vblank_off(crtc->dev, exynos_crtc->pipe);
>  	}
>  

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux