Re: [PATCH v3] drm: Set crc->opened to false before setting crc source to NULL.

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

 



On 2019-07-26 1:37 p.m., David (Dingchen) Zhang wrote:
> From: Dingchen Zhang <dingchen.zhang@xxxxxxx>
> 
> to terminate the while-loop in drm_dp_aux_crc_work when
> drm_dp_start/stop_crc are called in the hook to set crc source.
> 
> v3: set crc->opened to false without checking (Nick)
> v2: Move spin_lock around entire crc->opened use (Daniel)
> 
> Cc: Daniel Vetter <daniel@xxxxxxxx>
> Cc: Harry Wentland <Harry.Wentland@xxxxxxx>
> Cc: Nick Kazlauskas <Nicholas.Kazlauskas@xxxxxxx>
> Signed-off-by: Dingchen Zhang <dingchen.zhang@xxxxxxx>

Looks like we dropped the ball on this and the other CRC patch. I'll
merge them now.

Reviewed-by: Harry Wentland <harry.wentland@xxxxxxx>

Harry

> ---
>  drivers/gpu/drm/drm_debugfs_crc.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
> index dac267e840af..d2d2389d8892 100644
> --- a/drivers/gpu/drm/drm_debugfs_crc.c
> +++ b/drivers/gpu/drm/drm_debugfs_crc.c
> @@ -249,6 +249,11 @@ static int crtc_crc_release(struct inode *inode, struct file *filep)
>  	struct drm_crtc *crtc = filep->f_inode->i_private;
>  	struct drm_crtc_crc *crc = &crtc->crc;
>  
> +	/* terminate the infinite while loop if 'drm_dp_aux_crc_work' running */
> +	spin_lock_irq(&crc->lock);
> +	crc->opened = false;
> +	spin_unlock_irq(&crc->lock);
> +
>  	crtc->funcs->set_crc_source(crtc, NULL);
>  
>  	spin_lock_irq(&crc->lock);
> 
_______________________________________________
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