The LCDC port is the first in the list of the output ports in MDP4.
Mention this explicitly in the driver.

Signed-off-by: Archit Taneja <architt at codeaurora.org>
---
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c 
b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
index f8e0cea..cd129f4 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
@@ -263,9 +263,13 @@ static struct device_node *mdp4_detect_lcdc_panel(struct 
drm_device *dev)
        struct device_node *endpoint, *panel_node;
        struct device_node *np = dev->dev->of_node;

-       endpoint = of_graph_get_next_endpoint(np, NULL);
+       /*
+        * LCDC/LVDS is the first port described in the list of ports in the
+        * MDP4 DT node.
+        */
+       endpoint = of_graph_get_endpoint_by_regs(np, 0, -1);
        if (!endpoint) {
-               DBG("no endpoint in MDP4 to fetch LVDS panel\n");
+               DBG("no LVDS panel remote endpoint\n");
                return NULL;
        }

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

Reply via email to