Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 237d623ae659 ("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 ca5d4db8db843be7ed35fc9334737490c2b58d32)

authored by

Xiaogang Chen and committed by
Alex Deucher
122b15cd 9c812001

+2 -2
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
··· 375 375 * @start_page: first page to map in the GART aperture 376 376 * @num_pages: number of pages to be mapped 377 377 * @flags: page table entry flags 378 - * @dst: CPU address of the GART table 378 + * @dst: valid CPU address of GART table, cannot be null 379 379 * 380 380 * Binds a BO that is allocated in VRAM to the GART page table 381 381 * (all ASICs). ··· 396 396 return; 397 397 398 398 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, 400 400 start_page + i, pa + AMDGPU_GPU_PAGE_SIZE * i, flags); 401 401 } 402 402