Skip to contentSkip to conversation

drm/amdgpu: initialize bo in ras_reserve_bad_pages

PATCH In review Zhou1, Tao 3 participants 4 messages Sep 17, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Zhou1, Tao

author
#0 lore raw

PATCH 1/2 drm/amdgpu: initialize bo in ras_reserve_bad_pages

the bo pointer is reused for bad pages, initialize it in each loop

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -0
index 5f623daf5078..090daf595469 100644
@@ -1421,6 +1421,7 @@ int amdgpu_ras_reserve_bad_pages(struct amdgpu_device *adev)
 
 		data->bps_bo[i] = bo;
 		data->last_reserved = i + 1;
+		bo = NULL;
 	}
 
 	/* continue to save bad pages to eeprom even reesrve_vram fails */
Signature · 6 lines
2.17.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): [email protected]

author
#2 lore raw

PATCH 2/2 drm/amdgpu: fix size calc error in bo_create_kernel_at

replace offset with size

---
 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 ecad84e1b4e2..2fcd2d14cbf0 100644
@@ -366,7 +366,7 @@ int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev,
 	int r;
 
 	offset &= PAGE_MASK;
-	size = ALIGN(offset, PAGE_SIZE);
+	size = ALIGN(size, PAGE_SIZE);
 
 	r = amdgpu_bo_create_reserved(adev, size, PAGE_SIZE, domain, bo_ptr,
 				      NULL, NULL);
Signature · 6 lines
2.17.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): [email protected]

Reviewed-by Guchun Chen
#4 lore raw

RE: [PATCH 2/2] drm/amdgpu: fix size calc error in bo_create_kernel_at

Series is:

Regards,
Guchun

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Tuesday, September 17, 2019 2:17 PM
To: [email protected]; Chen, Guchun <[email protected]>; Koenig, Christian <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: fix size calc error in bo_create_kernel_at

replace offset with size

---
 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 ecad84e1b4e2..2fcd2d14cbf0 100644
@@ -366,7 +366,7 @@ int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev,
 	int r;
 
 	offset &= PAGE_MASK;
-	size = ALIGN(offset, PAGE_SIZE);
+	size = ALIGN(size, PAGE_SIZE);
 
 	r = amdgpu_bo_create_reserved(adev, size, PAGE_SIZE, domain, bo_ptr,
 				      NULL, NULL);
Signature · 6 lines
2.17.1

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

Am 17.09.19 um 08:16 schrieb Zhou1, Tao:

Quoted 3 lines

the bo pointer is reused for bad pages, initialize it in each loop

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index 5f623daf5078..090daf595469 100644

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

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -0
@@ -1421,6 +1421,7 @@ int amdgpu_ras_reserve_bad_pages(struct amdgpu_device *adev)
 
  		data->bps_bo[i] = bo;
  		data->last_reserved = i + 1;
+		bo = NULL;
  	}
 
  	/* continue to save bad pages to eeprom even reesrve_vram fails */

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