Skip to contentSkip to conversation

drm/amdgpu: use PAGE_SHIFT rather than PAGE_SIZE to get the shift

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

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

PATCH 1/2 drm/amdgpu: use PAGE_SHIFT rather than PAGE_SIZE to get the shift

Looks like a copy and paste typo.

Fixes 0d9a80213829 ("drm/amdgpu: cleanup creating BOs at fixed location")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
index be49419778db..ff1fc084ffe1 100644
@@ -1409,7 +1409,7 @@ 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_SIZE, PAGE_SIZE,
+		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, 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): 20190916184313.20567-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 2/2 drm/amdgpu: fix documentation for amdgpu_bo_create_kernel_at

Typo in the function name.

Fixes 0d9a80213829 ("drm/amdgpu: cleanup creating BOs at fixed location")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -1
index 70d45d48907a..ecad84e1b4e2 100644
@@ -343,7 +343,7 @@ int amdgpu_bo_create_kernel(struct amdgpu_device *adev,
 }
 
 /**
- * amdgpu_bo_create_kernel - create BO for kernel use at specific location
+ * amdgpu_bo_create_kernel_at - create BO for kernel use at specific location
  *
  * @adev: amdgpu device object
  * @offset: offset of the BO
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#3 lore raw
In reply to a message not in the archive

Series is Reviewed-by: Andrey Grodzovsky <[email protected]>

Andrey

Quoted 13 lines · Alex Deucher

Looks like a copy and paste typo.

Fixes 0d9a80213829 ("drm/amdgpu: cleanup creating BOs at fixed location")
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index be49419778db..ff1fc084ffe1 100644

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

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
@@ -1409,7 +1409,7 @@ 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_SIZE, PAGE_SIZE,
+		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, 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

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

Am 16.09.19 um 20:43 schrieb Alex Deucher:

Quoted 4 lines

Looks like a copy and paste typo.

Fixes 0d9a80213829 ("drm/amdgpu: cleanup creating BOs at fixed location")

Sorry for the noise, I don't have hardware to actually test that :(

And BTW: Shouldn't this be AMDGPU_PAGE_SIZE/SHIFT?

Thanks,
Christian.

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

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

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
@@ -1409,7 +1409,7 @@ 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_SIZE, PAGE_SIZE,
+		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, 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