drm/exynos: remove unnecessary codes
authorInki Dae <inki.dae@samsung.com>
Tue, 17 Jan 2017 10:47:26 +0000 (19:47 +0900)
committerInki Dae <inki.dae@samsung.com>
Mon, 30 Jan 2017 23:49:42 +0000 (08:49 +0900)
This patch removes exynos_drm_crtc_cancel_page_flip call
when drm is closed because at that time, events will be released
by drm_events_release function.

Changelog v1:
- remove exynos_drm_crtc_cancel_page_flip function also because
  this funtion isn't used anymore.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_crtc.h
drivers/gpu/drm/exynos/exynos_drm_drv.c

index 309c8ee5252431e76b4a4d5c3d0bf123644bf29c..8dd59b9e5694d5503798bc92202c7e5272deb26b 100644 (file)
@@ -203,23 +203,3 @@ void exynos_drm_crtc_te_handler(struct drm_crtc *crtc)
        if (exynos_crtc->ops->te_handler)
                exynos_crtc->ops->te_handler(exynos_crtc);
 }
-
-void exynos_drm_crtc_cancel_page_flip(struct drm_crtc *crtc,
-                                       struct drm_file *file)
-{
-       struct drm_pending_vblank_event *e;
-       unsigned long flags;
-
-       spin_lock_irqsave(&crtc->dev->event_lock, flags);
-
-       e = crtc->state->event;
-       if (e && e->base.file_priv == file)
-               crtc->state->event = NULL;
-       else
-               e = NULL;
-
-       spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
-
-       if (e)
-               drm_event_cancel_free(crtc->dev, &e->base);
-}
index cfdcf3e4eb1bc36847ceb83d709065874aaacb0c..6a581a8af4650fcf5f07ea3fa84c6b1dd5e81ad4 100644 (file)
@@ -40,8 +40,4 @@ int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev,
  */
 void exynos_drm_crtc_te_handler(struct drm_crtc *crtc);
 
-/* This function cancels a page flip request. */
-void exynos_drm_crtc_cancel_page_flip(struct drm_crtc *crtc,
-                                       struct drm_file *file);
-
 #endif
index 3ec053542e93f36c84a29e47cf67a5cb44c71bcb..34e13422852e790503aa8f23144ef632de8d8c5c 100644 (file)
@@ -307,12 +307,7 @@ err_file_priv_free:
 static void exynos_drm_preclose(struct drm_device *dev,
                                        struct drm_file *file)
 {
-       struct drm_crtc *crtc;
-
        exynos_drm_subdrv_close(dev, file);
-
-       list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
-               exynos_drm_crtc_cancel_page_flip(crtc, file);
 }
 
 static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)