Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/omapdrm: Fix omap_atomic_wait_for_completion

Use the new iterator macro and look for crtc_state->active instead of
enable, only crtc_state->active implies that vblanks will happen.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170719143920.25685-5-maarten.lankhorst@linux.intel.com

+3 -3
+3 -3
drivers/gpu/drm/omapdrm/omap_drv.c
··· 57 57 static void omap_atomic_wait_for_completion(struct drm_device *dev, 58 58 struct drm_atomic_state *old_state) 59 59 { 60 - struct drm_crtc_state *old_crtc_state; 60 + struct drm_crtc_state *new_crtc_state; 61 61 struct drm_crtc *crtc; 62 62 unsigned int i; 63 63 int ret; 64 64 65 - for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) { 66 - if (!crtc->state->enable) 65 + for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { 66 + if (!new_crtc_state->active) 67 67 continue; 68 68 69 69 ret = omap_crtc_wait_pending(crtc);