]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: aspeed: remove checking of VE_INTERRUPT_CAPTURE_COMPLETE
authorJae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Fri, 31 May 2019 22:15:44 +0000 (18:15 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 5 Jun 2019 19:41:24 +0000 (15:41 -0400)
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/aspeed-video.c

index 92abdfc79e7602a5c0a887b268f2b8afce3a4bee..1cba582918cced6fb1b2fef3d8d8ee6991b526d7 100644 (file)
@@ -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);