diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 50f555530e55..419c2e49adf5 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c | |||
@@ -66,6 +66,26 @@ struct omap_atomic_state_commit { | |||
66 | u32 crtcs; | 66 | u32 crtcs; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static void omap_atomic_wait_for_completion(struct drm_device *dev, | ||
70 | struct drm_atomic_state *old_state) | ||
71 | { | ||
72 | struct drm_crtc_state *old_crtc_state; | ||
73 | struct drm_crtc *crtc; | ||
74 | unsigned int i; | ||
75 | int ret; | ||
76 | |||
77 | for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) { | ||
78 | if (!crtc->state->enable) | ||
79 | continue; | ||
80 | |||
81 | ret = omap_crtc_wait_pending(crtc); | ||
82 | |||
83 | if (!ret) | ||
84 | dev_warn(dev->dev, | ||
85 | "atomic complete timeout (pipe %u)!\n", i); | ||
86 | } | ||
87 | } | ||
88 | |||
69 | static void omap_atomic_complete(struct omap_atomic_state_commit *commit) | 89 | static void omap_atomic_complete(struct omap_atomic_state_commit *commit) |
70 | { | 90 | { |
71 | struct drm_device *dev = commit->dev; | 91 | struct drm_device *dev = commit->dev; |
@@ -79,7 +99,7 @@ static void omap_atomic_complete(struct omap_atomic_state_commit *commit) | |||
79 | drm_atomic_helper_commit_planes(dev, old_state); | 99 | drm_atomic_helper_commit_planes(dev, old_state); |
80 | drm_atomic_helper_commit_modeset_enables(dev, old_state); | 100 | drm_atomic_helper_commit_modeset_enables(dev, old_state); |
81 | 101 | ||
82 | drm_atomic_helper_wait_for_vblanks(dev, old_state); | 102 | omap_atomic_wait_for_completion(dev, old_state); |
83 | 103 | ||
84 | drm_atomic_helper_cleanup_planes(dev, old_state); | 104 | drm_atomic_helper_cleanup_planes(dev, old_state); |
85 | 105 | ||