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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> ---
>  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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux