Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751996AbbKZHEL (ORCPT ); Thu, 26 Nov 2015 02:04:11 -0500 Received: from regular1.263xmail.com ([211.150.99.131]:36234 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbbKZHEJ (ORCPT ); Thu, 26 Nov 2015 02:04:09 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: zyw@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: zyw@rock-chips.com X-UNIQUE-TAG: <2a44aa406ac8fca840932fef4432c4e8> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH v4 06/13] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver To: Thierry Reding References: <1448007339-10966-1-git-send-email-zyw@rock-chips.com> <1448007339-10966-7-git-send-email-zyw@rock-chips.com> <20151120160706.GE3300@ulmo.nvidia.com> Cc: heiko@sntech.de, linux-rockchip@lists.infradead.org, mark.yao@rock-chips.com, emil.l.velikov@gmail.com, airlied@linux.ie, ajaykumar.rs@samsung.com, rmk+kernel@arm.linux.org.uk, dri-devel@lists.freedesktop.org, Inki Dae , Takashi Iwai , Vincent Palatin , Andy Yan , Rahul Sharma , Sean Paul , Andrew Bresticker , linux-kernel@vger.kernel.org From: Chris Zhong Message-ID: <5656AEDA.4080607@rock-chips.com> Date: Thu, 26 Nov 2015 15:03:54 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151120160706.GE3300@ulmo.nvidia.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2080 Lines: 76 Hi Thierry Thanks for your feedback. On 11/21/2015 12:07 AM, Thierry Reding wrote: > On Fri, Nov 20, 2015 at 04:15:32PM +0800, Chris Zhong wrote: >> add Synopsys DesignWare MIPI DSI host controller driver support. >> >> Signed-off-by: Chris Zhong >> --- >> >> Changes in v4: >> eliminate some warnning >> >> Changes in v3: None >> Changes in v2: None >> >> drivers/gpu/drm/bridge/Kconfig | 11 + >> drivers/gpu/drm/bridge/Makefile | 1 + >> drivers/gpu/drm/bridge/dw_mipi_dsi.c | 1056 ++++++++++++++++++++++++++++++++++ >> include/drm/bridge/dw_mipi_dsi.h | 27 + >> 4 files changed, 1095 insertions(+) >> create mode 100644 drivers/gpu/drm/bridge/dw_mipi_dsi.c >> create mode 100644 include/drm/bridge/dw_mipi_dsi.h >> >> >> +struct dw_mipi_dsi { >> + struct mipi_dsi_host dsi_host; >> + struct drm_connector connector; >> + struct drm_encoder *encoder; > struct drm_bridge already has a pointer to an encoder, can't you reuse > that instead? > >> + struct drm_bridge *bridge; > Typically you'd embed the bridge into the driver structure. I'm almost done with all the modifications according to your comments. Remaining this point I can not understand, the dsi is a pointer of drm_bridge, hence I can not get the bridge by container_of. Although, the "bridge->driver_private = dsi" have done in dw_mipi_dsi_register. > >> + struct drm_panel *panel; >> + struct device *dev; >> + >> + void __iomem *base; >> + >> + struct clk *pllref_clk; >> + struct clk *cfg_clk; >> + struct clk *pclk; >> + >> + unsigned int lane_mbps; /* per lane */ >> + u32 channel; >> + u32 lanes; >> + u32 format; >> + u16 input_div; >> + u16 feedback_div; >> + struct drm_display_mode *mode; >> + >> + const struct dw_mipi_dsi_plat_data *pdata; >> + >> + bool enabled; >> +}; >> + >> >> >> Thierry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/