summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2011-08-05 15:36:04 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-14 17:08:24 +0200
commite13a138bc68259dc630cb903942975efa40d2bd9 (patch)
tree95c471d6191294cb0d0f2e2b2c08554dcc0e0141 /drivers/video/omap2/dss
parentOMAP: DSS2: DISPC: Shorten _dispc_set_color_conv_coef() (diff)
downloadlinux-e13a138bc68259dc630cb903942975efa40d2bd9.tar.xz
linux-e13a138bc68259dc630cb903942975efa40d2bd9.zip
OMAP: DSS2: Use a macro to declare size of the fifo_size array in dispc.c
The array size of fifo_size array in the global dispc struct is currently hardcoded to 3. Replace this with the MAX_DSS_OVERLAYS macro in dss_features.h, use dss_features function to get the number of overlays instead of the ARRAY_SIZE macro in dispc_read_plane_fifo_sizes(). Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss')
-rw-r--r--drivers/video/omap2/dss/dispc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 56dcaf62e97e..bbd83401cf72 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -106,7 +106,7 @@ static struct {
int irq;
struct clk *dss_clk;
- u32 fifo_size[3];
+ u32 fifo_size[MAX_DSS_OVERLAYS];
spinlock_t irq_lock;
u32 irq_error_mask;
@@ -1024,7 +1024,7 @@ static void dispc_read_plane_fifo_sizes(void)
dss_feat_get_reg_field(FEAT_REG_FIFOSIZE, &start, &end);
- for (plane = 0; plane < ARRAY_SIZE(dispc.fifo_size); ++plane) {
+ for (plane = 0; plane < dss_feat_get_num_ovls(); ++plane) {
size = REG_GET(DISPC_OVL_FIFO_SIZE_STATUS(plane), start, end);
size *= unit;
dispc.fifo_size[plane] = size;