From owner-svn-src-head@FreeBSD.ORG Sun Aug 25 15:06:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 85B93345; Sun, 25 Aug 2013 15:06:49 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 728742255; Sun, 25 Aug 2013 15:06:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PF6nfk055978; Sun, 25 Aug 2013 15:06:49 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PF6nKT055977; Sun, 25 Aug 2013 15:06:49 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251506.r7PF6nKT055977@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254874 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:06:49 -0000 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;