drm/amdgpu: fix gfx9 rlc modprobe rlcg program timeout issue
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix gfx9 rlc modprobe rlcg program timeout issue
From: changzhu <[email protected]>
From: Changfeng <[email protected]>
It needs to add amdgpu_sriov_fullaccess judgement as gfx_v10_rlcg_wreg when doing gfx_v9_0_rlcg_wreg.
Or it will cause modprobe issue as below:
kernel: [ 59.992843] amdgpu: timeout: rlcg program reg:0x02984 failed!
Fix for patch:
drm/amdgpu: indirect register access for nv12 sriov
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +15 -1
@@ -734,7 +734,7 @@ static const u32 GFX_RLC_SRM_INDEX_CNTL_DATA_OFFSETS[] = mmRLC_SRM_INDEX_CNTL_DATA_7 - mmRLC_SRM_INDEX_CNTL_DATA_0, }; -void gfx_v9_0_rlcg_wreg (struct amdgpu_device *adev,u32 offset,u32 v,u32 flag) +static void gfx_v9_0_rlcg_rw (struct amdgpu_device *adev,u32 offset,u32 v,u32 flag) {static void *scratch_reg0;static void *scratch_reg1;
@@ -787,6 +787,20 @@ void gfx_v9_0_rlcg_wreg(struct amdgpu_device *adev, u32 offset, u32 v, u32 flag) } +static void gfx_v9_0_rlcg_wreg (struct amdgpu_device *adev,u32 offset,u32 v,u32 flag) +{ +if (amdgpu_sriov_fullaccess (adev)) { +gfx_v9_0_rlcg_rw (adev, offset, v, flag); + +return ; + } + +if (flag &AMDGPU_REGS_NO_KIQ ) +WREG32_NO_KIQ (offset, v); +else +WREG32 (offset, v); +} +#define VEGA10_GB_ADDR_CONFIG_GOLDEN 0x2a114042#define VEGA12_GB_ADDR_CONFIG_GOLDEN 0x24104041#define RAVEN_GB_ADDR_CONFIG_GOLDEN 0x24000042
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Quoted 64 lines
-----Original Message-----
From: Zhu, Changfeng <[email protected]>
Sent: Tuesday, April 6, 2021 3:30 PM
To: [email protected]; Huang, Ray <[email protected]>; Zhou, Peng Ju <[email protected]>; Deng, Emily <[email protected]>
Cc: Zhu, Changfeng <[email protected]>
Subject: [PATCH] drm/amdgpu: fix gfx9 rlc modprobe rlcg program timeout issueFrom: changzhu <[email protected]>
From: Changfeng <[email protected]>
It needs to add
amdgpu_sriov_fullaccessjudgement asgfx_v10_rlcg_wregwhen doinggfx_v9_0_rlcg_wreg.
Or it will cause modprobe issue as below:
kernel: [ 59.992843] amdgpu: timeout: rlcg program reg:0x02984 failed!Fix for patch:
drm/amdgpu: indirect register access for nv12 sriovChange-Id I971804e4e8dbd83e4179beefa8ae8a06bd52913bSigned-off-by Changfeng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 16 +++++++++++++++-1 file changed, 15 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0@@ -734,7 +734,7 @@ static const u32GFX_RLC_SRM_INDEX_CNTL_DATA_OFFSETS[] =
mmRLC_SRM_INDEX_CNTL_DATA_7-mmRLC_SRM_INDEX_CNTL_DATA_0, };-void
gfx_v9_0_rlcg_wreg(struct amdgpu_device *adev, u32 offset, u32 v, u32 flag)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2
-0+static void gfx_v9_0_rlcg_rw (struct amdgpu_device *adev,u32 offset, +u32 v,u32 flag){
static void*scratch_reg0;
static void*scratch_reg1;drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +14
-0@@ -787,6 +787,20 @@ void gfx_v9_0_rlcg_wreg(struct amdgpu_device *adev, u32 offset, u32 v, u32 flag) } +static void gfx_v9_0_rlcg_wreg (struct amdgpu_device *adev,u32 offset, +u32 v,u32 flag) { +if (amdgpu_sriov_fullaccess (adev)) { +gfx_v9_0_rlcg_rw (adev, offset, v, flag); + +return ; +} + +if (flag &AMDGPU_REGS_NO_KIQ ) +WREG32_NO_KIQ (offset, v); +else +WREG32 (offset, v); +} +#define VEGA10_GB_ADDR_CONFIG_GOLDEN 0x2a114042 #define
Quoted 4 lines
VEGA12_GB_ADDR_CONFIG_GOLDEN0x24104041#defineRAVEN_GB_ADDR_CONFIG_GOLDEN0x24000042
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 9 lines · Changfeng
From: changzhu <[email protected]>
From: Changfeng <[email protected]>
It needs to add
amdgpu_sriov_fullaccessjudgement asgfx_v10_rlcg_wregwhen doinggfx_v9_0_rlcg_wreg.
Or it will cause modprobe issue as below:
kernel: [ 59.992843] amdgpu: timeout: rlcg program reg:0x02984 failed!
Quoted 5 lines
Fix for patch:
drm/amdgpu: indirect register access for nv12 sriovChange-Id I971804e4e8dbd83e4179beefa8ae8a06bd52913bSigned-off-by Changfeng <[email protected]>
Quoted 41 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +15
-1@@ -734,7 +734,7 @@ static const u32 GFX_RLC_SRM_INDEX_CNTL_DATA_OFFSETS[] = mmRLC_SRM_INDEX_CNTL_DATA_7 - mmRLC_SRM_INDEX_CNTL_DATA_0, }; -void gfx_v9_0_rlcg_wreg (struct amdgpu_device *adev,u32 offset,u32 v,u32 flag) +static void gfx_v9_0_rlcg_rw (struct amdgpu_device *adev,u32 offset,u32 v,u32 flag) {static void *scratch_reg0;static void *scratch_reg1;@@ -787,6 +787,20 @@ void gfx_v9_0_rlcg_wreg(struct amdgpu_device *adev, u32 offset, u32 v, u32 flag) } +static void gfx_v9_0_rlcg_wreg (struct amdgpu_device *adev,u32 offset,u32 v,u32 flag) +{ +if (amdgpu_sriov_fullaccess (adev)) { +gfx_v9_0_rlcg_rw (adev, offset, v, flag); + +return ; + } + +if (flag &AMDGPU_REGS_NO_KIQ ) +WREG32_NO_KIQ (offset, v); +else +WREG32 (offset, v); +} +#define VEGA10_GB_ADDR_CONFIG_GOLDEN 0x2a114042#define VEGA12_GB_ADDR_CONFIG_GOLDEN 0x24104041#define RAVEN_GB_ADDR_CONFIG_GOLDEN 0x24000042Signature · 1 line
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx