summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMythri P K <mythripk@ti.com>2010-08-06 15:49:14 +0530
committerMayuresh Janorkar <mayur@ti.com>2010-08-12 20:12:14 +0530
commita3216ab87cc66a159eb25d1022de03d520449eeb (patch)
treebd2160bcf6e45bd99ba5d823e00c1ec4669ff714
parent78a56ba72ccc6e4af369ae2b3b89346f57bcb53b (diff)
OMAP:DSS:Patch to add flush of WB This will clear the output to WB in the VID* Attributes
Signed-off-by: Mythri P K <mythripk@ti.com>
-rw-r--r--arch/arm/plat-omap/include/plat/display.h2
-rw-r--r--drivers/media/video/omap/omap_wb.c1
-rw-r--r--drivers/video/omap2/dss/dispc.c16
-rw-r--r--[-rwxr-xr-x]drivers/video/omap2/dss/dss.h1
-rw-r--r--[-rwxr-xr-x]drivers/video/omap2/dss/manager.c34
5 files changed, 43 insertions, 11 deletions
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h
index 6d8b48dc1be2..85def726feae 100644
--- a/arch/arm/plat-omap/include/plat/display.h
+++ b/arch/arm/plat-omap/include/plat/display.h
@@ -475,6 +475,8 @@ struct omap_writeback_info {
enum omap_writeback_source_type source_type;
unsigned long width;
unsigned long height;
+ unsigned long out_width;
+ unsigned long out_height;
enum omap_color_mode dss_mode;
enum omap_writeback_capturemode capturemode;
unsigned long paddr;
diff --git a/drivers/media/video/omap/omap_wb.c b/drivers/media/video/omap/omap_wb.c
index fbeb4ded4e96..c39a79da4c6d 100644
--- a/drivers/media/video/omap/omap_wb.c
+++ b/drivers/media/video/omap/omap_wb.c
@@ -68,6 +68,7 @@ enum omap_color_mode video_mode_to_dss_mode(
struct v4l2_pix_format *pix);
void omap_wb_isr(void *arg, unsigned int irqstatus);
int omap_dss_wb_apply(struct omap_overlay_manager *mgr, struct omap_writeback *wb);
+int omap_dss_wb_flush();
int omap_setup_wb(struct omap_wb_device *wb_device, u32 addr, u32 uv_addr)
{
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 1af9b15dd3e3..5911bf3f27f1 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -4852,6 +4852,22 @@ int dispc_setup_wb(struct writeback_cache_data *wb)
}
+void dispc_flush_wb(struct writeback_cache_data *wb)
+{
+ enum omap_writeback_source source = wb->source;
+ enum omap_plane plane = OMAP_DSS_WB;
+ enum omap_plane input_plane;
+
+ if (source > OMAP_WB_TV_MANAGER) {
+ input_plane = (source - 3);
+ REG_FLD_MOD(dispc_reg_att[input_plane], 0x0, 31, 30);
+ #ifdef OMAP4430_REV_ES2_0
+ /* Memory to memory mode bit is set on ES 2.0 */
+ REG_FLD_MOD(dispc_reg_att[plane], 0, 19, 19);
+ #endif
+ }
+}
+
void dispc_go_wb(void)
{
enable_clocks(1);
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 47a6e1bcf124..0195565814ff 100755..100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -462,6 +462,7 @@ int dispc_set_clock_div(enum omap_channel channel,
int dispc_get_clock_div(enum omap_channel channel,
struct dispc_clock_info *cinfo);
void dispc_go_wb(void);
+void dispc_flush_wb(struct writeback_cache_data *wb);
int dispc_setup_wb(struct writeback_cache_data *wb);
/* VENC */
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index f1780dd8b51d..c3299c0fffca 100755..100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -1567,13 +1567,10 @@ int omap_dss_wb_apply(struct omap_overlay_manager *mgr, struct omap_writeback *w
++num_planes_enabled;
wbc = &dss_cache.writeback_cache;
- if (!wb->first_time) {
- DSSDBG("entered wb_first time\n");
- wbc->enabled = true;
- wbc->source = wb->info.source;
- wbc->source_type = wb->info.source_type;
- wb->first_time = true;
- }
+ wbc->enabled = true;
+ wbc->source = wb->info.source;
+ wbc->source_type = wb->info.source_type;
+
DSSDBG("dss_wb_apply %d\n", wbc->enabled);
/* Configure Write-back - check for connect with this overlay*/
if ((wbc->enabled) &&
@@ -1597,10 +1594,10 @@ int omap_dss_wb_apply(struct omap_overlay_manager *mgr, struct omap_writeback *w
wbc->color_mode = wb->info.dss_mode;
wbc->input_color_mode = oc->color_mode;
/*OMAP_DSS_COLOR_ARGB32; */
- wbc->width = wb->info.width;
- wbc->height = wb->info.height;
- wbc->input_width = ovl->info.width;
- wbc->input_height = ovl->info.height;
+ wbc->width = wb->info.out_width;
+ wbc->height = wb->info.out_height;
+ wbc->input_width = wb->info.width;
+ wbc->input_height = wb->info.height;
wbc->paddr = wb->info.paddr;
wbc->puv_addr = wb->info.puv_addr;
@@ -1736,6 +1733,21 @@ int omap_dss_wb_apply(struct omap_overlay_manager *mgr, struct omap_writeback *w
EXPORT_SYMBOL(omap_dss_wb_apply);
+int omap_dss_wb_flush()
+{
+ struct writeback_cache_data *wbc;
+ wbc = &dss_cache.writeback_cache;
+ if (wbc->enabled) {
+ wbc->enabled = false;
+ wbc->dirty = true;
+ }
+ printk(KERN_ERR"flush dispc data");
+ dispc_flush_wb(wbc);
+
+
+}
+EXPORT_SYMBOL(omap_dss_wb_flush);
+
static int dss_check_manager(struct omap_overlay_manager *mgr)
{
/* OMAP supports only graphics source transparency color key and alpha