On Wed, Aug 07, 2019 at 01:51:33PM +0200, Gerd Hoffmann wrote:
Hi,
I don't think so. drm_gem_dumb_map_offset() calls drm_gem_create_mmap_offset(), which I think is not correct for ttm objects because ttm_bo_init() handles vma_node initialization.
Ok I looked again, and your ttm version seems to exactly match drm_gem_dumb_map_offset(),
No. The difference outlined above is still there. See also v2 which adds an comment saying so.
Creating an mmap offset is idempotent. Otherwise the gem version would already blow up real bad, since it's getting called multiple times by userspace already.
So I still think ttm isn't special here, how did this blow up when you tried? -Daniel