From: Rob Clark Date: Mon, 24 Mar 2014 13:12:24 +0000 (-0400) Subject: drm/msm/mdp: add timeout for irq wait X-Git-Tag: v4.14-rc1~7723^2~15^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30b6f8f6792abe582ef25100984a113ac9bc88dd;p=platform%2Fkernel%2Flinux-rpi.git drm/msm/mdp: add timeout for irq wait Make things recover a bit more gracefully if we get stuck with no vblank irq ever coming. Signed-off-by: Rob Clark --- diff --git a/drivers/gpu/drm/msm/mdp/mdp_kms.c b/drivers/gpu/drm/msm/mdp/mdp_kms.c index 3be48f7..03455b6 100644 --- a/drivers/gpu/drm/msm/mdp/mdp_kms.c +++ b/drivers/gpu/drm/msm/mdp/mdp_kms.c @@ -101,7 +101,8 @@ void mdp_irq_wait(struct mdp_kms *mdp_kms, uint32_t irqmask) .count = 1, }; mdp_irq_register(mdp_kms, &wait.irq); - wait_event(wait_event, (wait.count <= 0)); + wait_event_timeout(wait_event, (wait.count <= 0), + msecs_to_jiffies(100)); mdp_irq_unregister(mdp_kms, &wait.irq); }