Make sure, that we only power on/off the device once.
Signed-off-by: Sebastian Reichel <[email protected]>
---
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index 90132d1d1f5d..7f6b1129862a 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -290,6 +290,9 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
u8 id1, id2, id3;
int r;
+ if (ddata->enabled)
+ return 0;
+
r = regulator_bulk_enable(DCS_REGULATOR_SUPPLY_NUM, ddata->supplies);
if (r) {
dev_err(&ddata->dsi->dev, "failed to enable supplies: %d\n", r);
@@ -354,6 +357,9 @@ static int dsicm_power_off(struct panel_drv_data *ddata)
{
int r;
+ if (!ddata->enabled)
+ return 0;
+
ddata->enabled = 0;
r = mipi_dsi_dcs_set_display_off(ddata->dsi);
--
2.24.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel