/* it seems we have to wait a bit until taal is ready */
msleep(5);
- dsi_bus_lock();
-
r = omapdss_dsi_display_enable(dssdev);
if (r) {
dev_err(&dssdev->dev, "failed to enable DSI\n");
omapdss_dsi_vc_enable_hs(TCH, true);
- dsi_bus_unlock();
-
return 0;
err:
dev_err(&dssdev->dev, "error while enabling panel, issuing HW reset\n");
omapdss_dsi_display_disable(dssdev);
err0:
- dsi_bus_unlock();
-
return r;
}
struct taal_data *td = dev_get_drvdata(&dssdev->dev);
int r;
- dsi_bus_lock();
-
cancel_delayed_work(&td->esd_work);
r = taal_dcs_write_0(DCS_DISPLAY_OFF);
omapdss_dsi_display_disable(dssdev);
td->enabled = 0;
-
- dsi_bus_unlock();
}
static int taal_enable(struct omap_dss_device *dssdev)
goto err;
}
+ dsi_bus_lock();
+
r = taal_power_on(dssdev);
+
+ dsi_bus_unlock();
+
if (r)
goto err;
mutex_lock(&td->lock);
+ dsi_bus_lock();
+
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
taal_power_off(dssdev);
+ dsi_bus_unlock();
+
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
mutex_unlock(&td->lock);
goto err;
}
+ dsi_bus_lock();
+
taal_power_off(dssdev);
+
+ dsi_bus_unlock();
+
dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
mutex_unlock(&td->lock);
goto err;
}
+ dsi_bus_lock();
+
r = taal_power_on(dssdev);
+
+ dsi_bus_unlock();
+
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
mutex_unlock(&td->lock);