]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Make sure bo's are unpinned before putting them back
authorZack Rusin <zackr@vmware.com>
Mon, 22 Mar 2021 17:04:11 +0000 (13:04 -0400)
committerZack Rusin <zackr@vmware.com>
Wed, 14 Apr 2021 20:41:31 +0000 (16:41 -0400)
commit44e5b9c6840dd0ad623046568646b78b7b1b0c79
treec0b3475babab37484f784507a2d5fb163b53e169
parent5e24cdba24a378444dad23448e2eeaae1d30ba93
drm/vmwgfx: Make sure bo's are unpinned before putting them back

During cotable resize we pin the backup buffer to make sure the
trylock doesn't fail. We were never unpinning the backup buffer
resulting in every subsequent cotable resize trying to release a
pinned bo. After we copy the old backup to the new we can release
the pin.
Mob's are always pinned so we just have to make sure we unpin
them before releasing them.

Reviewed-by: Thomas Hellström (Intel) <thomas_os@shipmail.org>
Fixes: d1a73c641afd ("drm/vmwgfx: Make sure we unpin no longer needed buffers")
Link: https://patchwork.freedesktop.org/patch/msgid/20210413205938.788366-1-zackr@vmware.com
Signed-off-by: Zack Rusin <zackr@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c