[PATCH 1/1] drm/vmwgfx: free bo resource before assigning new one
Das, Nirmoy
nirmoy.das at amd.com
Tue Jun 8 18:05:17 UTC 2021
Please ignore this, I wanted to send
https://patchwork.kernel.org/project/dri-devel/patch/20210503190013.91732-1-nirmoy.das@amd.com/
after rebase.
On 6/8/2021 8:01 PM, Nirmoy Das wrote:
> ttm_bo_assign_mem() expects bo->resource to be free.
> Fixes: bfa3357ef9abc ("drm/ttm: allocate resource object instead of embedding it v2")
>
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> index bfcf31bf7e37..7281912436bb 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> @@ -733,6 +733,7 @@ static int vmw_move(struct ttm_buffer_object *bo,
>
> if (old_man->use_tt && new_man->use_tt) {
> if (bo->resource->mem_type == TTM_PL_SYSTEM) {
> + ttm_resource_free(bo, &bo->resource);
> ttm_bo_assign_mem(bo, new_mem);
> return 0;
> }
More information about the dri-devel
mailing list