[PATCH v3 3/3] drm/vram: Implement lazy unmapping for GEM VRAM buffers

Gerd Hoffmann kraxel at redhat.com
Fri Sep 6 09:39:05 UTC 2019


> +void drm_gem_vram_bo_driver_move_notify(struct ttm_buffer_object *bo,
> +					bool evict,
> +					struct ttm_mem_reg *new_mem)
> +{
[ ... ]
> +	if (!kmap->virtual)
> +		return;
> +	ttm_bo_kunmap(kmap);
> +	kmap->virtual = NULL;
> +}

I think ttm_buffer_object_destroy() needs "if (kmap->virtual)
ttm_bo_kunmap()" too, due to the lazy unmap you can land there
with an active mapping.

cheers,
  Gerd



More information about the dri-devel mailing list