From patchwork Thu Jan 21 18:19:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 8084061 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3231ABEEE5 for ; Thu, 21 Jan 2016 18:20:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 614FC20456 for ; Thu, 21 Jan 2016 18:20:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77C762044C for ; Thu, 21 Jan 2016 18:20:39 +0000 (UTC) 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 1aMJqX-00033n-QT; Thu, 21 Jan 2016 18:20:37 +0000 Received: from dougal.metanate.com ([90.155.101.14] helo=metanate.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aMJqV-00032J-Rr; Thu, 21 Jan 2016 18:20:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=PS2u02inuJPPU5jmNbx5IdeEmoTj18Vt/YwTQ2KB/gI=; b=MTffCmBiQEzXZJQriG4TJXaMXWasf+buRX7nQSQBcPJye+Gl3ohWh1y5ki6dLm+qrqyTpNl7oecAiRqqQSqvv+k6xm52K7PZ3wu7kPR3fkuB9+Y/kWlcQHfNPB8PtabVpA0fIvrWrvToh0Q7cTpO1tBeJ+4zbolCUASTRhCyH9Mi2Vl7MRjEMaTDsgwwDoRniLjpQ5/VIMewEqV7kzGf8DBycpKdExkCMCOVi2tieo+yp3Vuggv+CNBBa7yLxfNqFqewg6WEK4gW55zbyRvAoaJBXJjO1sreS+KOyIIHSG9XJGv7AqXSZEEKHYdtZPfDrvZkybZicEl0HpLWMPpagA==; Received: from brian ([192.168.88.1] helo=localhost.localdomain) by shrek.metanate.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.83_RC2) (envelope-from ) id 1aMJpb-0007MN-FP; Thu, 21 Jan 2016 18:19:39 +0000 Date: Thu, 21 Jan 2016 18:19:34 +0000 From: John Keeping To: Daniel Vetter , Mark Yao Subject: [PATCH v2] drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATION Message-ID: <20160121181934.76cb2c03.john@metanate.com> In-Reply-To: <20160121165251.GO19130@phenom.ffwll.local> References: <1453384426-32617-1-git-send-email-john@metanate.com> <20160121165251.GO19130@phenom.ffwll.local> Organization: Metanate Ltd X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; x86_64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160121_102036_129532_97DBAC59 X-CRM114-Status: GOOD ( 18.55 ) X-Spam-Score: -2.0 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If DRM_FBDEV_EMULATION is not selected in the config then we can save a bit of space by not including the framebuffer code. Signed-off-by: John Keeping --- On Thu, 21 Jan 2016 17:52:51 +0100, Daniel Vetter wrote: > On Thu, Jan 21, 2016 at 01:53:46PM +0000, John Keeping wrote: > > If DRM_FBDEV_EMULATION is not selected in the config then we should not > > setup a framebuffer console. > > It should just magically work, and this patch here just removes a bit more > dead code in the rockchip driver itself that's not needed in case fbdev > emulation is disabled. > > Can you please double-check this is the case and then resend with a > clarified commit message? You're right, it does work without this change, so this is just to save a bit of space when we don't need this feature. v2: - change commit message to clarify that this is only to remove some dead code drivers/gpu/drm/rockchip/Makefile | 3 ++- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile index a4e03bc..f6a809a 100644 --- a/drivers/gpu/drm/rockchip/Makefile +++ b/drivers/gpu/drm/rockchip/Makefile @@ -2,8 +2,9 @@ # Makefile for the drm device driver. This driver provides support for the # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. -rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ +rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ rockchip_drm_gem.o rockchip_drm_vop.o +rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h index 50432e9..73718c5 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h @@ -15,7 +15,18 @@ #ifndef _ROCKCHIP_DRM_FBDEV_H #define _ROCKCHIP_DRM_FBDEV_H +#ifdef CONFIG_DRM_FBDEV_EMULATION int rockchip_drm_fbdev_init(struct drm_device *dev); void rockchip_drm_fbdev_fini(struct drm_device *dev); +#else +static inline int rockchip_drm_fbdev_init(struct drm_device *dev) +{ + return 0; +} + +static inline void rockchip_drm_fbdev_fini(struct drm_device *dev) +{ +} +#endif #endif /* _ROCKCHIP_DRM_FBDEV_H */