summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-07-30 12:54:48 +0800
committerAndy Green <andy.green@linaro.org>2012-07-30 12:54:48 +0800
commit034e9da52ff28c3e8826b874cdb1171edf9d612f (patch)
treee4881d721b959b7c59f23e37285ca3fd1dd1f316
parente4bfad79d2eec450f95b3483033d6e32b7f7135c (diff)
OMAPDSS: DISPC: HACK: Transfer writeback pipeline FIFOs to graphics pipeline FIFO
The Writeback pipeline isn't currently supported by OMAPDSS. Use it's free FIFO and make it available to the GFX pipe. This is achieved by configuring the register DISPC_GLOBAL_BUFFER to assign Writeback's FIFOs to GFX. Create a generic function dispc_transfer_fifo() which takes in the pipeline whose FIFO we want to give away, and the pipeline which receives the FIFO. This can be used later when support for dynamic sharing of FIFOs is added. Underflows are seen on GFX pipe when it's routed to a high resolution display (1920x1080 and above) and when a Tiler buffer is used in 2D mode. To resolve this, create a function named dispc_transfer_wb_fifo_to_gfx(), this calls the above function if writeback is available on the OMAP platform. This is a temporary solution which will be used till the time dynamic sharing of pipeline FIFOs is added.
-rw-r--r--drivers/video/omap2/dss/dispc.c35
-rw-r--r--drivers/video/omap2/dss/dispc.h1
2 files changed, 36 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index e293aa5c985..f09dd0dfdad 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1011,6 +1011,39 @@ static void dispc_read_plane_fifo_sizes(void)
}
}
+static void dispc_transfer_fifo(enum omap_plane src_plane,
+ enum omap_plane dest_plane)
+{
+ u8 top_fifo_start, top_fifo_end, bot_fifo_start, bot_fifo_end;
+
+ /*
+ * calculate start and end bits corresponding to the source plane
+ * in DISPC_GLOBAL_BUFFER
+ */
+ top_fifo_end = src_plane * 6;
+ top_fifo_start = top_fifo_end + 2;
+ bot_fifo_end = top_fifo_start + 1;
+ bot_fifo_start = bot_fifo_end + 2;
+
+ REG_FLD_MOD(DISPC_GLOBAL_BUFFER, src_plane, top_fifo_start,
+ top_fifo_end);
+ REG_FLD_MOD(DISPC_GLOBAL_BUFFER, src_plane, bot_fifo_start,
+ bot_fifo_end);
+
+ dispc.fifo_size[dest_plane] += dispc.fifo_size[src_plane];
+ dispc.fifo_size[src_plane] = 0;
+}
+
+static void dispc_transfer_wb_fifo_to_gfx(void)
+{
+ const int num_wbs = dss_feat_get_num_wbs();
+
+ if (!num_wbs)
+ return;
+
+ dispc_transfer_fifo(OMAP_DSS_WB, OMAP_DSS_GFX);
+}
+
static u32 dispc_ovl_get_fifo_size(enum omap_plane plane)
{
return dispc.fifo_size[plane];
@@ -3664,6 +3697,8 @@ static void _omap_dispc_initial_config(void)
dispc_read_plane_fifo_sizes();
+ dispc_transfer_wb_fifo_to_gfx();
+
dispc_configure_burst_sizes();
dispc_ovl_enable_zorder_planes();
diff --git a/drivers/video/omap2/dss/dispc.h b/drivers/video/omap2/dss/dispc.h
index 30832c7868f..d870b5f0048 100644
--- a/drivers/video/omap2/dss/dispc.h
+++ b/drivers/video/omap2/dss/dispc.h
@@ -35,6 +35,7 @@
#define DISPC_GLOBAL_ALPHA 0x0074
#define DISPC_CONTROL2 0x0238
#define DISPC_CONFIG2 0x0620
+#define DISPC_GLOBAL_BUFFER 0x0800
#define DISPC_DIVISOR 0x0804
/* DISPC overlay registers */