From: Archit Taneja <archit@ti.com>
To: tomi.valkeinen@ti.com
Cc: linux-omap@vger.kernel.org, Archit Taneja <archit@ti.com>
Subject: [PATCH v2 5/5] OMAP: DSS2: Use a macro to declare size of the fifo_size array in dispc.c
Date: Fri, 5 Aug 2011 19:06:04 +0530 [thread overview]
Message-ID: <1312551364-4828-6-git-send-email-archit@ti.com> (raw)
In-Reply-To: <1312551364-4828-1-git-send-email-archit@ti.com>
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>
---
drivers/video/omap2/dss/dispc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 8cab996..d910373 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;
--
1.7.1
next prev parent reply other threads:[~2011-08-05 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-05 13:35 [PATCH v2 0/5] OMAP: DSS2: Miscellaneous DISPC Patches Archit Taneja
2011-08-05 13:36 ` [PATCH v2 1/5] OMAP: DSS2: DISPC: Prepare dispc_dump_regs() for shortening Archit Taneja
2011-08-05 13:36 ` [PATCH v2 2/5] OMAP: DSS2: DISPC: Shorten dispc_dump_regs() Archit Taneja
2011-08-05 13:36 ` [PATCH v2 3/5] OMAP: DSS2: DISPC: dispc_save_context() and dispc_restore_context() cleanup Archit Taneja
2011-08-05 13:36 ` [PATCH v2 4/5] OMAP: DSS2: DISPC: Shorten _dispc_set_color_conv_coef() Archit Taneja
2011-08-05 13:36 ` Archit Taneja [this message]
2011-08-05 13:46 ` [PATCH v2 0/5] OMAP: DSS2: Miscellaneous DISPC Patches Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1312551364-4828-6-git-send-email-archit@ti.com \
--to=archit@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox