linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] drm/bridge: Add ICN6211 MIPI-DSI/RGB bridge
@ 2019-05-24 10:41 Jagan Teki
  2019-05-24 10:41 ` [PATCH v2 1/6] drm/sun4i: dsi: Use drm panel_or_bridge call Jagan Teki
  0 siblings, 1 reply; 2+ messages in thread
From: Jagan Teki @ 2019-05-24 10:41 UTC (permalink / raw)
  To: Andrzej Hajda, Laurent Pinchart, Chen-Yu Tsai, Maxime Ripard,
	David Airlie, Daniel Vetter, Rob Herring, Mark Rutland
  Cc: Michael Trimarchi, dri-devel, linux-kernel, devicetree,
	linux-arm-kernel, linux-sunxi, linux-amarula, Jagan Teki

drm/bridge: Add ICN6211 MIPI-DSI/RGB bridge

This is v2 series for supporting Chipone ICN6211 DSI/RGB bridge,
here is the previous version set[1]

The overlay patch, has Bananapi panel which would depends on,
previous MIPI DSI fixes series[2] to make the panel works.

Changes for v2:
- use panel_or_bridge for finding panel and bridge
- add panel overlay dts patch for port based panel enablement
- update the bridge sequence dynamically, by getting mode
  timings from panel-simple
- correct the brinding compatible
- add more information in binding example
- replace the bridge detach with proper ops
- add bridge overlay dts patch for port based panel enablement

[2] https://patchwork.freedesktop.org/series/60847/
[1] https://patchwork.freedesktop.org/series/58060/

Any inputs?
Jagan.

Jagan Teki (6):
  drm/sun4i: dsi: Use drm panel_or_bridge call
  [DO NOT MERGE] ARM: dts: sun8i: bananapi-m2m: Enable Bananapi S070WV20-CT16 DSI panel
  drm/sun4i: dsi: Add bridge support
  dt-bindings: display: bridge: Add ICN6211 MIPI-DSI to RGB converter bridge
  drm/bridge: Add Chipone ICN6211 MIPI-DSI/RGB converter bridge
  [DO NOT MERGE] ARM: dts: sun8i: bananapi-m2m: Enable Bananapi S070WV20-CT16 DSI panel

 .../display/bridge/chipone,icn6211.txt        |  78 ++++
 MAINTAINERS                                   |   6 +
 arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts  |  86 +++++
 drivers/gpu/drm/bridge/Kconfig                |  10 +
 drivers/gpu/drm/bridge/Makefile               |   1 +
 drivers/gpu/drm/bridge/chipone-icn6211.c      | 344 ++++++++++++++++++
 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c        |  67 +++-
 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h        |   1 +
 8 files changed, 575 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/chipone,icn6211.txt
 create mode 100644 drivers/gpu/drm/bridge/chipone-icn6211.c

-- 
2.18.0.321.gffc6fa0e3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v2 1/6] drm/sun4i: dsi: Use drm panel_or_bridge call
  2019-05-24 10:41 [PATCH v2 0/6] drm/bridge: Add ICN6211 MIPI-DSI/RGB bridge Jagan Teki
@ 2019-05-24 10:41 ` Jagan Teki
  0 siblings, 0 replies; 2+ messages in thread
From: Jagan Teki @ 2019-05-24 10:41 UTC (permalink / raw)
  To: Andrzej Hajda, Laurent Pinchart, Chen-Yu Tsai, Maxime Ripard,
	David Airlie, Daniel Vetter, Rob Herring, Mark Rutland
  Cc: Michael Trimarchi, dri-devel, linux-kernel, devicetree,
	linux-arm-kernel, linux-sunxi, linux-amarula, Jagan Teki,
	Paul Kocialkowski

Right now the driver is finding the panel using of_drm_find_panel,
replace the same with drm_of_find_panel_or_bridge which would help
to find the panel or bridge on the same call if bridge support added
in future.

Added NULL in bridge argument, same will replace with bridge parameter
once bridge supported.

Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
index 65771e9a343a..ae2fe31b05b1 100644
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
@@ -21,6 +21,7 @@
 #include <drm/drmP.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_mipi_dsi.h>
+#include <drm/drm_of.h>
 #include <drm/drm_panel.h>
 #include <drm/drm_probe_helper.h>
 
@@ -964,11 +965,13 @@ static int sun6i_dsi_attach(struct mipi_dsi_host *host,
 			    struct mipi_dsi_device *device)
 {
 	struct sun6i_dsi *dsi = host_to_sun6i_dsi(host);
+	int ret;
 
 	dsi->device = device;
-	dsi->panel = of_drm_find_panel(device->dev.of_node);
-	if (IS_ERR(dsi->panel))
-		return PTR_ERR(dsi->panel);
+	ret = drm_of_find_panel_or_bridge(host->dev->of_node, 0, 0,
+					  &dsi->panel, NULL);
+	if (ret)
+		return ret;
 
 	dev_info(host->dev, "Attached device %s\n", device->name);
 
-- 
2.18.0.321.gffc6fa0e3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-24 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 10:41 [PATCH v2 0/6] drm/bridge: Add ICN6211 MIPI-DSI/RGB bridge Jagan Teki
2019-05-24 10:41 ` [PATCH v2 1/6] drm/sun4i: dsi: Use drm panel_or_bridge call Jagan Teki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).