RE: [PATCH v2] drm/amdgpu: add codes to clear AccVGPR for arcturus

2020-03-12 Thread Chen, Guchun
[AMD Official Use Only - Internal Distribution Only]

Looks file mode is changed.
old mode 100644
new mode 100755

Regards,
Guchun

-Original Message-
From: Zhang, Hawking  
Sent: Friday, March 13, 2020 11:35 AM
To: Li, Dennis ; amd-gfx@lists.freedesktop.org; Deucher, 
Alexander ; Zhou1, Tao ; Chen, 
Guchun 
Cc: Li, Dennis 
Subject: RE: [PATCH v2] drm/amdgpu: add codes to clear AccVGPR for arcturus

[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Hawking Zhang 

Regards,
Hawking

-Original Message-
From: Dennis Li  
Sent: Friday, March 13, 2020 11:22
To: amd-gfx@lists.freedesktop.org; Deucher, Alexander 
; Zhou1, Tao ; Zhang, Hawking 
; Chen, Guchun 
Cc: Li, Dennis 
Subject: [PATCH v2] drm/amdgpu: add codes to clear AccVGPR for arcturus

AccVGPRs are newly added in arcturus. Before reading these registers, they 
should be initialized. Otherwise edc error happens, when RAS is enabled.

v2: reuse the existing logical to calculate register size

Change-Id: I4ed384f0cc4b781a10cfd6ad1e3a132445bdc261
Signed-off-by: Dennis Li 

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
old mode 100644
new mode 100755
index c78ffdc51373..324838baa71c
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4144,6 +4144,101 @@ static const u32 sgpr_init_compute_shader[] =
0xbe800080, 0xbf81,
 };
 
