Add checks to dss_mgr_enable, dss_mgr_disable, dss_ovl_enable,
dss_ovl_disable that check if the state is already the same as given in
the parameters, and exit if so.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
mutex_lock(&apply_lock);
+ if (mp->enabled)
+ goto out;
+
spin_lock_irqsave(&data_lock, flags);
mp->enabled = true;
if (!mgr_manual_update(mgr))
dispc_mgr_enable(mgr->id, true);
+out:
mutex_unlock(&apply_lock);
}
mutex_lock(&apply_lock);
+ if (!mp->enabled)
+ goto out;
+
if (!mgr_manual_update(mgr))
dispc_mgr_enable(mgr->id, false);
spin_unlock_irqrestore(&data_lock, flags);
+out:
mutex_unlock(&apply_lock);
}
mutex_lock(&apply_lock);
+ if (op->enabled) {
+ r = 0;
+ goto err;
+ }
+
if (ovl->manager == NULL || ovl->manager->device == NULL) {
r = -EINVAL;
goto err;
mutex_lock(&apply_lock);
+ if (!op->enabled) {
+ r = 0;
+ goto err;
+ }
+
if (ovl->manager == NULL || ovl->manager->device == NULL) {
r = -EINVAL;
goto err;