From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Jyri Sarha <jsarha@ti.com>, dri-devel@lists.freedesktop.org
Cc: bcousson@baylibre.com, laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH v2 2/6] drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function
Date: Thu, 16 Jun 2016 12:19:35 +0300 [thread overview]
Message-ID: <57626F27.9000608@ti.com> (raw)
In-Reply-To: <4f1ca388972381100d9c44316e0f4f13a62134f9.1465979902.git.jsarha@ti.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1745 bytes --]
On 15/06/16 11:39, Jyri Sarha wrote:
> Reorder the IRQ function so that the write to LCDC_END_OF_INT_IND_REG
> is done last. The write to LCDC_END_OF_INT_IND_REG indicates to LCDC
> that the interrupt service routine has completed (see section
> 13.3.6.1.6 in AM335x TRM). This is needed if LCDC's ipgvmodirq module
> is configured for pulse interrupts.
>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
> drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index 4d8f9a5..1343717 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -725,14 +725,19 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
> tilcdc_crtc->frame_intact = true;
> }
>
> - if (priv->rev == 2) {
> - if (stat & LCDC_FRAME_DONE) {
> - tilcdc_crtc->frame_done = true;
> - wake_up(&tilcdc_crtc->frame_done_wq);
> - }
> - tilcdc_write(dev, LCDC_END_OF_INT_IND_REG, 0);
> + if (priv->rev == 1)
> + return IRQ_HANDLED;
> + /* The rest is for revision 2 only */
> +
> + if (stat & LCDC_FRAME_DONE) {
> + tilcdc_crtc->frame_done = true;
> + wake_up(&tilcdc_crtc->frame_done_wq);
> }
>
> + if (stat & LCDC_FIFO_UNDERFLOW)
> + dev_err_ratelimited(dev->dev, "%s(0x%08x): FIFO underfow",
> + __func__, stat);
We do have underflow irq for rev1 too, don't we?
Why not just move the "if (priv->rev == 2) {" block to the end? Or maybe
extract the write to the LCDC_END_OF_INT_IND_REG from the current block,
and move only that to the end. Much less re-ordering needed for that.
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-06-16 9:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 8:39 [PATCH v2 0/6] drm/tilcdc Fixes and cleanups Jyri Sarha
2016-06-15 8:39 ` [PATCH v2 1/6] drm/tilcdc: Restore old dpms state in pm_resume() Jyri Sarha
2016-06-16 9:13 ` Tomi Valkeinen
2016-06-15 8:39 ` [PATCH v2 2/6] drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function Jyri Sarha
2016-06-16 9:19 ` Tomi Valkeinen [this message]
2016-06-15 8:39 ` [PATCH v2 3/6] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop() Jyri Sarha
2016-06-16 9:25 ` Tomi Valkeinen
2016-06-15 8:39 ` [PATCH v2 4/6] drm/tilcdc: Call drm_crtc_vblank_on() and *_off() in start() and stop() Jyri Sarha
2016-06-15 8:39 ` [PATCH v2 5/6] drm/tilcdc: Refer to panel.txt and tfp410.txt bindings in tilcdc.txt Jyri Sarha
2016-06-15 8:39 ` [PATCH v2 6/6] drm/tilcdc: Avoid error print by of_graph_get_next_endpoint() Jyri Sarha
2016-06-15 12:29 ` [PATCH v2 0/6] drm/tilcdc Fixes and cleanups Jyri Sarha
2016-06-16 9:30 ` Tomi Valkeinen
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=57626F27.9000608@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=bcousson@baylibre.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=laurent.pinchart@ideasonboard.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 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.