bool enabled;
enum omap_channel channel;
u32 fifo_low, fifo_high;
+
+ /*
+ * True if overlay is to be enabled. Used to check and calculate configs
+ * for the overlay before it is enabled in the HW.
+ */
+ bool enabling;
};
struct mgr_priv_data {
list_for_each_entry(ovl, &mgr->overlays, list) {
op = get_ovl_priv(ovl);
- if (!op->enabled)
+ if (!op->enabled && !op->enabling)
oi = NULL;
else if (applying && op->user_info_dirty)
oi = &op->user_info;
list_for_each_entry(ovl, &mgr->overlays, list) {
op = get_ovl_priv(ovl);
- if (!op->enabled)
+ if (!op->enabled && !op->enabling)
continue;
dss_ovl_setup_fifo(ovl);
spin_lock_irqsave(&data_lock, flags);
- op->enabled = true;
+ op->enabling = true;
+
r = dss_check_settings(ovl->manager, ovl->manager->device);
- op->enabled = false;
if (r) {
DSSERR("failed to enable overlay %d: check_settings failed\n",
ovl->id);
goto err2;
}
- dss_apply_ovl_enable(ovl, true);
-
dss_ovl_setup_fifo(ovl);
+ op->enabling = false;
+ dss_apply_ovl_enable(ovl, true);
+
dss_write_regs();
dss_set_go_bits();
return 0;
err2:
+ op->enabling = false;
spin_unlock_irqrestore(&data_lock, flags);
err1:
mutex_unlock(&apply_lock);