]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/msm/dsi: Modify port parsing
authorArchit Taneja <architt@codeaurora.org>
Wed, 27 Apr 2016 10:06:53 +0000 (15:36 +0530)
committerRob Clark <robdclark@gmail.com>
Sat, 16 Jul 2016 14:08:46 +0000 (10:08 -0400)
The DSI interface is going to have two ports defined in its device node.
The first port is always going to be the link between the MDP output
and the input to DSI, the second port is going to be the link between
the DSI output and the connected panel/bridge:

 -----           -----           -------
| MDP | ------> | DSI | ------> | Panel |
 -----           -----           -------
        (Port 0)       (Port 1)

Until now, there was only one Port representing the output. Update the
DSI host driver such that it parses Port #1 for a connected device.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/dsi/dsi_host.c

index a3e47ad83eb398f1e1c803eb86d0c2a8b13885d5..4f1335e47f5ecfb17821df74f6e2b51fcf097028 100644 (file)
@@ -1602,12 +1602,12 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host)
        }
 
        /*
-        * Get the first endpoint node. In our case, dsi has one output port
-        * to which the panel is connected. Don't return an error if a port
-        * isn't defined. It's possible that there is nothing connected to
-        * the dsi output.
+        * Get the endpoint of the output port of the DSI host. In our case,
+        * this is mapped to port number with reg = 1. Don't return an error if
+        * the remote endpoint isn't defined. It's possible that there is
+        * nothing connected to the dsi output.
         */
-       endpoint = of_graph_get_next_endpoint(np, NULL);
+       endpoint = of_graph_get_endpoint_by_regs(np, 1, -1);
        if (!endpoint) {
                dev_dbg(dev, "%s: no endpoint\n", __func__);
                return 0;