[PATCH v3 3/3] drm/vram: Implement lazy unmapping for GEM VRAM buffers
tzimmermann at suse.de
Fri Sep 6 10:37:47 UTC 2019
Am 06.09.19 um 11:39 schrieb Gerd Hoffmann:
>> +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.
Hmm, from my understanding, that final call to move_notify() is done by
ttm_bo_cleanup_memtype_use(), which is called from within ttm_bo_put().
If we want to add a final kunmap, There's also the release_notify()
callback, which is probably the right place to put it.
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: OpenPGP digital signature
More information about the dri-devel