Skip to contentSkip to conversation

drm/amdgpu/ras: use GPU PAGE_SIZE/SHIFT for reserving pages

PATCH In review Alex Deucher 3 participants 3 messages Sep 16, 2019 – Sep 17, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/ras: use GPU PAGE_SIZE/SHIFT for reserving pages

We are reserving vram pages so they should be aligned to the GPU page size.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
index ff1fc084ffe1..131c53fa8eff 100644
@@ -1409,7 +1409,8 @@ int amdgpu_ras_reserve_bad_pages(struct amdgpu_device *adev)
 	for (i = data->last_reserved; i < data->count; i++) {
 		bp = data->bps[i].retired_page;
 
-		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, PAGE_SIZE,
+		if (amdgpu_bo_create_kernel_at(adev, bp << AMDGPU_GPU_PAGE_SHIFT,
+					       AMDGPU_GPU_PAGE_SIZE,
 					       AMDGPU_GEM_DOMAIN_VRAM,
 					       &bo, NULL))
 			DRM_ERROR("RAS ERROR: reserve vram %llx fail\n", bp);
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20190916195052.29281-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by Tao Zhou
#2 lore raw
Quoted 38 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2019年9月17日 3:51
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/ras: use GPU PAGE_SIZE/SHIFT for reserving pages

We are reserving vram pages so they should be aligned to the GPU page size.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
index ff1fc084ffe1..131c53fa8eff 100644
@@ -1409,7 +1409,8 @@ int amdgpu_ras_reserve_bad_pages(struct
 amdgpu_device *adev)
 	for (i = data->last_reserved; i < data->count; i++) {
 		bp = data->bps[i].retired_page;
 
-		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT,
 PAGE_SIZE,
+		if (amdgpu_bo_create_kernel_at(adev, bp <<
 AMDGPU_GPU_PAGE_SHIFT,
+					       AMDGPU_GPU_PAGE_SIZE,
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
 					       AMDGPU_GEM_DOMAIN_VRAM,
 					       &bo, NULL))
 			DRM_ERROR("RAS ERROR: reserve vram %llx fail\n",

bp);
--
2.20.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#3 lore raw
In reply to a message not in the archive

Am 16.09.19 um 21:50 schrieb Alex Deucher:

Quoted 4 lines

We are reserving vram pages so they should be aligned to the GPU page size.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index ff1fc084ffe1..131c53fa8eff 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_reserve_bad_pages(struct amdgpu_device *adev) · line 1416

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
@@ -1409,7 +1409,8 @@ int amdgpu_ras_reserve_bad_pages(struct amdgpu_device *adev)
  	for (i = data->last_reserved; i < data->count; i++) {
  		bp = data->bps[i].retired_page;
 
-		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, PAGE_SIZE,
+		if (amdgpu_bo_create_kernel_at(adev, bp << AMDGPU_GPU_PAGE_SHIFT,
+					       AMDGPU_GPU_PAGE_SIZE,
  					       AMDGPU_GEM_DOMAIN_VRAM,
  					       &bo, NULL))
  			DRM_ERROR("RAS ERROR: reserve vram %llx fail\n", bp);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx