summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2017-03-22 08:26:06 -0500
committerSean Paul <seanpaul@chromium.org>2017-04-06 17:00:27 -0400
commit86418f90a4c1a0073db65d8a1e2bf94421117a60 (patch)
treea82b9534e5f5c89ceeaa93abaad71da000c7f8d3 /drivers/gpu/drm/msm
parent1f2db3034c9f16ed918e34809167546f21d0fcb4 (diff)
downloadop-kernel-dev-86418f90a4c1a0073db65d8a1e2bf94421117a60.zip
op-kernel-dev-86418f90a4c1a0073db65d8a1e2bf94421117a60.tar.gz
drm: convert drivers to use of_graph_get_remote_node
Convert drivers to use the new of_graph_get_remote_node() helper instead of parsing the endpoint node and then getting the remote device node. Now drivers can just specify the device node and which port/endpoint and get back the connected remote device node. The details of the graph binding are nicely abstracted into the core OF graph code. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Liviu Dudau <liviu.dudau@arm.com> Tested-by: Eric Anholt <eric@anholt.net> Tested-by: Jyri Sarha <jsarha@ti.com> Tested by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_host.c2
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c28
2 files changed, 2 insertions, 28 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 4f79b10..f97a780 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1635,7 +1635,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host)
}
/* Get panel node from the output port's endpoint data */
- device_node = of_graph_get_remote_port_parent(endpoint);
+ device_node = of_graph_get_remote_node(np, 1, 0);
if (!device_node) {
dev_dbg(dev, "%s: no valid device\n", __func__);
goto err;
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
index a4e1206..5b6516b 100644
--- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
+++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
@@ -225,32 +225,6 @@ int mdp4_enable(struct mdp4_kms *mdp4_kms)
return 0;
}
-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;
-
- /*
- * LVDS/LCDC 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 LVDS remote endpoint\n");
- return NULL;
- }
-
- panel_node = of_graph_get_remote_port_parent(endpoint);
- if (!panel_node) {
- DBG("no valid panel node in LVDS endpoint\n");
- of_node_put(endpoint);
- return NULL;
- }
-
- of_node_put(endpoint);
-
- return panel_node;
-}
static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms,
int intf_type)
@@ -269,7 +243,7 @@ static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms,
* bail out early if there is no panel node (no need to
* initialize LCDC encoder and LVDS connector)
*/
- panel_node = mdp4_detect_lcdc_panel(dev);
+ panel_node = of_graph_get_remote_node(dev->dev->of_node, 0, 0);
if (!panel_node)
return 0;
OpenPOWER on IntegriCloud