aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/dsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/dsi.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 394c129cfb3b..0a485c5b982e 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -5409,11 +5409,14 @@ static int dsi_probe(struct platform_device *pdev)
5409 5409
5410 /* DSI on OMAP3 doesn't have register DSI_GNQ, set number 5410 /* DSI on OMAP3 doesn't have register DSI_GNQ, set number
5411 * of data to 3 by default */ 5411 * of data to 3 by default */
5412 if (dsi->data->quirks & DSI_QUIRK_GNQ) 5412 if (dsi->data->quirks & DSI_QUIRK_GNQ) {
5413 dsi_runtime_get(dsi);
5413 /* NB_DATA_LANES */ 5414 /* NB_DATA_LANES */
5414 dsi->num_lanes_supported = 1 + REG_GET(dsi, DSI_GNQ, 11, 9); 5415 dsi->num_lanes_supported = 1 + REG_GET(dsi, DSI_GNQ, 11, 9);
5415 else 5416 dsi_runtime_put(dsi);
5417 } else {
5416 dsi->num_lanes_supported = 3; 5418 dsi->num_lanes_supported = 3;
5419 }
5417 5420
5418 r = dsi_init_output(dsi); 5421 r = dsi_init_output(dsi);
5419 if (r) 5422 if (r)
@@ -5426,15 +5429,19 @@ static int dsi_probe(struct platform_device *pdev)
5426 } 5429 }
5427 5430
5428 r = of_platform_populate(dev->of_node, NULL, NULL, dev); 5431 r = of_platform_populate(dev->of_node, NULL, NULL, dev);
5429 if (r) 5432 if (r) {
5430 DSSERR("Failed to populate DSI child devices: %d\n", r); 5433 DSSERR("Failed to populate DSI child devices: %d\n", r);
5434 goto err_uninit_output;
5435 }
5431 5436
5432 r = component_add(&pdev->dev, &dsi_component_ops); 5437 r = component_add(&pdev->dev, &dsi_component_ops);
5433 if (r) 5438 if (r)
5434 goto err_uninit_output; 5439 goto err_of_depopulate;
5435 5440
5436 return 0; 5441 return 0;
5437 5442
5443err_of_depopulate:
5444 of_platform_depopulate(dev);
5438err_uninit_output: 5445err_uninit_output:
5439 dsi_uninit_output(dsi); 5446 dsi_uninit_output(dsi);
5440err_pm_disable: 5447err_pm_disable:
@@ -5470,19 +5477,12 @@ static int dsi_runtime_suspend(struct device *dev)
5470 /* wait for current handler to finish before turning the DSI off */ 5477 /* wait for current handler to finish before turning the DSI off */
5471 synchronize_irq(dsi->irq); 5478 synchronize_irq(dsi->irq);
5472 5479
5473 dispc_runtime_put(dsi->dss->dispc);
5474
5475 return 0; 5480 return 0;
5476} 5481}
5477 5482
5478static int dsi_runtime_resume(struct device *dev) 5483static int dsi_runtime_resume(struct device *dev)
5479{ 5484{
5480 struct dsi_data *dsi = dev_get_drvdata(dev); 5485 struct dsi_data *dsi = dev_get_drvdata(dev);
5481 int r;
5482
5483 r = dispc_runtime_get(dsi->dss->dispc);
5484 if (r)
5485 return r;
5486 5486
5487 dsi->is_enabled = true; 5487 dsi->is_enabled = true;
5488 /* ensure the irq handler sees the is_enabled value */ 5488 /* ensure the irq handler sees the is_enabled value */