Skip to contentSkip to conversation

drm/amdgpu/gfx8: fix CP jump table size

PATCH In review Alex Deucher 2 participants 4 messages Jun 10, 2016 – Jun 13, 2016

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

PATCH 1/3 drm/amdgpu/gfx8: fix CP jump table size

Align to the jump table offset. Fixes hangs on some systems with GFX PG enabled.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -1
index 4e34877..42dc5fe 100644
@@ -1299,7 +1299,7 @@ static int gfx_v8_0_rlc_init(struct amdgpu_device *adev)
 
 	if ((adev->asic_type == CHIP_CARRIZO) ||
 	    (adev->asic_type == CHIP_STONEY)) {
-		adev->gfx.rlc.cp_table_size = (96 * 5 * 4) + (64 * 1024); /* JT + GDS */
+		adev->gfx.rlc.cp_table_size = ALIGN(96 * 5 * 4, 2048) + (64 * 1024); /* JT + GDS */
 		if (adev->gfx.rlc.cp_table_obj == NULL) {
 			r = amdgpu_bo_create(adev, adev->gfx.rlc.cp_table_size, PAGE_SIZE, true,
 					     AMDGPU_GEM_DOMAIN_VRAM,
Signature · 6 lines
2.5.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/3 drm/amdgpu/gfx7: fix CP jump table size

Align to the jump table offset. May fix hangs on some asics with GFX PG enabled.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -1
index 0f8149d..34227e2 100644
@@ -3221,7 +3221,7 @@ static int gfx_v7_0_rlc_init(struct amdgpu_device *adev)
 		}
 	}
 	adev->gfx.rlc.cs_data = ci_cs_data;
-	adev->gfx.rlc.cp_table_size = CP_ME_TABLE_SIZE * 5 * 4; /* CP JT */
+	adev->gfx.rlc.cp_table_size = ALIGN(CP_ME_TABLE_SIZE * 5 * 4, 2048); /* CP JT */
 	adev->gfx.rlc.cp_table_size += 64 * 1024; /* GDS */
 
 	src_ptr = adev->gfx.rlc.reg_list;
Signature · 6 lines
2.5.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

PATCH 3/3 drm/radeon/cik: fix CP jump table size

In reply to Alex Deucher

Align to the jump table offset. May fix hangs on some asics with GFX PG enabled.

---
 drivers/gpu/drm/radeon/cik.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/cik.c +1 -1
index 3beac4e..0c1b9ff 100644
@@ -8366,7 +8366,7 @@ static int cik_startup(struct radeon_device *rdev)
 		}
 	}
 	rdev->rlc.cs_data = ci_cs_data;
-	rdev->rlc.cp_table_size = CP_ME_TABLE_SIZE * 5 * 4; /* CP JT */
+	rdev->rlc.cp_table_size = ALIGN(CP_ME_TABLE_SIZE * 5 * 4, 2048); /* CP JT */
 	rdev->rlc.cp_table_size += 64 * 1024; /* GDS */
 	r = sumo_rlc_init(rdev);
 	if (r) {
Signature · 6 lines
2.5.5

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by Tested-by on v1 1/3
#3 lore raw
In reply to Alex Deucher

For the series:

This patch is also:

Quoted 14 lines · Alex Deucher

Align to the jump table offset. Fixes hangs on some systems with GFX PG enabled.

---
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -0
index 4e34877..42dc5fe 100644

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_rlc_init(struct amdgpu_device *adev) · line 1305

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -1
@@ -1299,7 +1299,7 @@ static int gfx_v8_0_rlc_init(struct amdgpu_device *adev)
 
  	if ((adev->asic_type == CHIP_CARRIZO) ||
  	    (adev->asic_type == CHIP_STONEY)) {
-		adev->gfx.rlc.cp_table_size = (96 * 5 * 4) + (64 * 1024); /* JT + GDS */
+		adev->gfx.rlc.cp_table_size = ALIGN(96 * 5 * 4, 2048) + (64 * 1024); /* JT + GDS */
  		if (adev->gfx.rlc.cp_table_obj == NULL) {
  			r = amdgpu_bo_create(adev, adev->gfx.rlc.cp_table_size, PAGE_SIZE, true,
  					     AMDGPU_GEM_DOMAIN_VRAM,

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