RE: [PATCH] drm/ttm: once more fix ttm_buffer_object_transfer

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

 



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf
> Of Christian König
> Sent: Monday, October 30, 2017 10:00 AM
> To: dri-devel@xxxxxxxxxxxxxxxxxxxxx; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: [PATCH] drm/ttm: once more fix ttm_buffer_object_transfer
> 
> From: Christian König <christian.koenig@xxxxxxx>
> 
> When the mutex is locked just in the moment we copy it we end up with a
> warning that we release a locked mutex.
> 
> Fix this by properly reinitializing the mutex.
> 
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

Stable?

Alex

> ---
>  drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c
> b/drivers/gpu/drm/ttm/ttm_bo_util.c
> index 78cb99be7146..e7a519f1849b 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> @@ -474,6 +474,7 @@ static int ttm_buffer_object_transfer(struct
> ttm_buffer_object *bo,
>  	INIT_LIST_HEAD(&fbo->lru);
>  	INIT_LIST_HEAD(&fbo->swap);
>  	INIT_LIST_HEAD(&fbo->io_reserve_lru);
> +	mutex_init(&fbo->wu_mutex);
>  	fbo->moving = NULL;
>  	drm_vma_node_reset(&fbo->vma_node);
>  	atomic_set(&fbo->cpu_writers, 0);
> --
> 2.11.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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