提交 14b18937 编写于 作者: A Alex Deucher

drm/amdgpu: drop the CPU pointers for the stolen vga bos

We never use them.
Reviewed-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 7348c20a
...@@ -1915,7 +1915,6 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) ...@@ -1915,7 +1915,6 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
uint64_t gtt_size; uint64_t gtt_size;
int r; int r;
u64 vis_vram_limit; u64 vis_vram_limit;
void *stolen_vga_buf, *stolen_extended_buf;
mutex_init(&adev->mman.gtt_window_lock); mutex_init(&adev->mman.gtt_window_lock);
...@@ -1982,14 +1981,14 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) ...@@ -1982,14 +1981,14 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
r = amdgpu_bo_create_kernel_at(adev, 0, adev->gmc.stolen_vga_size, r = amdgpu_bo_create_kernel_at(adev, 0, adev->gmc.stolen_vga_size,
AMDGPU_GEM_DOMAIN_VRAM, AMDGPU_GEM_DOMAIN_VRAM,
&adev->gmc.stolen_vga_memory, &adev->gmc.stolen_vga_memory,
&stolen_vga_buf); NULL);
if (r) if (r)
return r; return r;
r = amdgpu_bo_create_kernel_at(adev, adev->gmc.stolen_vga_size, r = amdgpu_bo_create_kernel_at(adev, adev->gmc.stolen_vga_size,
adev->gmc.stolen_extended_size, adev->gmc.stolen_extended_size,
AMDGPU_GEM_DOMAIN_VRAM, AMDGPU_GEM_DOMAIN_VRAM,
&adev->gmc.stolen_extended_memory, &adev->gmc.stolen_extended_memory,
&stolen_extended_buf); NULL);
if (r) if (r)
return r; return r;
...@@ -2048,13 +2047,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) ...@@ -2048,13 +2047,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
*/ */
void amdgpu_ttm_late_init(struct amdgpu_device *adev) void amdgpu_ttm_late_init(struct amdgpu_device *adev)
{ {
void *stolen_vga_buf, *stolen_extended_buf;
/* return the VGA stolen memory (if any) back to VRAM */ /* return the VGA stolen memory (if any) back to VRAM */
if (!adev->gmc.keep_stolen_vga_memory) if (!adev->gmc.keep_stolen_vga_memory)
amdgpu_bo_free_kernel(&adev->gmc.stolen_vga_memory, NULL, &stolen_vga_buf); amdgpu_bo_free_kernel(&adev->gmc.stolen_vga_memory, NULL, NULL);
amdgpu_bo_free_kernel(&adev->gmc.stolen_extended_memory, NULL, amdgpu_bo_free_kernel(&adev->gmc.stolen_extended_memory, NULL, NULL);
&stolen_extended_buf);
} }
/** /**
...@@ -2062,15 +2058,13 @@ void amdgpu_ttm_late_init(struct amdgpu_device *adev) ...@@ -2062,15 +2058,13 @@ void amdgpu_ttm_late_init(struct amdgpu_device *adev)
*/ */
void amdgpu_ttm_fini(struct amdgpu_device *adev) void amdgpu_ttm_fini(struct amdgpu_device *adev)
{ {
void *stolen_vga_buf;
if (!adev->mman.initialized) if (!adev->mman.initialized)
return; return;
amdgpu_ttm_training_reserve_vram_fini(adev); amdgpu_ttm_training_reserve_vram_fini(adev);
/* return the stolen vga memory back to VRAM */ /* return the stolen vga memory back to VRAM */
if (adev->gmc.keep_stolen_vga_memory) if (adev->gmc.keep_stolen_vga_memory)
amdgpu_bo_free_kernel(&adev->gmc.stolen_vga_memory, NULL, &stolen_vga_buf); amdgpu_bo_free_kernel(&adev->gmc.stolen_vga_memory, NULL, NULL);
/* return the IP Discovery TMR memory back to VRAM */ /* return the IP Discovery TMR memory back to VRAM */
amdgpu_bo_free_kernel(&adev->discovery_memory, NULL, NULL); amdgpu_bo_free_kernel(&adev->discovery_memory, NULL, NULL);
amdgpu_ttm_fw_reserve_vram_fini(adev); amdgpu_ttm_fw_reserve_vram_fini(adev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册