Skip to content

Commit 7c5537c

Browse files
lumagrobertfoss
authored andcommitted
drm/bridge: lt9611uxc: properly attach to a next bridge
If there is a next bridge in the OF graph don't let it be ignored. Attach the next bridge to the chain. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Robert Foss <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a99aff2 commit 7c5537c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/gpu/drm/bridge/lontium-lt9611uxc.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <drm/drm_bridge.h>
2424
#include <drm/drm_edid.h>
2525
#include <drm/drm_mipi_dsi.h>
26+
#include <drm/drm_of.h>
2627
#include <drm/drm_print.h>
2728
#include <drm/drm_probe_helper.h>
2829

@@ -34,6 +35,7 @@
3435
struct lt9611uxc {
3536
struct device *dev;
3637
struct drm_bridge bridge;
38+
struct drm_bridge *next_bridge;
3739
struct drm_connector connector;
3840

3941
struct regmap *regmap;
@@ -358,6 +360,11 @@ static int lt9611uxc_bridge_attach(struct drm_bridge *bridge,
358360
struct lt9611uxc *lt9611uxc = bridge_to_lt9611uxc(bridge);
359361
int ret;
360362

363+
ret = drm_bridge_attach(bridge->encoder, lt9611uxc->next_bridge,
364+
bridge, flags | DRM_BRIDGE_ATTACH_NO_CONNECTOR);
365+
if (ret)
366+
return ret;
367+
361368
if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) {
362369
ret = lt9611uxc_connector_init(bridge, lt9611uxc);
363370
if (ret < 0)
@@ -525,7 +532,7 @@ static int lt9611uxc_parse_dt(struct device *dev,
525532

526533
lt9611uxc->dsi1_node = of_graph_get_remote_node(dev->of_node, 1, -1);
527534

528-
return 0;
535+
return drm_of_find_panel_or_bridge(dev->of_node, 2, -1, NULL, &lt9611uxc->next_bridge);
529536
}
530537

531538
static int lt9611uxc_gpio_init(struct lt9611uxc *lt9611uxc)

0 commit comments

Comments
 (0)