From patchwork Sun May 14 16:30:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9725819 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 0862A601E7 for ; Sun, 14 May 2017 17:05:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA1EA2894D for ; Sun, 14 May 2017 17:05:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD28F2894F; Sun, 14 May 2017 17:05:48 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 35A192894D for ; Sun, 14 May 2017 17:05:46 +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:References: In-Reply-To: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:List-Owner; bh=z8OhBh0bGfV0qynFIJLqYOG8VzcMDksyf6rC2rgKV/Y=; b=sVksdbwd43UJhXP7UXcn5LBLbp gmwV5y4Y8sZgx0OY6dbYn9tvPFZhwL6gLBOW0lr0NuSkkszWWpTefAx/LK4taLo8BEUVXgragBmFh +VFNAhH6Dv4ZdhWr7mUSaWdcUcCK9gBSVUQSWHudo35Cuv+sOKCrcLcyr22FXlJcZbwr942CAzD/O Woae4DcInQe/ivFQ9h2DupFxxPvLU2y42o+ofT07Umq9av+/TUmJcdA22pcuAvPoQMoDTzd8sDa6z 5AAQbQqCD8AOUXU1Pk8ZzHLChEtgvGLAxci50VnMMMx1OFeE6TwBti/ehzwqhWSCpjPopdGKwu1cu aU4JDtXQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d9wxl-0005ia-Qw; Sun, 14 May 2017 17:05:45 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d9wxb-0005Z0-2D for linux-arm-kernel@bombadil.infradead.org; Sun, 14 May 2017 17:05:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8JIURnkAJZYOLCyrZ5Vlej+h7YVoEc0Yp4+HxpiaGCs=; b=bVSkTiHkEST2GTFYbONk0Tamx LEMOS+p7VX0xAQYnPnh4mv1gKWIrNFi7HEF6Xq4VQrTmBPoj5FSOMCMcfXNQgeTXOw9CiepSCyYFp cU396d1+OguTkWurTZKp0RV7Oyz40D+7cVwq1KbTpJE75Ns1ww67RqxGonOVyB/z8/9gZZ7LADAOP rkxUGCiYv0VLDsrf/S5G5bFsYR5tdcYsk48MgofrwdRuegmVXXgukZuX68GuTOHGEsIhxytwqDs0Y k2PyRUwOZcgYmubr3xQN+VOrf2hrQ381SvSg7gdsmLO85DxPAQ1eQvYlKuMcJObWmM0EdSQYlyT0n fC5Te+lIA==; Received: from caracal.maple.relay.mailchannels.net ([23.83.214.30]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d9wRj-0007dI-6o for linux-arm-kernel@lists.infradead.org; Sun, 14 May 2017 16:32:41 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1E46420677D; Sun, 14 May 2017 16:32:16 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.126.214]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 2C19920685B; Sun, 14 May 2017 16:32:15 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.20.108.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.9.3); Sun, 14 May 2017 16:32:16 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Tangy-Tasty: 50e6204b5bd4770e_1494779535791_2459083848 X-MC-Loop-Signature: 1494779535791:1807895980 X-MC-Ingress-Time: 1494779535790 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 50A804CF6F; Sun, 14 May 2017 16:32:10 +0000 (UTC) From: Icenowy Zheng To: Rob Herring , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v7 06/13] drm/sun4i: add a dedicated module for sun4i-backend and sun4i-layer Date: Mon, 15 May 2017 00:30:38 +0800 Message-Id: <20170514163045.40366-7-icenowy@aosc.io> In-Reply-To: <20170514163045.40366-1-icenowy@aosc.io> References: <20170514163045.40366-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170514_123239_443962_40C08A7F X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. 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: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 Currently the direct call from CRTC code to layer code has disappeared, instead the layer's init function is called via the backend's ops. Add a dedicated module for sun4i-backend and sun4i-layer, and drop the EXPORT_SYMBOL from backend code to layer code. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai --- Changes in v7: - Added Chen-Yu's Reviewed-by. drivers/gpu/drm/sun4i/Makefile | 5 +++-- drivers/gpu/drm/sun4i/sun4i_backend.c | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile index 59b757350a1f..a251fb36c951 100644 --- a/drivers/gpu/drm/sun4i/Makefile +++ b/drivers/gpu/drm/sun4i/Makefile @@ -5,9 +5,10 @@ sun4i-tcon-y += sun4i_tcon.o sun4i-tcon-y += sun4i_rgb.o sun4i-tcon-y += sun4i_dotclock.o sun4i-tcon-y += sun4i_crtc.o -sun4i-tcon-y += sun4i_layer.o + +sun4i-backend-y += sun4i_backend.o sun4i_layer.o obj-$(CONFIG_DRM_SUN4I) += sun4i-drm.o sun4i-tcon.o -obj-$(CONFIG_DRM_SUN4I) += sun4i_backend.o +obj-$(CONFIG_DRM_SUN4I) += sun4i-backend.o obj-$(CONFIG_DRM_SUN4I) += sun6i_drc.o obj-$(CONFIG_DRM_SUN4I) += sun4i_tv.o diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c index 611cdcb9c182..fac1a414ba49 100644 --- a/drivers/gpu/drm/sun4i/sun4i_backend.c +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c @@ -83,7 +83,6 @@ void sun4i_backend_layer_enable(struct sun4i_backend *backend, regmap_update_bits(backend->engine.regs, SUN4I_BACKEND_MODCTL_REG, SUN4I_BACKEND_MODCTL_LAY_EN(layer), val); } -EXPORT_SYMBOL(sun4i_backend_layer_enable); static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane, u32 format, u32 *mode) @@ -170,7 +169,6 @@ int sun4i_backend_update_layer_coord(struct sun4i_backend *backend, return 0; } -EXPORT_SYMBOL(sun4i_backend_update_layer_coord); int sun4i_backend_update_layer_formats(struct sun4i_backend *backend, int layer, struct drm_plane *plane) @@ -205,7 +203,6 @@ int sun4i_backend_update_layer_formats(struct sun4i_backend *backend, return 0; } -EXPORT_SYMBOL(sun4i_backend_update_layer_formats); int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend, int layer, struct drm_plane *plane) @@ -246,7 +243,6 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend, return 0; } -EXPORT_SYMBOL(sun4i_backend_update_layer_buffer); static int sun4i_backend_init_sat(struct device *dev) { struct sun4i_backend *backend = dev_get_drvdata(dev);