summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-07-30 12:54:23 +0800
committerAndy Green <andy.green@linaro.org>2012-07-30 12:54:23 +0800
commite4bfad79d2eec450f95b3483033d6e32b7f7135c (patch)
tree2bd290fb483009d71e8f6fccdacbee39054651d2
parent180b5c412a6e2baad34bb8776f7c423b74582ad9 (diff)
OMAPDSS: DISPC: Read fifo size of Writeback pipeline
The Writeback pipeline is a block in OMAP4's Display controller which can take input from a pipeline or an overlay manager and feed it back to memory. Hence, it allows to take benefit of the hardware processing available inside the DISPC like color space conversion, rescaling, compositing to perform memory-to-memory transfer with data processing or capturing a displayed frame. The Writeback pipeline has it's own FIFO like the other pipelines. Since Writeback isn't supported in OMAPDSS yet, we can use it's FIFO for some other pipe which needs it. OMAP4 DISPC has a mechanism to share FIFOs among pipes which makes this possible. Add writeback pipeline as a member of omap_plane struct, add register offsets for it's FIFO_SIZE_STATUS register so that the DISPC driver is aware of it's fifo size. This would be used later to transfer the FIFO to another pipe, and have a larger FIFO during fifomerge.
-rw-r--r--drivers/video/omap2/dss/dispc.c6
-rw-r--r--drivers/video/omap2/dss/dispc.h3
-rw-r--r--drivers/video/omap2/dss/dss_features.c9
-rw-r--r--drivers/video/omap2/dss/dss_features.h2
-rw-r--r--include/video/omapdss.h1
5 files changed, 19 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 7827756b543..e293aa5c985 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -90,7 +90,7 @@ static struct {
int irq;
struct clk *dss_clk;
- u32 fifo_size[MAX_DSS_OVERLAYS];
+ u32 fifo_size[MAX_DSS_OVERLAYS + MAX_DSS_WBS];
spinlock_t irq_lock;
u32 irq_error_mask;
@@ -995,6 +995,8 @@ static void dispc_read_plane_fifo_sizes(void)
{
u32 size;
int plane;
+ const int num_ovls = dss_feat_get_num_ovls();
+ const int num_wbs = dss_feat_get_num_wbs();
u8 start, end;
u32 unit;
@@ -1002,7 +1004,7 @@ static void dispc_read_plane_fifo_sizes(void)
dss_feat_get_reg_field(FEAT_REG_FIFOSIZE, &start, &end);
- for (plane = 0; plane < dss_feat_get_num_ovls(); ++plane) {
+ for (plane = 0; plane < num_ovls + num_wbs; ++plane) {
size = REG_GET(DISPC_OVL_FIFO_SIZE_STATUS(plane), start, end);
size *= unit;
dispc.fifo_size[plane] = size;
diff --git a/drivers/video/omap2/dss/dispc.h b/drivers/video/omap2/dss/dispc.h
index f278080e106..30832c7868f 100644
--- a/drivers/video/omap2/dss/dispc.h
+++ b/drivers/video/omap2/dss/dispc.h
@@ -327,6 +327,8 @@ static inline u16 DISPC_OVL_BASE(enum omap_plane plane)
return 0x014C;
case OMAP_DSS_VIDEO3:
return 0x0300;
+ case OMAP_DSS_WB:
+ return 0x0500;
default:
BUG();
return 0;
@@ -489,6 +491,7 @@ static inline u16 DISPC_FIFO_SIZE_STATUS_OFFSET(enum omap_plane plane)
case OMAP_DSS_VIDEO2:
return 0x0018;
case OMAP_DSS_VIDEO3:
+ case OMAP_DSS_WB:
return 0x0088;
default:
BUG();
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index 4f27068407f..7786b2bcbde 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -46,6 +46,7 @@ struct omap_dss_features {
const int num_mgrs;
const int num_ovls;
+ const int num_wbs;
const enum omap_display_type *supported_displays;
const enum omap_color_mode *supported_color_modes;
const enum omap_overlay_caps *overlay_caps;
@@ -598,6 +599,7 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = {
.num_mgrs = 3,
.num_ovls = 4,
+ .num_wbs = 1,
.supported_displays = omap4_dss_supported_displays,
.supported_color_modes = omap4_dss_supported_color_modes,
.overlay_caps = omap4_dss_overlay_caps,
@@ -620,6 +622,7 @@ static const struct omap_dss_features omap4430_es2_0_1_2_dss_features = {
.num_mgrs = 3,
.num_ovls = 4,
+ .num_wbs = 1,
.supported_displays = omap4_dss_supported_displays,
.supported_color_modes = omap4_dss_supported_color_modes,
.overlay_caps = omap4_dss_overlay_caps,
@@ -642,6 +645,7 @@ static const struct omap_dss_features omap4_dss_features = {
.num_mgrs = 3,
.num_ovls = 4,
+ .num_wbs = 1,
.supported_displays = omap4_dss_supported_displays,
.supported_color_modes = omap4_dss_supported_color_modes,
.overlay_caps = omap4_dss_overlay_caps,
@@ -749,6 +753,11 @@ int dss_feat_get_num_ovls(void)
return omap_current_dss_features->num_ovls;
}
+int dss_feat_get_num_wbs(void)
+{
+ return omap_current_dss_features->num_wbs;
+}
+
unsigned long dss_feat_get_param_min(enum dss_range_param param)
{
return omap_current_dss_features->dss_params[param].min;
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index f649defd2c0..3b0375e7192 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -26,6 +26,7 @@
#define MAX_DSS_MANAGERS 3
#define MAX_DSS_OVERLAYS 4
+#define MAX_DSS_WBS 1
#define MAX_DSS_LCD_MANAGERS 2
#define MAX_NUM_DSI 2
@@ -102,6 +103,7 @@ enum dss_range_param {
/* DSS Feature Functions */
int dss_feat_get_num_mgrs(void);
int dss_feat_get_num_ovls(void);
+int dss_feat_get_num_wbs(void);
unsigned long dss_feat_get_param_min(enum dss_range_param param);
unsigned long dss_feat_get_param_max(enum dss_range_param param);
enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index ad66eb35168..39a9d2a6543 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -69,6 +69,7 @@ enum omap_plane {
OMAP_DSS_VIDEO1 = 1,
OMAP_DSS_VIDEO2 = 2,
OMAP_DSS_VIDEO3 = 3,
+ OMAP_DSS_WB = 4,
};
enum omap_channel {