OSDN Git Service

drm/vmwgfx: Don't cache framebuffer maps
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 9 Jan 2018 14:33:42 +0000 (15:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:45:24 +0000 (09:45 +0100)
commit2f6ff75e484bca49202cdc132787bc5d29d8a139
treeabf77f6d082789abae124255fe28e25ad03facb3
parent02453a0f8f54a00aff82daa287627c328f121a18
drm/vmwgfx: Don't cache framebuffer maps

commit 98648ae6ef6bdcdcb88c46cad963906ab452e96d upstream.

Buffer objects need to be either pinned or reserved while a map is active,
that's not the case here, so avoid caching the framebuffer map.
This will cause increasing mapping activity mainly when we don't do
page flipping.

This fixes occasional garbage filled screens when the framebuffer has been
evicted after the map.

Since in-kernel mapping of whole buffer objects is error-prone on 32-bit
architectures and also quite inefficient, we will revisit this later.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c