struct omap_overlay_info info;
- u32 fifo_low;
- u32 fifo_high;
-
bool extra_info_dirty;
bool shadow_extra_info_dirty;
bool enabled;
enum omap_channel channel;
+ u32 fifo_low, fifo_high;
};
struct mgr_priv_data {
return;
}
- dispc_ovl_set_fifo_threshold(ovl->id, op->fifo_low, op->fifo_high);
-
mp = get_mgr_priv(ovl->manager);
op->dirty = false;
dispc_ovl_enable(ovl->id, op->enabled);
dispc_ovl_set_channel_out(ovl->id, op->channel);
+ dispc_ovl_set_fifo_threshold(ovl->id, op->fifo_low, op->fifo_high);
mp = get_mgr_priv(ovl->manager);
mp->info = mp->user_info;
}
-static void omap_dss_mgr_apply_ovl_fifos(struct omap_overlay *ovl)
+int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
{
- struct ovl_priv_data *op;
+ int r;
+ unsigned long flags;
+ struct omap_overlay *ovl;
+
+ DSSDBG("omap_dss_mgr_apply(%s)\n", mgr->name);
+
+ r = dispc_runtime_get();
+ if (r)
+ return r;
+
+ spin_lock_irqsave(&data_lock, flags);
+
+ /* Configure overlays */
+ list_for_each_entry(ovl, &mgr->overlays, list)
+ omap_dss_mgr_apply_ovl(ovl);
+
+ /* Configure manager */
+ omap_dss_mgr_apply_mgr(mgr);
+
+ dss_write_regs();
+
+ spin_unlock_irqrestore(&data_lock, flags);
+
+ dispc_runtime_put();
+
+ return r;
+}
+
+static void dss_ovl_setup_fifo(struct omap_overlay *ovl)
+{
+ struct ovl_priv_data *op = get_ovl_priv(ovl);
struct omap_dss_device *dssdev;
u32 size, burst_size;
-
- op = get_ovl_priv(ovl);
+ u32 fifo_low, fifo_high;
dssdev = ovl->manager->device;
case OMAP_DISPLAY_TYPE_VENC:
case OMAP_DISPLAY_TYPE_HDMI:
default_get_overlay_fifo_thresholds(ovl->id, size,
- burst_size, &op->fifo_low,
- &op->fifo_high);
+ burst_size, &fifo_low, &fifo_high);
break;
#ifdef CONFIG_OMAP2_DSS_DSI
case OMAP_DISPLAY_TYPE_DSI:
dsi_get_overlay_fifo_thresholds(ovl->id, size,
- burst_size, &op->fifo_low,
- &op->fifo_high);
+ burst_size, &fifo_low, &fifo_high);
break;
#endif
default:
BUG();
}
+
+ op->fifo_low = fifo_low;
+ op->fifo_high = fifo_high;
+ op->extra_info_dirty = true;
}
-int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
+static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr)
{
- int r;
- unsigned long flags;
struct omap_overlay *ovl;
+ struct ovl_priv_data *op;
+ struct mgr_priv_data *mp;
- DSSDBG("omap_dss_mgr_apply(%s)\n", mgr->name);
-
- r = dispc_runtime_get();
- if (r)
- return r;
-
- spin_lock_irqsave(&data_lock, flags);
-
- /* Configure overlays */
- list_for_each_entry(ovl, &mgr->overlays, list)
- omap_dss_mgr_apply_ovl(ovl);
-
- /* Configure manager */
- omap_dss_mgr_apply_mgr(mgr);
-
- /* Configure overlay fifos */
- list_for_each_entry(ovl, &mgr->overlays, list)
- omap_dss_mgr_apply_ovl_fifos(ovl);
+ mp = get_mgr_priv(mgr);
- dss_write_regs();
+ if (!mp->enabled)
+ return;
- spin_unlock_irqrestore(&data_lock, flags);
+ list_for_each_entry(ovl, &mgr->overlays, list) {
+ op = get_ovl_priv(ovl);
- dispc_runtime_put();
+ if (!op->enabled)
+ continue;
- return r;
+ dss_ovl_setup_fifo(ovl);
+ }
}
void dss_mgr_enable(struct omap_overlay_manager *mgr)
mp->enabled = true;
+ dss_mgr_setup_fifos(mgr);
+
dss_write_regs();
if (!mgr_manual_update(mgr))
op->enabled = true;
op->extra_info_dirty = true;
+ dss_ovl_setup_fifo(ovl);
+
dss_write_regs();
spin_unlock_irqrestore(&data_lock, flags);