]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Unpin the screen object backup buffer when not used
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 22 Mar 2018 09:35:18 +0000 (10:35 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 22 Mar 2018 11:08:24 +0000 (12:08 +0100)
commit6f13f51d736d8dffbc38ae5ae45b491a100ca55a
tree21801e5254a8e7ee292d8e25e541415fadb0b134
parent63455de17b8066a56aee10c1fea221521e770b94
drm/vmwgfx: Unpin the screen object backup buffer when not used

We were relying on the pinned screen object backup buffer to be destroyed
when not used. But if we hold a copy of the atomic state, like when
hibernating, the backup buffer might not be destroyed since it's
refcounted by the atomic state. This causes us to hibernate with a
buffer pinned in VRAM.

Fix this by only having the buffer pinned when it is actually used by a
screen object.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c