From: Zev Weiss <zev@bewilderbeest.net>
To: Joel Stanley <joel@jms.id.au>
Cc: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>,
Ryan Chen <ryan_chen@aspeedtech.com>,
linux-aspeed <linux-aspeed@lists.ozlabs.org>,
Andrew Jeffery <andrew@aj.id.au>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Eddie James <eajames@linux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 1/3] aspeed-video: add error message for unhandled interrupts
Date: Tue, 22 Dec 2020 13:11:26 -0600 [thread overview]
Message-ID: <20201222191126.uh3psmc4l74dulwb@hatter.bewilderbeest.net> (raw)
In-Reply-To: <CACPK8XfPCjBbjM2V1oiD=di6MD6ewJs0NFewA0=kZfx_eL29gQ@mail.gmail.com>
On Mon, Dec 21, 2020 at 10:34:26PM CST, Joel Stanley wrote:
>On Tue, 15 Dec 2020 at 02:46, Zev Weiss <zev@bewilderbeest.net> wrote:
>>
>> Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
>> ---
>> drivers/media/platform/aspeed-video.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c
>> index 7d98db1d9b52..eb02043532e3 100644
>> --- a/drivers/media/platform/aspeed-video.c
>> +++ b/drivers/media/platform/aspeed-video.c
>> @@ -562,6 +562,7 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
>> {
>> struct aspeed_video *video = arg;
>> u32 sts = aspeed_video_read(video, VE_INTERRUPT_STATUS);
>> + u32 orig_sts = sts;
>>
>> /*
>> * Resolution changed or signal was lost; reset the engine and
>> @@ -639,6 +640,10 @@ static irqreturn_t aspeed_video_irq(int irq, void *arg)
>> if (sts & VE_INTERRUPT_FRAME_COMPLETE)
>> sts &= ~VE_INTERRUPT_FRAME_COMPLETE;
>>
>> + if (sts)
>> + dev_err_ratelimited(video->dev, "unexpected interrupt asserted:"
>> + " sts=%08x, orig_sts=%08x", sts, orig_sts);
>
>Do you want to do this before clearing the FRAME and CAPTURE bits?
>
My intent was to only issue the message for unexpectedly-asserted
interrupts that aren't among the ones already known to happen despite
being disabled -- basically just indicating that a new bit might need to
be added to the spurious-interrupt mask added in the second patch. (I
included the orig_sts element in case there's any useful debugging
information to be gleaned from what other interrupts got asserted along
with it, which would also include FRAME, CAPTURE, and any others
explicitly cleared.)
And incidentally, in the handful of instances I captured in which this
problem arose, it seemed to be "sticky" in that it continued occurring
on every frame until the device was reset, so it seems like it would be
likely to lead to a fair amount of log spam for a condition where it's
basically just "we're ignoring known misbehavior" and there's not much
else to do about it.
Zev
next prev parent reply other threads:[~2020-12-22 19:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 2:45 [PATCH 0/3] aspeed-video: extend spurious interrupt handling Zev Weiss
2020-12-15 2:45 ` [PATCH 1/3] aspeed-video: add error message for unhandled interrupts Zev Weiss
2020-12-22 4:34 ` Joel Stanley
2020-12-22 19:11 ` Zev Weiss [this message]
2020-12-15 2:45 ` [PATCH 2/3] aspeed-video: clear spurious interrupt bits unconditionally Zev Weiss
2020-12-22 4:47 ` Joel Stanley
2020-12-22 19:14 ` Zev Weiss
2020-12-23 1:07 ` Joel Stanley
2020-12-23 2:53 ` Ryan Chen
2020-12-23 3:53 ` Zev Weiss
2020-12-23 5:58 ` Ryan Chen
2020-12-15 2:45 ` [PATCH 3/3] aspeed-video: add COMP_READY to VE_SPURIOUS_IRQS Zev Weiss
2020-12-22 4:49 ` Joel Stanley
2021-03-09 16:43 ` Jae Hyun Yoo
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=20201222191126.uh3psmc4l74dulwb@hatter.bewilderbeest.net \
--to=zev@bewilderbeest.net \
--cc=andrew@aj.id.au \
--cc=eajames@linux.ibm.com \
--cc=jae.hyun.yoo@linux.intel.com \
--cc=joel@jms.id.au \
--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@kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=ryan_chen@aspeedtech.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;
as well as URLs for NNTP newsgroup(s).