All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
To: Eddie James <eajames@linux.ibm.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-aspeed@lists.ozlabs.org, linux-media@vger.kernel.org,
	Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Subject: [PATCH v2 06/11] media: aspeed: remove checking of VE_INTERRUPT_CAPTURE_COMPLETE
Date: Fri, 24 May 2019 16:17:20 -0700	[thread overview]
Message-ID: <20190524231725.12320-7-jae.hyun.yoo@linux.intel.com> (raw)
In-Reply-To: <20190524231725.12320-1-jae.hyun.yoo@linux.intel.com>

VE_INTERRUPT_CAPTURE_COMPLETE and VE_INTERRUPT_COMP_COMPLETE are
not set at the same time but the current interrupt handling
mechanism of this driver doesn't clear the interrupt flag until
both two are set, and this behavior causes unnecessary interrupt
handler calls. In fact, this driver provides JPEG format only so
taking care of the VE_INTERRUPT_COMP_COMPLETE is enough for getting
compressed image frame so this commit gets rid of the
VE_INTERRUPT_CAPTURE_COMPLETE checking logic to simplify the logic.
Handling of VE_INTERRUPT_CAPTURE_COMPLETE could be added back later
when it's actually needed.

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
---
v1 -> v2:
 None.

 drivers/media/platform/aspeed-video.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 92abdfc79e76..1cba582918cc 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -463,8 +463,7 @@ static int aspeed_video_start_frame(struct aspeed_video *video)
 	aspeed_video_write(video, VE_COMP_ADDR, addr);
 
 	aspeed_video_update(video, VE_INTERRUPT_CTRL, 0,
-			    VE_INTERRUPT_COMP_COMPLETE |
-			    VE_INTERRUPT_CAPTURE_COMPLETE);
+			    VE_INTERRUPT_COMP_COMPLETE);
 
 	aspeed_video_update(video, VE_SEQ_CTRL, 0,
 			    VE_SEQ_CTRL_TRIG_CAPTURE | VE_SEQ_CTRL_TRIG_COMP);
@@ -568,8 +567,7 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
 		}
 	}
 
-	if ((sts & VE_INTERRUPT_COMP_COMPLETE) &&
-	    (sts & VE_INTERRUPT_CAPTURE_COMPLETE)) {
+	if (sts & VE_INTERRUPT_COMP_COMPLETE) {
 		struct aspeed_video_buffer *buf;
 		u32 frame_size = aspeed_video_read(video,
 						   VE_OFFSET_COMP_STREAM);
@@ -598,11 +596,9 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
 				    VE_SEQ_CTRL_FORCE_IDLE |
 				    VE_SEQ_CTRL_TRIG_COMP, 0);
 		aspeed_video_update(video, VE_INTERRUPT_CTRL,
-				    VE_INTERRUPT_COMP_COMPLETE |
-				    VE_INTERRUPT_CAPTURE_COMPLETE, 0);
+				    VE_INTERRUPT_COMP_COMPLETE, 0);
 		aspeed_video_write(video, VE_INTERRUPT_STATUS,
-				   VE_INTERRUPT_COMP_COMPLETE |
-				   VE_INTERRUPT_CAPTURE_COMPLETE);
+				   VE_INTERRUPT_COMP_COMPLETE);
 
 		if (test_bit(VIDEO_STREAMING, &video->flags) && buf)
 			aspeed_video_start_frame(video);
-- 
2.21.0


  parent reply	other threads:[~2019-05-24 23:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24 23:17 [PATCH v2 00/11] Improve stability and add bug fixes of Aspeed video engine driver Jae Hyun Yoo
2019-05-24 23:17 ` [PATCH v2 01/11] media: aspeed: fix a kernel warning on clk control Jae Hyun Yoo
2019-05-24 23:17 ` [PATCH v2 02/11] media: aspeed: refine clock control logic Jae Hyun Yoo
2019-05-24 23:17 ` [PATCH v2 03/11] media: aspeed: change irq to threaded irq Jae Hyun Yoo
2019-05-24 23:17 ` [PATCH v2 04/11] media: aspeed: remove IRQF_SHARED flag Jae Hyun Yoo
2019-05-24 23:17 ` [PATCH v2 05/11] media: aspeed: reduce noisy log printing outs Jae Hyun Yoo
2019-05-24 23:17 ` Jae Hyun Yoo [this message]
2019-05-24 23:17 ` [PATCH v2 07/11] media: aspeed: refine interrupt handling logic Jae Hyun Yoo
2019-05-24 23:17 ` [PATCH v2 08/11] media: aspeed: remove source buffer allocation before mode detection Jae Hyun Yoo
2019-05-29 16:07   ` Eddie James
2019-05-24 23:17 ` [PATCH v2 09/11] media: aspeed: use different delays for triggering VE H/W reset Jae Hyun Yoo
2019-05-29 16:07   ` Eddie James
2019-05-24 23:17 ` [PATCH v2 10/11] media: aspeed: fix an incorrect timeout checking in mode detection Jae Hyun Yoo
2019-05-29 14:03   ` Eddie James
2019-05-29 17:04     ` Jae Hyun Yoo
2019-05-24 23:17 ` [PATCH v2 11/11] media: aspeed: add a workaround to fix a silicon bug Jae Hyun Yoo
2019-05-29 14:07   ` Eddie James
2019-05-29 17:29     ` Jae Hyun Yoo
2019-05-31 16:32       ` Ryan Chen
2019-05-31 20:38         ` Jae Hyun Yoo
2019-05-29  9:55 ` [PATCH v2 00/11] Improve stability and add bug fixes of Aspeed video engine driver Hans Verkuil

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=20190524231725.12320-7-jae.hyun.yoo@linux.intel.com \
    --to=jae.hyun.yoo@linux.intel.com \
    --cc=andrew@aj.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=eajames@linux.ibm.com \
    --cc=joel@jms.id.au \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.