]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Make sure we unpin no longer needed buffers
authorZack Rusin <zackr@vmware.com>
Thu, 14 Jan 2021 23:38:16 +0000 (18:38 -0500)
committerZack Rusin <zackr@vmware.com>
Wed, 14 Apr 2021 20:41:02 +0000 (16:41 -0400)
commit4a798a6286576c2ebae6596114ed5c529da2f8e1
tree8cceefe98f43f4ba5cd1f9de06ef9cc3495c84ec
parentee7c5a800b7712543c03f412a7611ba9000cd43f
drm/vmwgfx: Make sure we unpin no longer needed buffers

We were not correctly unpinning no longer needed buffers. In particular
vmw_buffer_object, which is internally often pinned on creation wasn't
unpinned on destruction and none of the internal MOB buffers were
unpinned before being put back. Technically this existed for a
long time but commit 85eebbaf2588 ("drm/ttm: Warn on pinning without
holding a reference") introduced a WARN_ON which was filling up the
kernel logs rather quickly.

Quite frankly internal usage of vmw_buffer_object and in general
pinning needs to be refactored in vmwgfx but for now this makes
it work.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Fixes: 85eebbaf2588 ("drm/ttm: Warn on pinning without holding a reference")
Link: https://patchwork.freedesktop.org/patch/414984/?series=86052&rev=1
Cc: Huang Rui <ray.huang@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: dri-devel@lists.freedesktop.org
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c