[PATCH v2 3/6] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop()

Tomi Valkeinen tomi.valkeinen at ti.com
Thu Jun 16 09:25:13 UTC 2016


On 15/06/16 11:39, Jyri Sarha wrote:
> Move wait queue waiting of LCDC_FRAME_DONE IRQ from tilcdc_crtc_dpms()
> into stop() function.

You could mention the reason for this, which is just a cleanup here (I
presume).

> Signed-off-by: Jyri Sarha <jsarha at ti.com>
> ---
>  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));

Not part of this patch, but I think the timeout could be increased quite
a bit. It's never supposed to happen. And while video timings with 50ms
frames are not common, I don't see that as impossible either.

Of course, optimally the timeout would be calculated from the video
timings, which shouldn't be too difficult either...

Anyway, as I said, not part of this patch.

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160616/053eb097/attachment.sig>


More information about the dri-devel mailing list