From patchwork Thu Oct 15 07:11:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 7403211 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DD2229F1D5 for ; Thu, 15 Oct 2015 07:10:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C347920552 for ; Thu, 15 Oct 2015 07:10:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 91F5920497 for ; Thu, 15 Oct 2015 07:10:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753794AbbJOHKt (ORCPT ); Thu, 15 Oct 2015 03:10:49 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33466 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753694AbbJOHKs (ORCPT ); Thu, 15 Oct 2015 03:10:48 -0400 Received: by pabrc13 with SMTP id rc13so79052297pab.0 for ; Thu, 15 Oct 2015 00:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=ygOQbbMuA/BEb5/DOtTJjaddPvNiNHvZyk5NwD1GIbA=; b=Jl2+twHrMv8FWguXJl64pgkm4HFrO5LXZmHNFjjjVdeIHVaewVgghdTBZI9HG3iXsI iGGgKxlirbqajCFR6UOKEs9WH84WaOVLs+JZF2lGj2aoSJxRip/vnMf3c0DyYwPqXTsD /TkSyWKSJ9MWVxKd5warzEf6QnlS2uVgHwQECchlDYYTBcpg2ltGg0CCseY9gTSfbg/c Ho+8KOvmw+rV+cwgrWNFqq7oONhNrqp1Ion1CIyK68gfyU/ZM2O54Tl/kWTdtqcTb4iz 0rEt1rBbAOFQ/OjYlbvQVCVucq3m8iAuleA5QPn10J5AAJ1CeMadPnki2lsmrwBEuWfB KCzg== X-Received: by 10.68.238.69 with SMTP id vi5mr8375123pbc.29.1444893048220; Thu, 15 Oct 2015 00:10:48 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id tz1sm13393427pbc.50.2015.10.15.00.10.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 00:10:47 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , laurent.pinchart+renesas@ideasonboard.com Date: Thu, 15 Oct 2015 16:11:20 +0900 Message-Id: <20151015071120.11093.50169.sendpatchset@little-apple> Subject: [PATCH/RFC] Simplify Gen3 DU and VSP Kconfig bits Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Magnus Damm Simplify the R-Car DU configuration by removing various Kconfig entires. Without this patch the DU driver has the following entries: - CONFIG_DRM_RCAR_DU - CONFIG_DRM_RCAR_HDMI - CONFIG_DRM_RCAR_LVDS - CONFIG_DRM_RCAR_VSP With this patch the required entries are reduced to: - CONFIG_DRM_RCAR_DU This changes simplifies configuration but the downside is obviously larger run time size. We are however talking kilobytes in a world using gigabytes. Signed-off-by: Magnus Damm --- Written against vsp1-kms-gen3-20150929 drivers/gpu/drm/rcar-du/Kconfig | 19 ----------------- drivers/gpu/drm/rcar-du/Makefile | 12 ++++------- drivers/gpu/drm/rcar-du/rcar_du_hdmicon.h | 8 ------- drivers/gpu/drm/rcar-du/rcar_du_hdmienc.h | 9 -------- drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.h | 16 -------------- drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 8 ------- include/media/vsp1.h | 31 +++++++++++++++++++++++++++-- 7 files changed, 34 insertions(+), 69 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/gpu/drm/rcar-du/Kconfig +++ work/drivers/gpu/drm/rcar-du/Kconfig 2015-10-15 15:52:44.670513000 +0900 @@ -11,22 +11,3 @@ config DRM_RCAR_DU help Choose this option if you have an R-Car chipset. If M is selected the module will be called rcar-du-drm. - -config DRM_RCAR_HDMI - bool "R-Car DU HDMI Encoder Support" - depends on DRM_RCAR_DU - help - Enable support for external HDMI encoders. - -config DRM_RCAR_LVDS - bool "R-Car DU LVDS Encoder Support" - depends on DRM_RCAR_DU - help - Enable support for the R-Car Display Unit embedded LVDS encoders. - -config DRM_RCAR_VSP - bool "R-Car DU VSP Compositor Support" - depends on DRM_RCAR_DU - depends on VIDEO_RENESAS_VSP1 - help - Enable support to expose the R-Car VSP Compositor as KMS planes. --- 0001/drivers/gpu/drm/rcar-du/Makefile +++ work/drivers/gpu/drm/rcar-du/Makefile 2015-10-15 15:53:07.890513000 +0900 @@ -5,12 +5,10 @@ rcar-du-drm-y := rcar_du_crtc.o \ rcar_du_kms.o \ rcar_du_lvdscon.o \ rcar_du_plane.o \ - rcar_du_vgacon.o - -rcar-du-drm-$(CONFIG_DRM_RCAR_HDMI) += rcar_du_hdmicon.o \ - rcar_du_hdmienc.o -rcar-du-drm-$(CONFIG_DRM_RCAR_LVDS) += rcar_du_lvdsenc.o - -rcar-du-drm-$(CONFIG_DRM_RCAR_VSP) += rcar_du_vsp.o + rcar_du_vgacon.o \ + rcar_du_hdmicon.o \ + rcar_du_hdmienc.o \ + rcar_du_vsp.o \ + rcar_du_lvdsenc.o obj-$(CONFIG_DRM_RCAR_DU) += rcar-du-drm.o --- 0001/drivers/gpu/drm/rcar-du/rcar_du_hdmicon.h +++ work/drivers/gpu/drm/rcar-du/rcar_du_hdmicon.h 2015-10-15 15:51:36.950513000 +0900 @@ -17,15 +17,7 @@ struct rcar_du_device; struct rcar_du_encoder; -#if IS_ENABLED(CONFIG_DRM_RCAR_HDMI) int rcar_du_hdmi_connector_init(struct rcar_du_device *rcdu, struct rcar_du_encoder *renc); -#else -static inline int rcar_du_hdmi_connector_init(struct rcar_du_device *rcdu, - struct rcar_du_encoder *renc) -{ - return -ENOSYS; -} -#endif #endif /* __RCAR_DU_HDMICON_H__ */ --- 0001/drivers/gpu/drm/rcar-du/rcar_du_hdmienc.h +++ work/drivers/gpu/drm/rcar-du/rcar_du_hdmienc.h 2015-10-15 15:51:36.950513000 +0900 @@ -20,16 +20,7 @@ struct device_node; struct rcar_du_device; struct rcar_du_encoder; -#if IS_ENABLED(CONFIG_DRM_RCAR_HDMI) int rcar_du_hdmienc_init(struct rcar_du_device *rcdu, struct rcar_du_encoder *renc, struct device_node *np); -#else -static inline int rcar_du_hdmienc_init(struct rcar_du_device *rcdu, - struct rcar_du_encoder *renc, - struct device_node *np) -{ - return -ENOSYS; -} -#endif #endif /* __RCAR_DU_HDMIENC_H__ */ --- 0001/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.h +++ work/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.h 2015-10-15 15:54:28.790513000 +0900 @@ -26,26 +26,10 @@ enum rcar_lvds_input { RCAR_LVDS_INPUT_DU2, }; -#if IS_ENABLED(CONFIG_DRM_RCAR_LVDS) int rcar_du_lvdsenc_init(struct rcar_du_device *rcdu); int rcar_du_lvdsenc_enable(struct rcar_du_lvdsenc *lvds, struct drm_crtc *crtc, bool enable); void rcar_du_lvdsenc_atomic_check(struct rcar_du_lvdsenc *lvds, struct drm_display_mode *mode); -#else -static inline int rcar_du_lvdsenc_init(struct rcar_du_device *rcdu) -{ - return 0; -} -static inline int rcar_du_lvdsenc_enable(struct rcar_du_lvdsenc *lvds, - struct drm_crtc *crtc, bool enable) -{ - return 0; -} -static inline void rcar_du_lvdsenc_atomic_check(struct rcar_du_lvdsenc *lvds, - struct drm_display_mode *mode) -{ -} -#endif #endif /* __RCAR_DU_LVDSENC_H__ */ --- 0001/drivers/gpu/drm/rcar-du/rcar_du_vsp.h +++ work/drivers/gpu/drm/rcar-du/rcar_du_vsp.h 2015-10-15 15:55:22.190513000 +0900 @@ -59,18 +59,10 @@ to_rcar_vsp_plane_state(struct drm_plane return container_of(state, struct rcar_du_vsp_plane_state, state); } -#ifdef CONFIG_DRM_RCAR_VSP int rcar_du_vsp_init(struct rcar_du_vsp *vsp); void rcar_du_vsp_enable(struct rcar_du_crtc *crtc); void rcar_du_vsp_disable(struct rcar_du_crtc *crtc); void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc); void rcar_du_vsp_atomic_flush(struct rcar_du_crtc *crtc); -#else -static inline int rcar_du_vsp_init(struct rcar_du_vsp *vsp) { return 0; }; -static inline void rcar_du_vsp_enable(struct rcar_du_crtc *crtc) { }; -static inline void rcar_du_vsp_disable(struct rcar_du_crtc *crtc) { }; -static inline void rcar_du_vsp_atomic_begin(struct rcar_du_crtc *crtc) { }; -static inline void rcar_du_vsp_atomic_flush(struct rcar_du_crtc *crtc) { }; -#endif #endif /* __RCAR_DU_VSP_H__ */ --- 0001/include/media/vsp1.h +++ work/include/media/vsp1.h 2015-10-15 16:00:51.170513000 +0900 @@ -18,16 +18,43 @@ struct device; struct v4l2_rect; +#ifdef CONFIG_VIDEO_RENESAS_VSP1 int vsp1_du_init(struct device *dev); - int vsp1_du_setup_lif(struct device *dev, unsigned int width, unsigned int height); - int vsp1_du_atomic_begin(struct device *dev); int vsp1_du_atomic_update(struct device *dev, unsigned int rpf, u32 pixelformat, unsigned int pitch, dma_addr_t mem[2], const struct v4l2_rect *src, const struct v4l2_rect *dst); int vsp1_du_atomic_flush(struct device *dev); +#else +static inline int vsp1_du_init(struct device *dev) +{ + return -ENOSYS; +} +static inline int vsp1_du_setup_lif(struct device *dev, unsigned int width, + unsigned int height) +{ + return 0; +} +static inline int vsp1_du_atomic_begin(struct device *dev) +{ + return 0; +} +static inline int vsp1_du_atomic_update(struct device *dev, unsigned int rpf, + u32 pixelformat, + unsigned int pitch, dma_addr_t mem[2], + const struct v4l2_rect *src, + const struct v4l2_rect *dst) +{ + return 0; +} +static inline int vsp1_du_atomic_flush(struct device *dev) +{ + return 0; +} + +#endif #endif /* __MEDIA_VSP1_H__ */