From: Philipp Zabel <p.zabel@pengutronix.de>
To: Ezequiel Garcia <ezequiel@collabora.com>,
linux-media@vger.kernel.org,
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: kernel@collabora.com
Subject: Re: [PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt
Date: Mon, 29 Apr 2019 11:13:54 +0200 [thread overview]
Message-ID: <1556529234.3009.4.camel@pengutronix.de> (raw)
In-Reply-To: <47a776d4d5e8e169924e1c55d5be42325225f1d7.camel@collabora.com>
On Fri, 2019-04-26 at 14:56 -0300, Ezequiel Garcia wrote:
> Hi Philipp,
>
> Thanks for the quick review of the series.
>
> On Fri, 2019-04-26 at 11:16 +0200, Philipp Zabel wrote:
> > On Thu, 2019-04-25 at 15:35 -0300, Ezequiel Garcia wrote:
> > > The current interrupt handler is doing very little, and not doing
> > > any non-atomic operations. Pretty much all it does is accessing
> > > a couple registers, taking a couple spinlocks and then signalling
> > > a completion.
> > >
> > > There is no reason this should be a threaded interrupt handler,
> > > so move the handler to regular hard interrupt context.
> > >
> > > Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> > > ---
> > > drivers/media/platform/coda/coda-common.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
> > > index 1f53ca4effd2..617d4547ec82 100644
> > > --- a/drivers/media/platform/coda/coda-common.c
> > > +++ b/drivers/media/platform/coda/coda-common.c
> > > @@ -2789,8 +2789,8 @@ static int coda_probe(struct platform_device *pdev)
> > > return irq;
> > > }
> > >
> > > - ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler,
> > > - IRQF_ONESHOT, dev_name(&pdev->dev), dev);
> > > + ret = devm_request_irq(&pdev->dev, irq, coda_irq_handler, 0,
> > > + dev_name(&pdev->dev), dev);
> > > if (ret < 0) {
> > > dev_err(&pdev->dev, "failed to request irq: %d\n", ret);
> > > return ret;
> >
> > There is one thing that this would complicate. For at least H.264 I
> > know that we can pad the bitstream in reaction to a BIT_BUF_EMPTY
> > interrupt, to make a picture run finish successfully when it is stuck in
> > buffer underrun condition. This would need to be done under the
> > bitstream_mutex in a threaded handler.
> >
>
> In this case, a top-half handler would still stand in good stead,
> as it would check the interrupt status, and fire the bottom-half
> threaded interrupt to handle the buffer underrun.
I agree, and the R-b stands.
regards
Philipp
next prev parent reply other threads:[~2019-04-29 9:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 18:35 [PATCH 0/5] Assorted CODA fixes Ezequiel Garcia
2019-04-25 18:35 ` [PATCH 1/5] media: coda: Print a nicer device registered message Ezequiel Garcia
2019-04-25 18:39 ` Hans Verkuil
2019-04-25 18:35 ` [PATCH 2/5] media: coda: Remove unbalanced and unneeded mutex unlock Ezequiel Garcia
2019-04-26 7:58 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt Ezequiel Garcia
2019-04-26 7:59 ` Philipp Zabel
2019-04-26 9:16 ` Philipp Zabel
2019-04-26 17:56 ` Ezequiel Garcia
2019-04-29 9:13 ` Philipp Zabel [this message]
2019-04-25 18:35 ` [PATCH 4/5] media: coda: Remove pic_run_work worker Ezequiel Garcia
2019-04-26 8:11 ` Philipp Zabel
2019-04-26 18:19 ` Ezequiel Garcia
2019-04-29 9:55 ` Philipp Zabel
2019-04-25 18:35 ` [PATCH 5/5] media: coda: Clear the interrupt reason Ezequiel Garcia
2019-04-26 8:12 ` Philipp Zabel
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=1556529234.3009.4.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=ezequiel@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-media@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