drm/omap: page_flip: return -EBUSY if flip pending
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 3 Sep 2014 19:25:50 +0000 (19:25 +0000)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 24 Mar 2015 11:33:24 +0000 (13:33 +0200)
The DRM documentation says:

"If a page flip is already pending, the page_flip operation must return
-EBUSY."

Currently omapdrm returns -EINVAL instead. Fix omapdrm by returning
-EBUSY.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_crtc.c

index 5cd10cf579856abd54189a416ae31445bc8f9d60..a4d6f5ec627ef6b2ee23cb1eeef05057ae64186a 100644 (file)
@@ -606,7 +606,7 @@ static int omap_crtc_page_flip_locked(struct drm_crtc *crtc,
        if (omap_crtc->old_fb) {
                spin_unlock_irqrestore(&dev->event_lock, flags);
                dev_err(dev->dev, "already a pending flip\n");
-               return -EINVAL;
+               return -EBUSY;
        }
 
        omap_crtc->event = event;