From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jae Hyun Yoo <jae.hyun.yoo@intel.com>,
Eddie James <eajames@linux.ibm.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Sasha Levin <sashal@kernel.org>,
linux-media@vger.kernel.org, openbmc@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org
Subject: [PATCH AUTOSEL 5.4 152/350] media: aspeed: clear garbage interrupts
Date: Tue, 10 Dec 2019 16:04:17 -0500 [thread overview]
Message-ID: <20191210210735.9077-113-sashal@kernel.org> (raw)
In-Reply-To: <20191210210735.9077-1-sashal@kernel.org>
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
[ Upstream commit 65d270acb2d662c3346793663ac3a759eb4491b8 ]
CAPTURE_COMPLETE and FRAME_COMPLETE interrupts come even when these
are disabled in the VE_INTERRUPT_CTRL register and eventually this
behavior causes disabling irq itself like below:
[10055.108784] irq 23: nobody cared (try booting with the "irqpoll" option)
[10055.115525] CPU: 0 PID: 331 Comm: swampd Tainted: G W 5.3.0-4fde000-dirty-d683e2e #1
[10055.124565] Hardware name: Generic DT based system
[10055.129355] Backtrace:
[10055.131854] [<80107d7c>] (dump_backtrace) from [<80107fb0>] (show_stack+0x20/0x24)
[10055.139431] r7:00000017 r6:00000001 r5:00000000 r4:9d51dc00
[10055.145120] [<80107f90>] (show_stack) from [<8074bf50>] (dump_stack+0x20/0x28)
[10055.152361] [<8074bf30>] (dump_stack) from [<80150ffc>] (__report_bad_irq+0x40/0xc0)
[10055.160109] [<80150fbc>] (__report_bad_irq) from [<80150f2c>] (note_interrupt+0x23c/0x294)
[10055.168374] r9:015b6e60 r8:00000000 r7:00000017 r6:00000001 r5:00000000 r4:9d51dc00
[10055.176136] [<80150cf0>] (note_interrupt) from [<8014df1c>] (handle_irq_event_percpu+0x88/0x98)
[10055.184835] r10:7eff7910 r9:015b6e60 r8:00000000 r7:9d417600 r6:00000001 r5:00000002
[10055.192657] r4:9d51dc00 r3:00000000
[10055.196248] [<8014de94>] (handle_irq_event_percpu) from [<8014df64>] (handle_irq_event+0x38/0x4c)
[10055.205113] r5:80b56d50 r4:9d51dc00
[10055.208697] [<8014df2c>] (handle_irq_event) from [<80151f1c>] (handle_level_irq+0xbc/0x12c)
[10055.217037] r5:80b56d50 r4:9d51dc00
[10055.220623] [<80151e60>] (handle_level_irq) from [<8014d4b8>] (generic_handle_irq+0x30/0x44)
[10055.229052] r5:80b56d50 r4:00000017
[10055.232648] [<8014d488>] (generic_handle_irq) from [<8014d524>] (__handle_domain_irq+0x58/0xb4)
[10055.241356] [<8014d4cc>] (__handle_domain_irq) from [<801021e4>] (avic_handle_irq+0x68/0x70)
[10055.249797] r9:015b6e60 r8:00c5387d r7:00c5387d r6:ffffffff r5:9dd33fb0 r4:9d402380
[10055.257539] [<8010217c>] (avic_handle_irq) from [<80101e34>] (__irq_usr+0x54/0x80)
[10055.265105] Exception stack(0x9dd33fb0 to 0x9dd33ff8)
[10055.270152] 3fa0: 015d0530 00000000 00000000 015d0538
[10055.278328] 3fc0: 015d0530 015b6e60 00000000 00000000 0052c5d0 015b6e60 7eff7910 7eff7918
[10055.286496] 3fe0: 76ce5614 7eff7908 0050e2f4 76a3a08c 20000010 ffffffff
[10055.293104] r5:20000010 r4:76a3a08c
[10055.296673] handlers:
[10055.298967] [<79f218a5>] irq_default_primary_handler threaded [<1de88514>] aspeed_video_irq
[10055.307344] Disabling IRQ #23
To fix this issue, this commit makes the interrupt handler clear
these garbage interrupts. This driver enables and uses only
COMP_COMPLETE interrupt instead for frame handling.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/aspeed-video.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
index 84e0650106f51..096a7c9a8963b 100644
--- a/drivers/media/platform/aspeed-video.c
+++ b/drivers/media/platform/aspeed-video.c
@@ -606,6 +606,16 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
aspeed_video_start_frame(video);
}
+ /*
+ * CAPTURE_COMPLETE and FRAME_COMPLETE interrupts come even when these
+ * are disabled in the VE_INTERRUPT_CTRL register so clear them to
+ * prevent unnecessary interrupt calls.
+ */
+ if (sts & VE_INTERRUPT_CAPTURE_COMPLETE)
+ sts &= ~VE_INTERRUPT_CAPTURE_COMPLETE;
+ if (sts & VE_INTERRUPT_FRAME_COMPLETE)
+ sts &= ~VE_INTERRUPT_FRAME_COMPLETE;
+
return sts ? IRQ_NONE : IRQ_HANDLED;
}
--
2.20.1
next prev parent reply other threads:[~2019-12-10 21:29 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 21:02 [PATCH AUTOSEL 5.4 040/350] media: ov6650: Fix control handler not freed on init error Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 041/350] media: i2c: ov2659: fix s_stream return value Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 042/350] media: ov6650: Fix crop rectangle alignment not passed back Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 043/350] media: i2c: ov2659: Fix missing 720p register config Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 044/350] media: ov6650: Fix stored frame format not in sync with hardware Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 045/350] media: ov6650: Fix stored crop rectangle " Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 047/350] media: venus: core: Fix msm8996 frequency table Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 049/350] media: vimc: Fix gpf in rmmod path when stream is active Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 058/350] media: venus: Fix occasionally failures to suspend Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 066/350] media: flexcop-usb: fix NULL-ptr deref in flexcop_usb_transfer_init() Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 067/350] media: cec-funcs.h: add status_req checks Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 068/350] media: meson/ao-cec: move cec_notifier_cec_adap_register after hw setup Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 084/350] media: cx88: Fix some error handling path in 'cx8800_initdev()' Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 089/350] media: ti-vpe: vpe: Fix Motion Vector vpdma stride Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 090/350] media: ti-vpe: vpe: fix a v4l2-compliance warning about invalid pixel format Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 091/350] media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 092/350] media: ti-vpe: vpe: Make sure YUYV is set as default format Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 093/350] media: ti-vpe: vpe: fix a v4l2-compliance failure causing a kernel panic Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 094/350] media: ti-vpe: vpe: ensure buffers are cleaned up properly in abort cases Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 097/350] media: ti-vpe: vpe: fix a v4l2-compliance failure about invalid sizeimage Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 144/350] media: cedrus: Fix undefined shift with a SHIFT_AND_MASK_BITS macro Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 145/350] media: aspeed: set hsync and vsync polarities to normal before starting mode detection Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 147/350] media: ov6650: Fix stored frame interval not in sync with hardware Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 148/350] media: ad5820: Define entity function Sasha Levin
2019-12-12 12:19 ` Pavel Machek
2019-12-12 12:24 ` Greg KH
2019-12-12 13:48 ` Pavel Machek
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 149/350] media: ov5640: Make 2592x1944 mode only available at 15 fps Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 150/350] media: st-mipid02: add a check for devm_gpiod_get_optional Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 151/350] media: imx7-mipi-csis: Add a check for devm_regulator_get Sasha Levin
2019-12-10 21:04 ` Sasha Levin [this message]
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 153/350] media: smiapp: Register sensor after enabling runtime PM on the device Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 202/350] media: rcar_drif: fix a memory disclosure Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 203/350] media: v4l2-core: fix touch support in v4l_g_fmt Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 205/350] media: staging/imx: Use a shorter name for driver Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 209/350] media: vivid: media_device_cleanup was called too early Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 247/350] media: exynos4-is: fix wrong mdev and v4l2 dev order in error path Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 252/350] media: pvrusb2: Fix oops on tear-down when radio support is not present Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 257/350] media: si470x-i2c: add missed operations in remove Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 258/350] media: cedrus: Use helpers to access capture queue Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 259/350] media: v4l2-ctrl: Lock main_hdl on operations of requests_queued Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 262/350] media: vicodec: media_device_cleanup was called too early Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 263/350] media: vim2m: " Sasha Levin
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=20191210210735.9077-113-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=eajames@linux.ibm.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jae.hyun.yoo@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox