From: Katsuya Matsubara <matsu@igel.co.jp>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, linux-sh@vger.kernel.org,
Hans Verkuil <hverkuil@xs4all.nl>,
Sakari Ailus <sakari.ailus@iki.fi>,
Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
Katsuya Matsubara <matsu@igel.co.jp>
Subject: [PATCH 2/7] [media] vsp1: Use the maximum number defined in platform data
Date: Fri, 26 Jul 2013 09:32:12 +0000 [thread overview]
Message-ID: <1374831137-9219-3-git-send-email-matsu@igel.co.jp> (raw)
In-Reply-To: <1374831137-9219-1-git-send-email-matsu@igel.co.jp>
The VSP1 driver allows to define the maximum number of each module
such as RPF, WPF, and UDS in a platform data definition.
This suppresses operations for nonexistent or unused modules.
Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
---
drivers/media/platform/vsp1/vsp1_drv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index 0ead308..a8c21f8 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -35,7 +35,7 @@ static irqreturn_t vsp1_irq_handler(int irq, void *data)
irqreturn_t ret = IRQ_NONE;
unsigned int i;
- for (i = 0; i < VPS1_MAX_WPF; ++i) {
+ for (i = 0; i < vsp1->pdata->wpf_count; ++i) {
struct vsp1_rwpf *wpf = vsp1->wpf[i];
struct vsp1_pipeline *pipe;
u32 status;
@@ -243,7 +243,7 @@ static void vsp1_device_init(struct vsp1_device *vsp1)
/* Reset any channel that might be running. */
status = vsp1_read(vsp1, VI6_STATUS);
- for (i = 0; i < VPS1_MAX_WPF; ++i) {
+ for (i = 0; i < vsp1->pdata->wpf_count; ++i) {
unsigned int timeout;
if (!(status & VI6_STATUS_SYS_ACT(i)))
@@ -265,10 +265,10 @@ static void vsp1_device_init(struct vsp1_device *vsp1)
vsp1_write(vsp1, VI6_CLK_DCSWT, (8 << VI6_CLK_DCSWT_CSTPW_SHIFT) |
(8 << VI6_CLK_DCSWT_CSTRW_SHIFT));
- for (i = 0; i < VPS1_MAX_RPF; ++i)
+ for (i = 0; i < vsp1->pdata->rpf_count; ++i)
vsp1_write(vsp1, VI6_DPR_RPF_ROUTE(i), VI6_DPR_NODE_UNUSED);
- for (i = 0; i < VPS1_MAX_UDS; ++i)
+ for (i = 0; i < vsp1->pdata->uds_count; ++i)
vsp1_write(vsp1, VI6_DPR_UDS_ROUTE(i), VI6_DPR_NODE_UNUSED);
vsp1_write(vsp1, VI6_DPR_SRU_ROUTE, VI6_DPR_NODE_UNUSED);
--
1.7.9.5
next prev parent reply other threads:[~2013-07-26 9:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 9:32 [PATCH 0/7] [media] vsp1: Add VIO6 support Katsuya Matsubara
2013-07-26 9:32 ` [PATCH 1/7] [media] vsp1: Fix lack of the sink entity registration for enabled links Katsuya Matsubara
2013-07-26 9:32 ` Katsuya Matsubara [this message]
2013-07-26 9:32 ` [PATCH 3/7] [media] vsp1: Rewrite the definition of registers' offset as enum and arrays Katsuya Matsubara
2013-07-26 9:32 ` [PATCH 4/7] [media] vsp1: Rewrite the value definitions for DPR routing " Katsuya Matsubara
2013-07-26 9:32 ` [PATCH 5/7] [media] vsp1: Introduce bit operations for the DPR route registers Katsuya Matsubara
2013-07-26 9:32 ` [PATCH 6/7] [media] vsp1: Move the DPR_WPF_FPORCH register settings into the device initialization Katsuya Matsubara
2013-07-26 9:32 ` [PATCH 7/7] [media] vsp1: Add VIO6 support Katsuya Matsubara
2013-07-26 16:18 ` [PATCH 0/7] " Laurent Pinchart
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=1374831137-9219-3-git-send-email-matsu@igel.co.jp \
--to=matsu@igel.co.jp \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=sylvester.nawrocki@gmail.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