* [PATCH v2] drm/amdgpu: Use correct address to setup gart page table for vram access
@ 2026-01-08 16:00 Xiaogang.Chen
2026-01-08 16:10 ` Alex Deucher
2026-01-09 8:54 ` Christian König
0 siblings, 2 replies; 3+ messages in thread
From: Xiaogang.Chen @ 2026-01-08 16:00 UTC (permalink / raw)
To: amd-gfx; +Cc: alexdeucher, Xiaogang Chen
From: Xiaogang Chen <xiaogang.chen@amd.com>
Fixes: 68a5940841684 ("drm/amdgpu/gart: Add helper to bind VRAM pages (v2)")
Use dst input parameter to setup gart page table entries instead of using fixed
location.
Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index 16c3b78e50cb..ec911dce345f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
@@ -375,7 +375,7 @@ void amdgpu_gart_map(struct amdgpu_device *adev, uint64_t offset,
* @start_page: first page to map in the GART aperture
* @num_pages: number of pages to be mapped
* @flags: page table entry flags
- * @dst: CPU address of the GART table
+ * @dst: valid CPU address of GART table, cannot be null
*
* Binds a BO that is allocated in VRAM to the GART page table
* (all ASICs).
@@ -396,7 +396,7 @@ void amdgpu_gart_map_vram_range(struct amdgpu_device *adev, uint64_t pa,
return;
for (i = 0; i < num_pages; ++i) {
- amdgpu_gmc_set_pte_pde(adev, adev->gart.ptr,
+ amdgpu_gmc_set_pte_pde(adev, dst,
start_page + i, pa + AMDGPU_GPU_PAGE_SIZE * i, flags);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] drm/amdgpu: Use correct address to setup gart page table for vram access
2026-01-08 16:00 [PATCH v2] drm/amdgpu: Use correct address to setup gart page table for vram access Xiaogang.Chen
@ 2026-01-08 16:10 ` Alex Deucher
2026-01-09 8:54 ` Christian König
1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2026-01-08 16:10 UTC (permalink / raw)
To: Xiaogang.Chen; +Cc: amd-gfx
On Thu, Jan 8, 2026 at 11:08 AM Xiaogang.Chen <xiaogang.chen@amd.com> wrote:
>
> From: Xiaogang Chen <xiaogang.chen@amd.com>
>
> Fixes: 68a5940841684 ("drm/amdgpu/gart: Add helper to bind VRAM pages (v2)")
>
> Use dst input parameter to setup gart page table entries instead of using fixed
> location.
>
> Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> index 16c3b78e50cb..ec911dce345f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> @@ -375,7 +375,7 @@ void amdgpu_gart_map(struct amdgpu_device *adev, uint64_t offset,
> * @start_page: first page to map in the GART aperture
> * @num_pages: number of pages to be mapped
> * @flags: page table entry flags
> - * @dst: CPU address of the GART table
> + * @dst: valid CPU address of GART table, cannot be null
> *
> * Binds a BO that is allocated in VRAM to the GART page table
> * (all ASICs).
> @@ -396,7 +396,7 @@ void amdgpu_gart_map_vram_range(struct amdgpu_device *adev, uint64_t pa,
> return;
>
> for (i = 0; i < num_pages; ++i) {
> - amdgpu_gmc_set_pte_pde(adev, adev->gart.ptr,
> + amdgpu_gmc_set_pte_pde(adev, dst,
> start_page + i, pa + AMDGPU_GPU_PAGE_SIZE * i, flags);
> }
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] drm/amdgpu: Use correct address to setup gart page table for vram access
2026-01-08 16:00 [PATCH v2] drm/amdgpu: Use correct address to setup gart page table for vram access Xiaogang.Chen
2026-01-08 16:10 ` Alex Deucher
@ 2026-01-09 8:54 ` Christian König
1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2026-01-09 8:54 UTC (permalink / raw)
To: Xiaogang.Chen, amd-gfx; +Cc: alexdeucher
On 1/8/26 17:00, Xiaogang.Chen wrote:
> From: Xiaogang Chen <xiaogang.chen@amd.com>
>
> Fixes: 68a5940841684 ("drm/amdgpu/gart: Add helper to bind VRAM pages (v2)")
>
> Use dst input parameter to setup gart page table entries instead of using fixed
> location.
>
> Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> index 16c3b78e50cb..ec911dce345f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
> @@ -375,7 +375,7 @@ void amdgpu_gart_map(struct amdgpu_device *adev, uint64_t offset,
> * @start_page: first page to map in the GART aperture
> * @num_pages: number of pages to be mapped
> * @flags: page table entry flags
> - * @dst: CPU address of the GART table
> + * @dst: valid CPU address of GART table, cannot be null
> *
> * Binds a BO that is allocated in VRAM to the GART page table
> * (all ASICs).
> @@ -396,7 +396,7 @@ void amdgpu_gart_map_vram_range(struct amdgpu_device *adev, uint64_t pa,
> return;
>
> for (i = 0; i < num_pages; ++i) {
> - amdgpu_gmc_set_pte_pde(adev, adev->gart.ptr,
> + amdgpu_gmc_set_pte_pde(adev, dst,
> start_page + i, pa + AMDGPU_GPU_PAGE_SIZE * i, flags);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-09 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 16:00 [PATCH v2] drm/amdgpu: Use correct address to setup gart page table for vram access Xiaogang.Chen
2026-01-08 16:10 ` Alex Deucher
2026-01-09 8:54 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox