drm/amdgpu: Add comment to function amdgpu_ttm_alloc_gart
authorOak Zeng <Oak.Zeng@amd.com>
Wed, 5 Aug 2020 15:53:09 +0000 (10:53 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Sep 2020 21:52:42 +0000 (17:52 -0400)
Add comments to refect what function does

Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Reviewed-by: Christian Konig <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index a18dc87..257a1ba 100644 (file)
@@ -1155,7 +1155,12 @@ static int amdgpu_ttm_backend_bind(struct ttm_tt *ttm,
 }
 
 /**
- * amdgpu_ttm_alloc_gart - Allocate GART memory for buffer object
+ * amdgpu_ttm_alloc_gart - Make sure buffer object is accessible either
+ * through AGP or GART aperture.
+ *
+ * If bo is accessible through AGP aperture, then use AGP aperture
+ * to access bo; otherwise allocate logical space in GART aperture
+ * and map bo to GART aperture.
  */
 int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo)
 {