drm/vmwgfx: Don't cache framebuffer maps
Subsystems (4)
PATCH 1/1 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 <[email protected]>
Reviewed-by Sinclair Yeh <[email protected]>
Cc <[email protected]>
--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 ------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 41 +++++++++++------------------------- 3 files changed, 13 insertions(+), 36 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +0 -6
@@ -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);
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +1 -1
@@ -175,7 +175,7 @@ struct vmw_plane_state {int pinned;/* For CPU Blit */ -struct ttm_bo_kmap_obj host_map, guest_map; +struct ttm_bo_kmap_obj host_map;unsigned int cpp; };
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +12 -29
94 lines not on this page · raw message
Signature · 1 line
2.13.6