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)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 9 Jan 2018 14:33:42 +0000 (15:33 +0100)
commit98648ae6ef6bdcdcb88c46cad963906ab452e96d
tree621c69ce4bbc1641c1bab58248efbe1a3909d144
parentb0bb222440a5c8273f67dd37946707e6ba6ad832
drm/vmwgfx: Don't cache framebuffer maps

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>
Cc: <stable@vger.kernel.org>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c