drm/arc: Nuke event_list
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 8 Jun 2016 12:18:54 +0000 (14:18 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Jun 2016 08:27:33 +0000 (10:27 +0200)
This is just used for cleanup in preclose, and with the reworked event
handling code this is now done properly by the core.

Nuke it!

But it also shows that arc totally fails at sending out drm events for
flips. Next patch will hack that up.

v2: Rebase it!

Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-2-git-send-email-daniel.vetter@ffwll.ch
drivers/gpu/drm/arc/arcpgu.h
drivers/gpu/drm/arc/arcpgu_crtc.c
drivers/gpu/drm/arc/arcpgu_drv.c

index 86574b698a78509145452795c4e0aa56690d5f4f..8c01a25d279a8c091320607454c4f9655e74233b 100644 (file)
@@ -22,7 +22,6 @@ struct arcpgu_drm_private {
        struct clk              *clk;
        struct drm_fbdev_cma    *fbdev;
        struct drm_framebuffer  *fb;
-       struct list_head        event_list;
        struct drm_crtc         crtc;
        struct drm_plane        *plane;
 };
index 92f8beff8e6076ca36e01f36b114ebf5623a200e..d5ca0c280e68132ec2453a75579e7a93d23b1c16 100644 (file)
@@ -155,10 +155,6 @@ static void arc_pgu_crtc_atomic_begin(struct drm_crtc *crtc,
                event->pipe = drm_crtc_index(crtc);
 
                WARN_ON(drm_crtc_vblank_get(crtc) != 0);
-
-               spin_lock_irqsave(&crtc->dev->event_lock, flags);
-               list_add_tail(&event->base.link, &arcpgu->event_list);
-               spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
        }
 }
 
index 7675bbc701333d1285356d226d9adc6fea494eca..d407fd79a4002b0db4764cc49da60d6cd9ce551a 100644 (file)
@@ -81,22 +81,6 @@ static const struct file_operations arcpgu_drm_ops = {
        .mmap = arcpgu_gem_mmap,
 };
 
-static void arcpgu_preclose(struct drm_device *drm, struct drm_file *file)
-{
-       struct arcpgu_drm_private *arcpgu = drm->dev_private;
-       struct drm_pending_vblank_event *e, *t;
-       unsigned long flags;
-
-       spin_lock_irqsave(&drm->event_lock, flags);
-       list_for_each_entry_safe(e, t, &arcpgu->event_list, base.link) {
-               if (e->base.file_priv != file)
-                       continue;
-               list_del(&e->base.link);
-               kfree(&e->base);
-       }
-       spin_unlock_irqrestore(&drm->event_lock, flags);
-}
-
 static void arcpgu_lastclose(struct drm_device *drm)
 {
        struct arcpgu_drm_private *arcpgu = drm->dev_private;
@@ -122,8 +106,6 @@ static int arcpgu_load(struct drm_device *drm)
        if (IS_ERR(arcpgu->clk))
                return PTR_ERR(arcpgu->clk);
 
-       INIT_LIST_HEAD(&arcpgu->event_list);
-
        arcpgu_setup_mode_config(drm);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -192,7 +174,6 @@ int arcpgu_unload(struct drm_device *drm)
 static struct drm_driver arcpgu_drm_driver = {
        .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME |
                           DRIVER_ATOMIC,
-       .preclose = arcpgu_preclose,
        .lastclose = arcpgu_lastclose,
        .name = "drm-arcpgu",
        .desc = "ARC PGU Controller",