On Fri, Nov 20, 2015 at 04:15:32PM +0800, Chris Zhong wrote:I'm almost done with all the modifications according to your comments.
add Synopsys DesignWare MIPI DSI host controller driver support.struct drm_bridge already has a pointer to an encoder, can't you reuse
Signed-off-by: Chris Zhong <zyw@xxxxxxxxxxxxxx>
---
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;
that instead?
+ struct drm_bridge *bridge;Typically you'd embed the bridge into the driver structure.
+ 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