drm/vc4: Nuke preclose hook
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 25 Jan 2016 21:16:55 +0000 (22:16 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 8 Feb 2016 08:55:53 +0000 (09:55 +0100)
Again since the drm core takes care of event unlinking/disarming this
is now just needless code.

v2: Fixup misplaced hunk.

Cc: Eric Anholt <eric@anholt.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1453756616-28942-14-git-send-email-daniel.vetter@ffwll.ch
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h

index 018145e0b87d35ee49377b23805da2435367c682..937409792b97549f882de8e9c043d9dc77084420 100644 (file)
@@ -593,26 +593,6 @@ static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = {
        .atomic_flush = vc4_crtc_atomic_flush,
 };
 
-/* Frees the page flip event when the DRM device is closed with the
- * event still outstanding.
- */
-void vc4_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file)
-{
-       struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
-       struct drm_device *dev = crtc->dev;
-       unsigned long flags;
-
-       spin_lock_irqsave(&dev->event_lock, flags);
-
-       if (vc4_crtc->event && vc4_crtc->event->base.file_priv == file) {
-               vc4_crtc->event->base.destroy(&vc4_crtc->event->base);
-               drm_crtc_vblank_put(crtc);
-               vc4_crtc->event = NULL;
-       }
-
-       spin_unlock_irqrestore(&dev->event_lock, flags);
-}
-
 static const struct vc4_crtc_data pv0_data = {
        .hvs_channel = 0,
        .encoder0_type = VC4_ENCODER_TYPE_DSI0,
index f1655fff8425166e88537c2b700c61de9200509d..b7d2ff0e6e1fb6d9611b7a98b8b1af0303b2ac9d 100644 (file)
@@ -43,14 +43,6 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index)
        return map;
 }
 
-static void vc4_drm_preclose(struct drm_device *dev, struct drm_file *file)
-{
-       struct drm_crtc *crtc;
-
-       list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
-               vc4_cancel_page_flip(crtc, file);
-}
-
 static void vc4_lastclose(struct drm_device *dev)
 {
        struct vc4_dev *vc4 = to_vc4_dev(dev);
@@ -91,8 +83,6 @@ static struct drm_driver vc4_drm_driver = {
                            DRIVER_HAVE_IRQ |
                            DRIVER_PRIME),
        .lastclose = vc4_lastclose,
-       .preclose = vc4_drm_preclose,
-
        .irq_handler = vc4_irq,
        .irq_preinstall = vc4_irq_preinstall,
        .irq_postinstall = vc4_irq_postinstall,
index 080865ec2bae67c7ff7b04a97fdb5956096cc156..4c734d087d7f1bab972b30031f3c31212651c29c 100644 (file)
@@ -376,7 +376,6 @@ int vc4_bo_stats_debugfs(struct seq_file *m, void *arg);
 extern struct platform_driver vc4_crtc_driver;
 int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id);
 void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id);
-void vc4_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file);
 int vc4_crtc_debugfs_regs(struct seq_file *m, void *arg);
 
 /* vc4_debugfs.c */