drm/ttm: Improve comment in ttm_bo_vm_ctor() about lack of ref acquisition
Approved by: kib@
This commit is contained in:
parent
df58787aad
commit
fbe1da288c
@ -285,8 +285,16 @@ ttm_bo_vm_ctor(void *handle, vm_ooffset_t size, vm_prot_t prot,
|
||||
{
|
||||
|
||||
/*
|
||||
* We don't acquire a reference on bo->kref here, because it was
|
||||
* already done in ttm_bo_mmap_single().
|
||||
* On Linux, a reference to the buffer object is acquired here.
|
||||
* The reason is that this function is not called when the
|
||||
* mmap() is initialized, but only when a process forks for
|
||||
* instance. Therefore on Linux, the reference on the bo is
|
||||
* acquired either in ttm_bo_mmap() or ttm_bo_vm_open(). It's
|
||||
* then released in ttm_bo_vm_close().
|
||||
*
|
||||
* Here, this function is called during mmap() intialization.
|
||||
* Thus, the reference acquired in ttm_bo_mmap_single() is
|
||||
* sufficient.
|
||||
*/
|
||||
|
||||
*color = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user