diff options
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_dpi.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 0dbe9345fa2e..08915e1765f8 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <drm/drmP.h> | 14 | #include <drm/drmP.h> |
15 | #include <drm/drm_crtc.h> | 15 | #include <drm/drm_crtc.h> |
16 | #include <drm/drm_crtc_helper.h> | 16 | #include <drm/drm_crtc_helper.h> |
17 | #include <drm/drm_of.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/component.h> | 19 | #include <linux/component.h> |
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
@@ -668,7 +669,6 @@ static int mtk_dpi_probe(struct platform_device *pdev) | |||
668 | struct device *dev = &pdev->dev; | 669 | struct device *dev = &pdev->dev; |
669 | struct mtk_dpi *dpi; | 670 | struct mtk_dpi *dpi; |
670 | struct resource *mem; | 671 | struct resource *mem; |
671 | struct device_node *bridge_node; | ||
672 | int comp_id; | 672 | int comp_id; |
673 | int ret; | 673 | int ret; |
674 | 674 | ||
@@ -714,16 +714,12 @@ static int mtk_dpi_probe(struct platform_device *pdev) | |||
714 | return -EINVAL; | 714 | return -EINVAL; |
715 | } | 715 | } |
716 | 716 | ||
717 | bridge_node = of_graph_get_remote_node(dev->of_node, 0, 0); | 717 | ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, |
718 | if (!bridge_node) | 718 | NULL, &dpi->bridge); |
719 | return -ENODEV; | 719 | if (ret) |
720 | 720 | return ret; | |
721 | dev_info(dev, "Found bridge node: %pOF\n", bridge_node); | ||
722 | 721 | ||
723 | dpi->bridge = of_drm_find_bridge(bridge_node); | 722 | dev_info(dev, "Found bridge node: %pOF\n", dpi->bridge->of_node); |
724 | of_node_put(bridge_node); | ||
725 | if (!dpi->bridge) | ||
726 | return -EPROBE_DEFER; | ||
727 | 723 | ||
728 | comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DPI); | 724 | comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DPI); |
729 | if (comp_id < 0) { | 725 | if (comp_id < 0) { |