@@ -1174,6 +1174,29 @@ void dispc_set_burst_size(enum omap_plane plane,
enable_clocks(0);
}
+void dispc_set_zorder(enum omap_plane plane,
+ enum omap_overlay_zorder zorder)
+{
+ u32 val;
+
+ if (!cpu_is_omap44xx())
+ return;
+ val = dispc_read_reg(dispc_reg_att[plane]);
+ val = FLD_MOD(val, zorder, 27, 26);
+ dispc_write_reg(dispc_reg_att[plane], val);
+}
+
+void dispc_enable_zorder(enum omap_plane plane, bool enable)
+{
+ u32 val;
+
+ if (!cpu_is_omap44xx())
+ return;
+ val = dispc_read_reg(dispc_reg_att[plane]);
+ val = FLD_MOD(val, enable, 25, 25);
+ dispc_write_reg(dispc_reg_att[plane], val);
+}
+
static void _dispc_set_vid_color_conv(enum omap_plane plane, bool enable)
{
u32 val;
@@ -343,6 +343,9 @@ void dispc_setup_plane_fifo(enum omap_plane plane, u32 low, u32 high);
void dispc_enable_fifomerge(bool enable);
void dispc_set_burst_size(enum omap_plane plane,
enum omap_burst_size burst_size);
+void dispc_set_zorder(enum omap_plane plane,
+ enum omap_overlay_zorder zorder);
+void dispc_enable_zorder(enum omap_plane plane, bool enable);
void dispc_set_plane_ba0(enum omap_plane plane, u32 paddr);
void dispc_set_plane_ba1(enum omap_plane plane, u32 paddr);
@@ -417,6 +417,7 @@ struct overlay_cache_data {
u32 fifo_high;
bool manual_update;
+ enum omap_overlay_zorder zorder;
};
struct manager_cache_data {
@@ -864,6 +865,8 @@ static int configure_overlay(enum omap_plane plane)
dispc_enable_replication(plane, c->replication);
dispc_set_burst_size(plane, c->burst_size);
+ dispc_set_zorder(plane, c->zorder);
+ dispc_enable_zorder(plane, 1);
dispc_setup_plane_fifo(plane, c->fifo_low, c->fifo_high);
dispc_enable_plane(plane, 1);
@@ -1276,6 +1279,7 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
oc->out_width = ovl->info.out_width;
oc->out_height = ovl->info.out_height;
oc->global_alpha = ovl->info.global_alpha;
+ oc->zorder = ovl->info.zorder;
oc->replication =
dss_use_replication(dssdev, ovl->info.color_mode);