drm/exynos: make event parameter optional for page_flip
authorMandeep Singh Baines <msb@chromium.org>
Wed, 7 Nov 2012 21:09:56 +0000 (13:09 -0800)
committerGerrit <chrome-bot@google.com>
Wed, 14 Nov 2012 00:53:33 +0000 (16:53 -0800)
We no longer need to enforce that event is non-NULL. We also need
to be able to call page_flip with a NULL event so that we can
call it from the mode_set paths.

BUG=chrome-os-partner:15349,chrome-os-partner:14965
TEST=Multiple VT switch, HDMI plug/unplug, sign in/out, suspend/resume,
     idle suspend/resume.

Change-Id: Ia139cd36a3f78fbf3c96651176a42289f07722e6
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37572

drivers/gpu/drm/exynos/exynos_drm_crtc.c

index 3fefe88..6264443 100644 (file)
@@ -346,17 +346,12 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 #endif
        DRM_DEBUG_KMS("%s\n", __FILE__);
 
-       /* msb: The event flag is optional but exynos does not support it. */
-       if (!event) {
-               DRM_ERROR("called page_flip with empty event flag\n");
-               return -EINVAL;
-       }
-
        /*
         * the pipe from user always is 0 so we can set pipe number
         * of current owner to event.
         */
-       event->pipe = exynos_crtc->pipe;
+       if (event)
+               event->pipe = exynos_crtc->pipe;
 
        ret = drm_vblank_get(dev, exynos_crtc->pipe);
        if (ret) {