diff options
| -rw-r--r-- | drivers/gpu/drm/exynos/exynos_dp_core.c | 55 | ||||
| -rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dsi.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 6 |
3 files changed, 29 insertions, 38 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index b79c316c2ad2..673164b331c8 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c | |||
| @@ -1392,7 +1392,7 @@ static const struct component_ops exynos_dp_ops = { | |||
| 1392 | static int exynos_dp_probe(struct platform_device *pdev) | 1392 | static int exynos_dp_probe(struct platform_device *pdev) |
| 1393 | { | 1393 | { |
| 1394 | struct device *dev = &pdev->dev; | 1394 | struct device *dev = &pdev->dev; |
| 1395 | struct device_node *panel_node = NULL, *bridge_node, *endpoint = NULL; | 1395 | struct device_node *np = NULL, *endpoint = NULL; |
| 1396 | struct exynos_dp_device *dp; | 1396 | struct exynos_dp_device *dp; |
| 1397 | int ret; | 1397 | int ret; |
| 1398 | 1398 | ||
| @@ -1404,41 +1404,36 @@ static int exynos_dp_probe(struct platform_device *pdev) | |||
| 1404 | platform_set_drvdata(pdev, dp); | 1404 | platform_set_drvdata(pdev, dp); |
| 1405 | 1405 | ||
| 1406 | /* This is for the backward compatibility. */ | 1406 | /* This is for the backward compatibility. */ |
| 1407 | panel_node = of_parse_phandle(dev->of_node, "panel", 0); | 1407 | np = of_parse_phandle(dev->of_node, "panel", 0); |
| 1408 | if (panel_node) { | 1408 | if (np) { |
| 1409 | dp->panel = of_drm_find_panel(panel_node); | 1409 | dp->panel = of_drm_find_panel(np); |
| 1410 | of_node_put(panel_node); | 1410 | of_node_put(np); |
| 1411 | if (!dp->panel) | 1411 | if (!dp->panel) |
| 1412 | return -EPROBE_DEFER; | 1412 | return -EPROBE_DEFER; |
| 1413 | } else { | ||
| 1414 | endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); | ||
| 1415 | if (endpoint) { | ||
| 1416 | panel_node = of_graph_get_remote_port_parent(endpoint); | ||
| 1417 | if (panel_node) { | ||
| 1418 | dp->panel = of_drm_find_panel(panel_node); | ||
| 1419 | of_node_put(panel_node); | ||
| 1420 | if (!dp->panel) | ||
| 1421 | return -EPROBE_DEFER; | ||
| 1422 | } else { | ||
| 1423 | DRM_ERROR("no port node for panel device.\n"); | ||
| 1424 | return -EINVAL; | ||
| 1425 | } | ||
| 1426 | } | ||
| 1427 | } | ||
| 1428 | |||
| 1429 | if (endpoint) | ||
| 1430 | goto out; | 1413 | goto out; |
| 1414 | } | ||
| 1431 | 1415 | ||
| 1432 | endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); | 1416 | endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); |
| 1433 | if (endpoint) { | 1417 | if (endpoint) { |
| 1434 | bridge_node = of_graph_get_remote_port_parent(endpoint); | 1418 | np = of_graph_get_remote_port_parent(endpoint); |
| 1435 | if (bridge_node) { | 1419 | if (np) { |
| 1436 | dp->ptn_bridge = of_drm_find_bridge(bridge_node); | 1420 | /* The remote port can be either a panel or a bridge */ |
| 1437 | of_node_put(bridge_node); | 1421 | dp->panel = of_drm_find_panel(np); |
| 1438 | if (!dp->ptn_bridge) | 1422 | if (!dp->panel) { |
| 1439 | return -EPROBE_DEFER; | 1423 | dp->ptn_bridge = of_drm_find_bridge(np); |
| 1440 | } else | 1424 | if (!dp->ptn_bridge) { |
| 1441 | return -EPROBE_DEFER; | 1425 | of_node_put(np); |
| 1426 | return -EPROBE_DEFER; | ||
| 1427 | } | ||
| 1428 | } | ||
| 1429 | of_node_put(np); | ||
| 1430 | } else { | ||
| 1431 | DRM_ERROR("no remote endpoint device node found.\n"); | ||
| 1432 | return -EINVAL; | ||
| 1433 | } | ||
| 1434 | } else { | ||
| 1435 | DRM_ERROR("no port endpoint subnode found.\n"); | ||
| 1436 | return -EINVAL; | ||
| 1442 | } | 1437 | } |
| 1443 | 1438 | ||
| 1444 | out: | 1439 | out: |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index d84a498ef099..e977a81af2e6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c | |||
| @@ -1906,8 +1906,7 @@ static int exynos_dsi_remove(struct platform_device *pdev) | |||
| 1906 | return 0; | 1906 | return 0; |
| 1907 | } | 1907 | } |
| 1908 | 1908 | ||
| 1909 | #ifdef CONFIG_PM | 1909 | static int __maybe_unused exynos_dsi_suspend(struct device *dev) |
| 1910 | static int exynos_dsi_suspend(struct device *dev) | ||
| 1911 | { | 1910 | { |
| 1912 | struct drm_encoder *encoder = dev_get_drvdata(dev); | 1911 | struct drm_encoder *encoder = dev_get_drvdata(dev); |
| 1913 | struct exynos_dsi *dsi = encoder_to_dsi(encoder); | 1912 | struct exynos_dsi *dsi = encoder_to_dsi(encoder); |
| @@ -1938,7 +1937,7 @@ static int exynos_dsi_suspend(struct device *dev) | |||
| 1938 | return 0; | 1937 | return 0; |
| 1939 | } | 1938 | } |
| 1940 | 1939 | ||
| 1941 | static int exynos_dsi_resume(struct device *dev) | 1940 | static int __maybe_unused exynos_dsi_resume(struct device *dev) |
| 1942 | { | 1941 | { |
| 1943 | struct drm_encoder *encoder = dev_get_drvdata(dev); | 1942 | struct drm_encoder *encoder = dev_get_drvdata(dev); |
| 1944 | struct exynos_dsi *dsi = encoder_to_dsi(encoder); | 1943 | struct exynos_dsi *dsi = encoder_to_dsi(encoder); |
| @@ -1972,7 +1971,6 @@ err_clk: | |||
| 1972 | 1971 | ||
| 1973 | return ret; | 1972 | return ret; |
| 1974 | } | 1973 | } |
| 1975 | #endif | ||
| 1976 | 1974 | ||
| 1977 | static const struct dev_pm_ops exynos_dsi_pm_ops = { | 1975 | static const struct dev_pm_ops exynos_dsi_pm_ops = { |
| 1978 | SET_RUNTIME_PM_OPS(exynos_dsi_suspend, exynos_dsi_resume, NULL) | 1976 | SET_RUNTIME_PM_OPS(exynos_dsi_suspend, exynos_dsi_resume, NULL) |
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index b5fbc1cbf024..0a5a60005f7e 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
| @@ -1289,8 +1289,7 @@ static int mixer_remove(struct platform_device *pdev) | |||
| 1289 | return 0; | 1289 | return 0; |
| 1290 | } | 1290 | } |
| 1291 | 1291 | ||
| 1292 | #ifdef CONFIG_PM_SLEEP | 1292 | static int __maybe_unused exynos_mixer_suspend(struct device *dev) |
| 1293 | static int exynos_mixer_suspend(struct device *dev) | ||
| 1294 | { | 1293 | { |
| 1295 | struct mixer_context *ctx = dev_get_drvdata(dev); | 1294 | struct mixer_context *ctx = dev_get_drvdata(dev); |
| 1296 | struct mixer_resources *res = &ctx->mixer_res; | 1295 | struct mixer_resources *res = &ctx->mixer_res; |
| @@ -1306,7 +1305,7 @@ static int exynos_mixer_suspend(struct device *dev) | |||
| 1306 | return 0; | 1305 | return 0; |
| 1307 | } | 1306 | } |
| 1308 | 1307 | ||
| 1309 | static int exynos_mixer_resume(struct device *dev) | 1308 | static int __maybe_unused exynos_mixer_resume(struct device *dev) |
| 1310 | { | 1309 | { |
| 1311 | struct mixer_context *ctx = dev_get_drvdata(dev); | 1310 | struct mixer_context *ctx = dev_get_drvdata(dev); |
| 1312 | struct mixer_resources *res = &ctx->mixer_res; | 1311 | struct mixer_resources *res = &ctx->mixer_res; |
| @@ -1342,7 +1341,6 @@ static int exynos_mixer_resume(struct device *dev) | |||
| 1342 | 1341 | ||
| 1343 | return 0; | 1342 | return 0; |
| 1344 | } | 1343 | } |
| 1345 | #endif | ||
| 1346 | 1344 | ||
| 1347 | static const struct dev_pm_ops exynos_mixer_pm_ops = { | 1345 | static const struct dev_pm_ops exynos_mixer_pm_ops = { |
| 1348 | SET_RUNTIME_PM_OPS(exynos_mixer_suspend, exynos_mixer_resume, NULL) | 1346 | SET_RUNTIME_PM_OPS(exynos_mixer_suspend, exynos_mixer_resume, NULL) |
