From: Daniel Vetter <daniel@ffwll.ch>
To: Jyri Sarha <jsarha@ti.com>
Cc: bcousson@baylibre.com, dri-devel@lists.freedesktop.org,
tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH 3/5] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop()
Date: Tue, 14 Jun 2016 18:24:31 +0200 [thread overview]
Message-ID: <20160614162431.GY1338@phenom.ffwll.local> (raw)
In-Reply-To: <310de45e94d71c2cf0383200c062fe6177ca74c5.1465904170.git.jsarha@ti.com>
On Tue, Jun 14, 2016 at 02:45:04PM +0300, Jyri Sarha wrote:
> Move wait queue waiting of LCDC_FRAME_DONE IRQ from tilcdc_crtc_dpms()
> into stop() function.
>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
You should also call drm_crtc_vblank_on/off, to make sure any vblank waits
and anything else gets properly cleaned up.
-Daniel
> ---
> drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 31 ++++++++++++++++---------------
> 1 file changed, 16 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index 1343717..cfa1a4e 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -113,9 +113,25 @@ static void start(struct drm_crtc *crtc)
>
> static void stop(struct drm_crtc *crtc)
> {
> + struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
> struct drm_device *dev = crtc->dev;
> + struct tilcdc_drm_private *priv = dev->dev_private;
>
> + tilcdc_crtc->frame_done = false;
> tilcdc_clear(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
> +
> + /*
> + * if necessary wait for framedone irq which will still come
> + * before putting things to sleep..
> + */
> + if (priv->rev == 2) {
> + int ret = wait_event_timeout(tilcdc_crtc->frame_done_wq,
> + tilcdc_crtc->frame_done,
> + msecs_to_jiffies(50));
> + if (ret == 0)
> + dev_err(dev->dev, "%s: timeout waiting for framedone\n",
> + __func__);
> + }
> }
>
> static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
> @@ -212,22 +228,7 @@ void tilcdc_crtc_dpms(struct drm_crtc *crtc, int mode)
> pm_runtime_get_sync(dev->dev);
> start(crtc);
> } else {
> - tilcdc_crtc->frame_done = false;
> stop(crtc);
> -
> - /*
> - * if necessary wait for framedone irq which will still come
> - * before putting things to sleep..
> - */
> - if (priv->rev == 2) {
> - int ret = wait_event_timeout(
> - tilcdc_crtc->frame_done_wq,
> - tilcdc_crtc->frame_done,
> - msecs_to_jiffies(50));
> - if (ret == 0)
> - dev_err(dev->dev, "timeout waiting for framedone\n");
> - }
> -
> pm_runtime_put_sync(dev->dev);
>
> if (tilcdc_crtc->next_fb) {
> --
> 1.9.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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-14 16:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 11:45 [PATCH 0/5] drm/tilcdc Fixes and cleanups Jyri Sarha
2016-06-14 11:45 ` [PATCH 1/5] drm/tilcdc: Restore old dmps state in pm_resume() Jyri Sarha
2016-06-14 11:48 ` Tomi Valkeinen
2016-06-14 16:22 ` Daniel Vetter
2016-06-14 11:45 ` [PATCH 2/5] drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function Jyri Sarha
2016-06-14 11:45 ` [PATCH 3/5] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop() Jyri Sarha
2016-06-14 16:24 ` Daniel Vetter [this message]
2016-06-14 11:45 ` [PATCH 4/5] drm/tilcdc: Refer to panel.txt and tfp410.txt bindings in tilcdc.txt Jyri Sarha
2016-06-14 11:45 ` [PATCH 5/5] drm/tilcdc: Avoid error print by of_graph_get_next_endpoint() Jyri Sarha
2016-06-14 11:50 ` Jyri Sarha
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=20160614162431.GY1338@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=bcousson@baylibre.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=tomi.valkeinen@ti.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