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>
This commit is contained in:
@@ -697,7 +697,6 @@ vmw_du_plane_duplicate_state(struct drm_plane *plane)
|
||||
vps->pinned = 0;
|
||||
|
||||
/* Mapping is managed by prepare_fb/cleanup_fb */
|
||||
memset(&vps->guest_map, 0, sizeof(vps->guest_map));
|
||||
memset(&vps->host_map, 0, sizeof(vps->host_map));
|
||||
vps->cpp = 0;
|
||||
|
||||
@@ -760,11 +759,6 @@ vmw_du_plane_destroy_state(struct drm_plane *plane,
|
||||
|
||||
|
||||
/* Should have been freed by cleanup_fb */
|
||||
if (vps->guest_map.virtual) {
|
||||
DRM_ERROR("Guest mapping not freed\n");
|
||||
ttm_bo_kunmap(&vps->guest_map);
|
||||
}
|
||||
|
||||
if (vps->host_map.virtual) {
|
||||
DRM_ERROR("Host mapping not freed\n");
|
||||
ttm_bo_kunmap(&vps->host_map);
|
||||
|
Reference in New Issue
Block a user