From patchwork Thu Jul 19 08:08:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10533767 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C0E1A600F4 for ; Thu, 19 Jul 2018 08:09:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B07E5296D9 for ; Thu, 19 Jul 2018 08:09:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4BC7296DF; Thu, 19 Jul 2018 08:09:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4DA42296D9 for ; Thu, 19 Jul 2018 08:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=72s+vrg51gQmoAiKl3PJBe4dOgAFymi2q0EMOahl6jo=; b=aKQ 4lKHUTC9B5N9MuRZXaX0mAunaeRrPZcnLmKDJYaToV1OX0Xr3UVQ374v8E8jA8mcF3CPlH4qa/KTu 7vyo+avmjK30D5AqRCytuZIFkhSc7PjV3X03rrY/XOagcP7TflbHCgQ3+t+C1EMSxa4VMOEWgL1au aI0HZ7IbpM7j2fljf9QsXT5EK/TtPfjdqpS1hbcKPt2uOBlTYmhx659MI/36GH/40cM4/BLJUqKu+ DwDEzOl0wYq+hu6llIAO3F/LFmPi02uSyYxv7+7+W11BrcBsSD2cCSAVdeRLzZ7t8kvgYpCxOZl/t KuciyPysruJzTrC/9oOUOyppwJkMk9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fg409-0007H2-Q3; Thu, 19 Jul 2018 08:09:29 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fg406-0007Ep-9i for linux-arm-kernel@lists.infradead.org; Thu, 19 Jul 2018 08:09:27 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 27DD0207B4; Thu, 19 Jul 2018 10:09:15 +0200 (CEST) Received: from localhost.localdomain (AAubervilliers-681-1-27-161.w90-88.abo.wanadoo.fr [90.88.147.161]) by mail.bootlin.com (Postfix) with ESMTPSA id DBEB9206EE; Thu, 19 Jul 2018 10:09:14 +0200 (CEST) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND v2 1/2] drm/sun4i: sun4i: Register quirks with the backend structure Date: Thu, 19 Jul 2018 10:08:37 +0200 Message-Id: <20180719080838.31598-1-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180719_010926_478834_18F10C16 X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , linux-sunxi@googlegroups.com, Paul Kocialkowski , David Airlie , Chen-Yu Tsai , Thomas Petazzoni MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In prevision for introducing a new quirk that will be used at atomic plane check time, register the quirks structure with the backend structure. This way, it can easily be grabbed where needed. Signed-off-by: Paul Kocialkowski --- Version 2 of this series was resent to include this patch, that was missing from the original v2 submission but is still very much needed. drivers/gpu/drm/sun4i/sun4i_backend.c | 2 ++ drivers/gpu/drm/sun4i/sun4i_backend.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c index de0a76dfa1a2..075cb0ff56ca 100644 --- a/drivers/gpu/drm/sun4i/sun4i_backend.c +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c @@ -882,6 +882,8 @@ static int sun4i_backend_bind(struct device *dev, struct device *master, : SUN4I_BACKEND_MODCTL_OUT_LCD0)); } + backend->quirks = quirks; + return 0; err_disable_ram_clk: diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.h b/drivers/gpu/drm/sun4i/sun4i_backend.h index 4caee0392fa4..ad6609323f0e 100644 --- a/drivers/gpu/drm/sun4i/sun4i_backend.h +++ b/drivers/gpu/drm/sun4i/sun4i_backend.h @@ -187,6 +187,8 @@ struct sun4i_backend { /* Protects against races in the frontend teardown */ spinlock_t frontend_lock; bool frontend_teardown; + + const struct sun4i_backend_quirks *quirks; }; static inline struct sun4i_backend *