From: Thomas Hellstrom Subject: [PATCH 3/3] ttm: Update move_notify and swap_notify documentation. Date: Mon, 21 Nov 2011 13:08:38 +0100 Message-ID: <1321877318-10570-4-git-send-email-thellstrom@vmware.com> References: <1321877318-10570-1-git-send-email-thellstrom@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com [65.115.85.69]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D91AA0225 for ; Mon, 21 Nov 2011 04:08:49 -0800 (PST) In-Reply-To: <1321877318-10570-1-git-send-email-thellstrom@vmware.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: airlied@gmail.com Cc: Thomas Hellstrom , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Update the documentation of these callbacks to reflect the TTM supported way of setting up driver-private GPU maps, hoping to avoid the Radeon way leaking into new drivers. Signed-off-by: Thomas Hellstrom --- include/drm/ttm/ttm_bo_driver.h | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 94eb143..42c3e64 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -439,7 +439,15 @@ struct ttm_bo_driver { void *(*sync_obj_ref) (void *sync_obj); /* hook to notify driver about a driver move so it - * can do tiling things */ + * can do tiling things. This hook can be used to tear + * down driver private GPU mappings from the BO. It should not, + * however be used to set up such mappings, since TTM will not + * call this hook when SYSTEM placed bos are populated with pages. + * It's recommended that populating driver private GPU maps is + * done from the command-submission code, where the driver has + * a more detailed knowledge of exactly what GPU maps need + * populating. + */ void (*move_notify)(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem); /* notify the driver we are taking a fault on this BO @@ -447,7 +455,9 @@ struct ttm_bo_driver { int (*fault_reserve_notify)(struct ttm_buffer_object *bo); /** - * notify the driver that we're about to swap out this bo + * notify the driver that we're about to swap out this bo. + * Any driver private GPU maps pointing to the bo should be + * teared down at this point. */ void (*swap_notify) (struct ttm_buffer_object *bo); -- 1.7.4.4