Skip to content

Commit 122b15c

Browse files
xiaogang-chen-amdalexdeucher
authored andcommitted
drm/amdgpu: Use correct address to setup gart page table for vram access
Use dst input parameter to setup gart page table entries instead of using fixed location. Fixes: 237d623 ("drm/amdgpu/gart: Add helper to bind VRAM pages (v2)") Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit ca5d4db)
1 parent 9c81200 commit 122b15c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ void amdgpu_gart_map(struct amdgpu_device *adev, uint64_t offset,
375375
* @start_page: first page to map in the GART aperture
376376
* @num_pages: number of pages to be mapped
377377
* @flags: page table entry flags
378-
* @dst: CPU address of the GART table
378+
* @dst: valid CPU address of GART table, cannot be null
379379
*
380380
* Binds a BO that is allocated in VRAM to the GART page table
381381
* (all ASICs).
@@ -396,7 +396,7 @@ void amdgpu_gart_map_vram_range(struct amdgpu_device *adev, uint64_t pa,
396396
return;
397397

398398
for (i = 0; i < num_pages; ++i) {
399-
amdgpu_gmc_set_pte_pde(adev, adev->gart.ptr,
399+
amdgpu_gmc_set_pte_pde(adev, dst,
400400
start_page + i, pa + AMDGPU_GPU_PAGE_SIZE * i, flags);
401401
}
402402

0 commit comments

Comments
 (0)