Hi 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. Best regards Thomas > > cheers, > Gerd > -- Thomas Zimmermann Graphics Driver Developer SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg)