On Thu, Jul 11, 2013 at 5:43 PM, Jean-Sébastien Pédron jean-sebastien.pedron@dumbbell.fr wrote:
Hi,
Thank you Jérôme and Daniel for your input, that's really helpful!
I have another question: in ttm_bo_mmap(), a reference to the buffer object is acquired at the beginning of the function. Another reference is acquired in ttm_bo_vm_open() (released in ttm_bo_vm_close()).
But where is the first reference released?
-- Jean-Sébastien Pédron
the ttm_bo_vm_open is not call on first time a vma is mmap, ie when userspace do mmap it call driver mmap callback which call ttm_bo_mmap but ttm_bo_vm_open is never call. If the same process or another process mmap the same area or subarea the ttm_bo_vm_open is call. Then on each unmap ttm_bo_vm_close is call.
Cheers, Jerome