drm/armada: allow armada_drm_plane_work_queue() to silently fail
authorRussell King <rmk+kernel@armlinux.org.uk>
Sat, 8 Jul 2017 09:22:23 +0000 (10:22 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Fri, 8 Dec 2017 12:19:58 +0000 (12:19 +0000)
Avoid printing an error message when armada_drm_plane_work_queue() is
unable to get the vblank (eg, because we're doing a modeset.)  Continue
to report the failure to the caller, so the caller can handle this.

Move the error message into armada_ovl_plane_update().

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/gpu/drm/armada/armada_crtc.c
drivers/gpu/drm/armada/armada_overlay.c

index 401ad854d7519a6740ef92ce0324d65ee7c99b19..2f8e45976444ee0f7c05f075afdbbd77121bfc9b 100644 (file)
@@ -254,10 +254,8 @@ int armada_drm_plane_work_queue(struct armada_crtc *dcrtc,
        int ret;
 
        ret = drm_crtc_vblank_get(&dcrtc->crtc);
-       if (ret) {
-               DRM_ERROR("failed to acquire vblank counter\n");
+       if (ret)
                return ret;
-       }
 
        ret = cmpxchg(&plane->work, NULL, work) ? -EBUSY : 0;
        if (ret)
index 010f3e438607a16b0fab79e6c8e62a7310457f42..53edf42c5863ccffa2cee965ec34ae6506782928 100644 (file)
@@ -245,7 +245,9 @@ armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
        if (idx) {
                armada_reg_queue_end(work->regs, idx);
                /* Queue it for update on the next interrupt if we are enabled */
-               armada_drm_plane_work_queue(dcrtc, work);
+               ret = armada_drm_plane_work_queue(dcrtc, work);
+               if (ret)
+                       DRM_ERROR("failed to queue plane work: %d\n", ret);
        }
        return 0;
 }