+static const u32 vgpr_init_compute_shader_arcturus[] = {
+   0xd3d94000, 0x1880, 0xd3d94001, 0x1880, 0xd3d94002, 0x1880,
+   0xd3d94003, 0x1880, 0xd3d94004, 0x1880, 0xd3d94005, 0x1880,
+   0xd3d94006, 0x1880, 0xd3d94007, 0x1880, 0xd3d94008, 0x1880,
+   0xd3d94009, 0x1880, 0xd3d9400a, 0x1880, 0xd3d9400b, 0x1880,
+   0xd3d9400c, 0x1880, 0xd3d9400d, 0x1880, 0xd3d9400e, 0x1880,
+   0xd3d9400f, 0x1880, 0xd3d94010, 0x1880, 0xd3d94011, 0x1880,
+   0xd3d94012, 0x1880, 0xd3d94013, 0x1880, 0xd3d94014, 0x1880,
+   0xd3d94015, 0x1880, 0xd3d94016, 0x1880, 0xd3d94017, 0x1880,
+   0xd3d94018, 0x1880, 0xd3d94019, 0x1880, 0xd3d9401a, 0x1880,
+   0xd3d9401b, 0x1880, 0xd3d9401c, 0x1880, 0xd3d9401d, 0x1880,
+   0xd3d9401e, 0x1880, 0xd3d9401f, 0x1880, 0xd3d94020, 0x1880,
+   0xd3d94021, 0x1880, 0xd3d94022, 0x1880, 0xd3d94023, 0x1880,
+   0xd3d94024, 0x1880, 0xd3d94025, 0x1880, 0xd3d94026, 0x1880,
+   0xd3d94027, 0x1880, 0xd3d94028, 0x1880, 0xd3d94029, 0x1880,
+   0xd3d9402a, 0x1880, 0xd3d9402b, 0x1880, 0xd3d9402c, 0x1880,
+   0xd3d9402d, 0x1880, 0xd3d9402e, 0x1880, 0xd3d9402f, 0x1880,
+   0xd3d94030, 0x1880, 0xd3d94031, 0x1880, 0xd3d94032, 0x1880,
+   0xd3d94033, 0x1880, 0xd3d94034, 0x1880, 0xd3d94035, 0x1880,
+   0xd3d94036, 0x1880, 0xd3d94037, 0x1880, 0xd3d94038, 0x1880,
+   0xd3d94039, 0x1880, 0xd3d9403a, 0x1880, 0xd3d9403b, 0x1880,
+   0xd3d9403c, 0x1880, 0xd3d9403d, 0x1880, 0xd3d9403e, 0x1880,
+   0xd3d9403f, 0x1880, 0xd3d94040, 0x1880, 0xd3d94041, 0x1880,
+   0xd3d94042, 0x1880, 0xd3d94043, 0x1880, 0xd3d94044, 0x1880,
+   0xd3d94045, 0x1880, 0xd3d94046, 0x1880, 0xd3d94047, 0x1880,
+   0xd3d94048, 0x1880, 0xd3d94049, 0x1880, 0xd3d9404a, 0x1880,
+   0xd3d9404b, 0x1880, 0xd3d9404c, 0x1880, 0xd3d9404d, 0x1880,
+   0xd3d9404e, 0x1880, 0xd3d9404f, 0x1880, 0xd3d94050, 0x1880,
+   0xd3d94051, 0x1880, 0xd3d94052, 0x1880, 0xd3d94053, 0x1880,
+   0xd3d94054, 0x1880, 0xd3d94055, 0x1880, 0xd3d94056, 0x1880,
+   0xd3d94057, 0x1880, 0xd3d94058, 0x1880, 0xd3d94059, 0x1880,
+   0xd3d9405a, 0x1880, 0xd3d9405b, 0x1880, 0xd3d9405c, 0x1880,
+   0xd3d9405d, 0x1880, 0xd3d9405e, 0x1880, 0xd3d9405f, 0x1880,
+   0xd3d94060, 0x1880, 0xd3d94061, 0x1880, 0xd3d94062, 0x1880,
+   0xd3d94063, 0x1880, 0xd3d94064, 0x1880, 0xd3d94065, 0x1880,
+   0xd3d94066, 0x1880, 0xd3d94067, 0x1880, 0xd3d94068, 0x1880,
+   0xd3d94069, 0x1880, 0xd3d9406a, 0x1880, 0xd3d9406b, 0x1880,
+   0xd3d9406c, 0x1880, 0xd3d9406d, 0x1880, 0xd3d9406e, 0x1880,
+   0xd3d9406f, 0x1880, 0xd3d94070, 0x1880, 0xd3d94071, 0x1880,
+   0xd3d94072, 0x1880, 0xd3d94073, 0x1880, 0xd3d94074, 0x1880,
+   0xd3d94075, 0x1880, 0xd3d94076, 0x1880, 0xd3d94077, 0x1880,
+   0xd3d94078, 0x1880, 0xd3d94079, 0x1880, 0xd3d9407a, 0x1880,
+   0xd3d9407b, 0x1880, 0xd3d9407c, 0x1880, 0xd3d9407d, 0x1880,
+   0xd3d9407e, 0x1880, 0xd3d9407f, 0x1880, 0xd3d94080, 0x1880,
+   0xd3d94081, 0x1880, 0xd3d94082, 0x1880, 0xd3d94083

RE: [PATCH v2] drm/amdgpu: add codes to clear AccVGPR for arcturus

2020-03-12 Thread Zhang, Hawking
[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Hawking Zhang 

Regards,
Hawking

-Original Message-
From: Dennis Li  
Sent: Friday, March 13, 2020 11:22
To: amd-gfx@lists.freedesktop.org; Deucher, Alexander 
; Zhou1, Tao ; Zhang, Hawking 
; Chen, Guchun 
Cc: Li, Dennis 
Subject: [PATCH v2] drm/amdgpu: add codes to clear AccVGPR for arcturus

AccVGPRs are newly added in arcturus. Before reading these registers, they 
should be initialized. Otherwise edc error happens, when RAS is enabled.

v2: reuse the existing logical to calculate register size

Change-Id: I4ed384f0cc4b781a10cfd6ad1e3a132445bdc261
Signed-off-by: Dennis Li 

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
old mode 100644
new mode 100755
index c78ffdc51373..324838baa71c
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4144,6 +4144,101 @@ static const u32 sgpr_init_compute_shader[] =
0xbe800080, 0xbf81,
 };
 
+static const u32 vgpr_init_compute_shader_arcturus[] = {
+   0xd3d94000, 0x1880, 0xd3d94001, 0x1880, 0xd3d94002, 0x1880,
+   0xd3d94003, 0x1880, 0xd3d94004, 0x1880, 0xd3d94005, 0x1880,
+   0xd3d94006, 0x1880, 0xd3d94007, 0x1880, 0xd3d94008, 0x1880,
+   0xd3d94009, 0x1880, 0xd3d9400a, 0x1880, 0xd3d9400b, 0x1880,
+   0xd3d9400c, 0x1880, 0xd3d9400d, 0x1880, 0xd3d9400e, 0x1880,
+   0xd3d9400f, 0x1880, 0xd3d94010, 0x1880, 0xd3d94011, 0x1880,
+   0xd3d94012, 0x1880, 0xd3d94013, 0x1880, 0xd3d94014, 0x1880,
+   0xd3d94015, 0x1880, 0xd3d94016, 0x1880, 0xd3d94017, 0x1880,
+   0xd3d94018, 0x1880, 0xd3d94019, 0x1880, 0xd3d9401a, 0x1880,
+   0xd3d9401b, 0x1880, 0xd3d9401c, 0x1880, 0xd3d9401d, 0x1880,
+   0xd3d9401e, 0x1880, 0xd3d9401f, 0x1880, 0xd3d94020, 0x1880,
+   0xd3d94021, 0x1880, 0xd3d94022, 0x1880, 0xd3d94023, 0x1880,
+   0xd3d94024, 0x1880, 0xd3d94025, 0x1880, 0xd3d94026, 0x1880,
+   0xd3d94027, 0x1880, 0xd3d94028, 0x1880, 0xd3d94029, 0x1880,
+   0xd3d9402a, 0x1880, 0xd3d9402b, 0x1880, 0xd3d9402c, 0x1880,
+   0xd3d9402d, 0x1880, 0xd3d9402e, 0x1880, 0xd3d9402f, 0x1880,
+   0xd3d94030, 0x1880, 0xd3d94031, 0x1880, 0xd3d94032, 0x1880,
+   0xd3d94033, 0x1880, 0xd3d94034, 0x1880, 0xd3d94035, 0x1880,
+   0xd3d94036, 0x1880, 0xd3d94037, 0x1880, 0xd3d94038, 0x1880,
+   0xd3d94039, 0x1880, 0xd3d9403a, 0x1880, 0xd3d9403b, 0x1880,
+   0xd3d9403c, 0x1880, 0xd3d9403d, 0x1880, 0xd3d9403e, 0x1880,
+   0xd3d9403f, 0x1880, 0xd3d94040, 0x1880, 0xd3d94041, 0x1880,
+   0xd3d94042, 0x1880, 0xd3d94043, 0x1880, 0xd3d94044, 0x1880,
+   0xd3d94045, 0x1880, 0xd3d94046, 0x1880, 0xd3d94047, 0x1880,
+   0xd3d94048, 0x1880, 0xd3d94049, 0x1880, 0xd3d9404a, 0x1880,
+   0xd3d9404b, 0x1880, 0xd3d9404c, 0x1880, 0xd3d9404d, 0x1880,
+   0xd3d9404e, 0x1880, 0xd3d9404f, 0x1880, 0xd3d94050, 0x1880,
+   0xd3d94051, 0x1880, 0xd3d94052, 0x1880, 0xd3d94053, 0x1880,
+   0xd3d94054, 0x1880, 0xd3d94055, 0x1880, 0xd3d94056, 0x1880,
+   0xd3d94057, 0x1880, 0xd3d94058, 0x1880, 0xd3d94059, 0x1880,
+   0xd3d9405a, 0x1880, 0xd3d9405b, 0x1880, 0xd3d9405c, 0x1880,
+   0xd3d9405d, 0x1880, 0xd3d9405e, 0x1880, 0xd3d9405f, 0x1880,
+   0xd3d94060, 0x1880, 0xd3d94061, 0x1880, 0xd3d94062, 0x1880,
+   0xd3d94063, 0x1880, 0xd3d94064, 0x1880, 0xd3d94065, 0x1880,
+   0xd3d94066, 0x1880, 0xd3d94067, 0x1880, 0xd3d94068, 0x1880,
+   0xd3d94069, 0x1880, 0xd3d9406a, 0x1880, 0xd3d9406b, 0x1880,
+   0xd3d9406c, 0x1880, 0xd3d9406d, 0x1880, 0xd3d9406e, 0x1880,
+   0xd3d9406f, 0x1880, 0xd3d94070, 0x1880, 0xd3d94071, 0x1880,
+   0xd3d94072, 0x1880, 0xd3d94073, 0x1880, 0xd3d94074, 0x1880,
+   0xd3d94075, 0x1880, 0xd3d94076, 0x1880, 0xd3d94077, 0x1880,
+   0xd3d94078, 0x1880, 0xd3d94079, 0x1880, 0xd3d9407a, 0x1880,
+   0xd3d9407b, 0x1880, 0xd3d9407c, 0x1880, 0xd3d9407d, 0x1880,
+   0xd3d9407e, 0x1880, 0xd3d9407f, 0x1880, 0xd3d94080, 0x1880,
+   0xd3d94081, 0x1880, 0xd3d94082, 0x1880, 0xd3d94083, 0x1880,
+   0xd3d94084, 0x1880, 0xd3d94085, 0x1880, 0xd3d94086, 0x1880,
+   0xd3d94087, 0x1880, 0xd3d94088, 0x1880, 0xd3d94089, 0x1880,
+   0xd3d9408a, 0x1880, 0xd3d9408b, 0x1880, 0xd3d9408c, 0x1880,
+   0xd3d9408d, 0x1880, 0xd3d9408e, 0x1880, 0xd3d9408f, 0x1880,
+   0xd3d94090, 0x1880, 0xd3d94091, 0x1880, 0xd3d94092, 0x1880,
+