Skip to contentSkip to conversation

drm/amdgpu: fix the incorrect scratch reg number on gfx v9

PATCH In review Huang Rui 3 participants 3 messages Jul 20, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix the incorrect scratch reg number on gfx v9

There are 8 scratch registers on gfx v9 (scrach_reg0 -> scratch_reg7).

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
index 48b43ea..4d7f042 100644
@@ -211,7 +211,7 @@ static void gfx_v9_0_init_golden_registers(struct amdgpu_device *adev)
 
 static void gfx_v9_0_scratch_init(struct amdgpu_device *adev)
 {
-	adev->gfx.scratch.num_reg = 7;
+	adev->gfx.scratch.num_reg = 8;
 	adev->gfx.scratch.reg_base = SOC15_REG_OFFSET(GC, 0, mmSCRATCH_REG0);
 	adev->gfx.scratch.free_mask = (1u << adev->gfx.scratch.num_reg) - 1;
 }
Signature · 6 lines
2.7.4

_______________________________________________
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): 1500517276-13243-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org

Reviewed-by Junwei Zhang
#2 lore raw
Quoted 1 line · Huang Rui

There are 8 scratch registers on gfx v9 (scrach_reg0 -> scratch_reg7).

Yeah, nice catch.

Additionally it looks incorrect from gfx v6 till gfx9. Could you fix them all?

Jerry

Quoted 12 lines
---
  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -0
index 48b43ea..4d7f042 100644

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_init_golden_registers(struct amdgpu_device *adev) · line 217

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
@@ -211,7 +211,7 @@ static void gfx_v9_0_init_golden_registers(struct amdgpu_device *adev)
 
  static void gfx_v9_0_scratch_init(struct amdgpu_device *adev)
  {
-	adev->gfx.scratch.num_reg = 7;
+	adev->gfx.scratch.num_reg = 8;
  	adev->gfx.scratch.reg_base = SOC15_REG_OFFSET(GC, 0, mmSCRATCH_REG0);
  	adev->gfx.scratch.free_mask = (1u << adev->gfx.scratch.num_reg) - 1;
  }

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

Reviewed-by Alex Deucher
#3 lore raw
In reply to a message not in the archive
Quoted 11 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Huang Rui
Sent: Wednesday, July 19, 2017 10:21 PM
To: [email protected]
Cc: Huang, Ray
Subject: [PATCH] drm/amdgpu: fix the incorrect scratch reg number on gfx v9

There are 8 scratch registers on gfx v9 (scrach_reg0 -> scratch_reg7).

Quoted 24 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
index 48b43ea..4d7f042 100644
@@ -211,7 +211,7 @@ static void gfx_v9_0_init_golden_registers(struct
 amdgpu_device *adev)
 
 static void gfx_v9_0_scratch_init(struct amdgpu_device *adev)
 {
-	adev->gfx.scratch.num_reg = 7;
+	adev->gfx.scratch.num_reg = 8;
 	adev->gfx.scratch.reg_base = SOC15_REG_OFFSET(GC, 0,
 mmSCRATCH_REG0);

adev->gfx.scratch.free_mask = (1u << adev->gfx.scratch.num_reg) -
1;
}
--
2.7.4

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