diff options
Diffstat (limited to 'drivers/gpu/drm/imx/parallel-display.c')
-rw-r--r-- | drivers/gpu/drm/imx/parallel-display.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c index 74a9ce40ddc4..b4deb9cf9d71 100644 --- a/drivers/gpu/drm/imx/parallel-display.c +++ b/drivers/gpu/drm/imx/parallel-display.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <drm/drm_panel.h> | 21 | #include <drm/drm_panel.h> |
22 | #include <linux/videodev2.h> | 22 | #include <linux/videodev2.h> |
23 | #include <video/of_display_timing.h> | 23 | #include <video/of_display_timing.h> |
24 | #include <linux/of_graph.h> | ||
24 | 25 | ||
25 | #include "imx-drm.h" | 26 | #include "imx-drm.h" |
26 | 27 | ||
@@ -208,7 +209,7 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) | |||
208 | { | 209 | { |
209 | struct drm_device *drm = data; | 210 | struct drm_device *drm = data; |
210 | struct device_node *np = dev->of_node; | 211 | struct device_node *np = dev->of_node; |
211 | struct device_node *panel_node; | 212 | struct device_node *port; |
212 | const u8 *edidp; | 213 | const u8 *edidp; |
213 | struct imx_parallel_display *imxpd; | 214 | struct imx_parallel_display *imxpd; |
214 | int ret; | 215 | int ret; |
@@ -234,11 +235,19 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) | |||
234 | imxpd->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI; | 235 | imxpd->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI; |
235 | } | 236 | } |
236 | 237 | ||
237 | panel_node = of_parse_phandle(np, "fsl,panel", 0); | 238 | /* port@1 is the output port */ |
238 | if (panel_node) { | 239 | port = of_graph_get_port_by_id(np, 1); |
239 | imxpd->panel = of_drm_find_panel(panel_node); | 240 | if (port) { |
240 | if (!imxpd->panel) | 241 | struct device_node *endpoint, *remote; |
241 | return -EPROBE_DEFER; | 242 | |
243 | endpoint = of_get_child_by_name(port, "endpoint"); | ||
244 | if (endpoint) { | ||
245 | remote = of_graph_get_remote_port_parent(endpoint); | ||
246 | if (remote) | ||
247 | imxpd->panel = of_drm_find_panel(remote); | ||
248 | if (!imxpd->panel) | ||
249 | return -EPROBE_DEFER; | ||
250 | } | ||
242 | } | 251 | } |
243 | 252 | ||
244 | imxpd->dev = dev; | 253 | imxpd->dev = dev; |