diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_crtc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 0acbe62901d9..161a74a3ac5e 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c | |||
@@ -621,6 +621,25 @@ static void omap_crtc_post_apply(struct omap_drm_apply *apply) | |||
621 | /* nothing needed for post-apply */ | 621 | /* nothing needed for post-apply */ |
622 | } | 622 | } |
623 | 623 | ||
624 | void omap_crtc_flush(struct drm_crtc *crtc) | ||
625 | { | ||
626 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | ||
627 | int loops = 0; | ||
628 | |||
629 | while (!list_empty(&omap_crtc->pending_applies) || | ||
630 | !list_empty(&omap_crtc->queued_applies) || | ||
631 | omap_crtc->event || omap_crtc->old_fb) { | ||
632 | |||
633 | if (++loops > 10) { | ||
634 | dev_err(crtc->dev->dev, | ||
635 | "omap_crtc_flush() timeout\n"); | ||
636 | break; | ||
637 | } | ||
638 | |||
639 | schedule_timeout_uninterruptible(msecs_to_jiffies(20)); | ||
640 | } | ||
641 | } | ||
642 | |||
624 | static const char *channel_names[] = { | 643 | static const char *channel_names[] = { |
625 | [OMAP_DSS_CHANNEL_LCD] = "lcd", | 644 | [OMAP_DSS_CHANNEL_LCD] = "lcd", |
626 | [OMAP_DSS_CHANNEL_DIGIT] = "tv", | 645 | [OMAP_DSS_CHANNEL_DIGIT] = "tv", |