From patchwork Sun May 29 18:35:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 627518 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rHpNn1xTPz9t41 for ; Mon, 30 May 2016 04:36:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ffwll.ch header.i=@ffwll.ch header.b=GhRQZtIb; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b75ZH-000835-Og; Sun, 29 May 2016 18:36:07 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b75ZE-00080k-Nx for linux-snps-arc@lists.infradead.org; Sun, 29 May 2016 18:36:05 +0000 Received: by mail-wm0-x244.google.com with SMTP id a136so16123095wme.0 for ; Sun, 29 May 2016 11:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=V3digEvKOTAnJ8dtc8rT/qaz20MGtTSfxyvO0AU3Jhs=; b=GhRQZtIbs8V012waT2WIMc3FC8nZyJ/3mEGKuUY2fM/S6jzUcjUJmmf3M5EPDacJvj RRQKgIUcJFtQwrM3JvbkKEX1IHCbjsDCHHXULzwvZIQcpL4B/hZe7nT21D4C7FOg7cTV femoVkqnpA6QOV1ijbls+FK7GgqiLjBp8BynU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V3digEvKOTAnJ8dtc8rT/qaz20MGtTSfxyvO0AU3Jhs=; b=g5RC64xtofeNEXWNG5wlV3M83cWnIrBTFyCzZl2UTNS0UUfIuL68rU3WQDEQKBd6j8 qg3Yw9xVOXHnNnl0tu3TCREDHp5aNvhRr8kM/SrFgHsdWrBo0U+otxZnjJrFVpqDoE5f wlIolYxxRXUXTN6DakRbeNK5dY++igiuhjqK5DBw+k6aOvFbsbx/glR8BAxWxWp8suBp uMReUAEPypRV/nu+rKs0O/7/UmFZuiNjv/k3A3t5fXGy2jO3Ap8CUwhAt0ajdTN8FeSU iI4Np3SXEDRS4i4wCPOUBJly9uljV5WZnho9dnARSUcOOlge2IzLb+nmENuHD4fIi9an EV6Q== X-Gm-Message-State: ALyK8tLukIkJyG2iXsCvuhfVYj5PgQvKQ8OJvgf6nyt2/7hjf3gpbRmYX7tkCStQibpD2g== X-Received: by 10.28.26.196 with SMTP id a187mr8005342wma.55.1464546942126; Sun, 29 May 2016 11:35:42 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56b5:0:ac27:b86c:7764:9429]) by smtp.gmail.com with ESMTPSA id h2sm7761550wjv.15.2016.05.29.11.35.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 May 2016 11:35:41 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 13/26] drm/arc: Nuke event_list Date: Sun, 29 May 2016 20:35:10 +0200 Message-Id: <1464546923-13439-14-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464546923-13439-1-git-send-email-daniel.vetter@ffwll.ch> References: <1464546923-13439-1-git-send-email-daniel.vetter@ffwll.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160529_113604_943806_0FEC110D X-CRM114-Status: GOOD ( 12.74 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:244 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics Development , Alexey Brodkin , Carlos Palminha , Daniel Vetter , linux-snps-arc@lists.infradead.org MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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. Cc: Carlos Palminha Cc: Alexey Brodkin Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Daniel Vetter --- drivers/gpu/drm/arc/arcpgu.h | 1 - drivers/gpu/drm/arc/arcpgu_crtc.c | 4 ---- drivers/gpu/drm/arc/arcpgu_drv.c | 19 ------------------- 3 files changed, 24 deletions(-) diff --git a/drivers/gpu/drm/arc/arcpgu.h b/drivers/gpu/drm/arc/arcpgu.h index 86574b698a78..8c01a25d279a 100644 --- a/drivers/gpu/drm/arc/arcpgu.h +++ b/drivers/gpu/drm/arc/arcpgu.h @@ -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; }; diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c index 92f8beff8e60..d5ca0c280e68 100644 --- a/drivers/gpu/drm/arc/arcpgu_crtc.c +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c @@ -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); } } diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index bc53ebb83f75..d407fd79a400 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -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); - e->base.destroy(&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",