Questions about TTM buffer object maping

David Herrmann dh.herrmann at gmail.com
Thu Jul 11 14:51:47 PDT 2013


Hi

On Thu, Jul 11, 2013 at 11:43 PM, Jean-Sébastien Pédron
<jean-sebastien.pedron at 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?

->vm_open() isn't called for the first mmap(), afaik (only called
during fork()s or similar). So the reference in ttm_bo_mmap() is a
replacement for the reference you take in the ->vm_open() callback.

Cheers
David

> --
> Jean-Sébastien Pédron
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list