summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorRobert Chiras <robert.chiras@nxp.com>2017-11-09 14:01:35 +0200
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:29:20 +0800
commitbe71ddf1ea90e33a5d7988de1a542fa20f0d377f (patch)
tree87583e4eeea169cbcf6707ad0e1e2bcacdd7133e /include/drm
parentefa43b4c018ab4338703a1d01552f857c9cd30e4 (diff)
MLK-16918-5: drm: Implement NWL MIPI-DSI as a real drm_bridge
Currently, the Northwest Logic MIPI-DSI controller host specific code resides under drm/bridge, but is not a real drm_bridge. It creates a drm_bridge and adds itself to the drm_encoder that handles this file, but this is wrong, since it does not implement the drm_bridge_funcs. The correct way to implement a drm_bridge is to add the drm_bridge and let other components (another bridge or a drm_encoder) to attach to this bridge. Since we are doing this, a new compatible strings can be used for this driver: "nwl,mipi-dsi". Since this was used by nwl_dsi-imx.c, update that driver to use this bridge correctly. This is needed in order to add support for MIPI-DSI on 8MQ. The IMX_NWL driver will either add a DSI encoder to DRM, or a DSI bridge. The encoder will be used by imx-drm-core driver, while the bridge will be used by MXSFB driver (which creates a simple display pipe). Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/bridge/nwl_dsi.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/drm/bridge/nwl_dsi.h b/include/drm/bridge/nwl_dsi.h
index ae2054157577..11a7bef6d5c1 100644
--- a/include/drm/bridge/nwl_dsi.h
+++ b/include/drm/bridge/nwl_dsi.h
@@ -28,11 +28,17 @@ enum dpi_pixel_format {
DPI_24_BIT
};
-unsigned long nwl_dsi_get_bit_clock(struct drm_encoder *encoder,
- unsigned long pixclock);
+/*
+ * Just some helper functions to add/remove a bridge into/from encoder bridge
+ * chain.
+ */
+bool nwl_dsi_add_bridge(struct drm_encoder *encoder,
+ struct drm_bridge *next_bridge);
-int nwl_dsi_bind(struct device *dev, struct drm_encoder *encoder,
- struct phy *phy, struct resource *res, int irq);
-void nwl_dsi_unbind(struct drm_bridge *bridge);
+bool nwl_dsi_del_bridge(struct drm_encoder *encoder,
+ struct drm_bridge *bridge);
+
+unsigned long nwl_dsi_get_bit_clock(struct drm_bridge *bridge,
+ unsigned long pixclock);
#endif /* __NWL_DSI_H__ */