svn commit: r254874 - head/sys/dev/drm2/ttm
Jean-Sebastien Pedron
dumbbell at FreeBSD.org
Sun Aug 25 15:06:49 UTC 2013
Author: dumbbell
Date: Sun Aug 25 15:06:48 2013
New Revision: 254874
URL: http://svnweb.freebsd.org/changeset/base/254874
Log:
drm/ttm: Improve comment in ttm_bo_vm_ctor() about lack of ref acquisition
Approved by: kib@
Modified:
head/sys/dev/drm2/ttm/ttm_bo_vm.c
Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c
==============================================================================
--- head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:05:22 2013 (r254873)
+++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:06:48 2013 (r254874)
@@ -285,8 +285,16 @@ ttm_bo_vm_ctor(void *handle, vm_ooffset_
{
/*
- * 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;
More information about the svn-src-head
mailing list