drm/amdgpu: correct the UCODE ID used for VCN 4.0.3 SRAM update
Subsystems (2)
PATCH 1/1 drm/amdgpu: correct the UCODE ID used for VCN 4.0.3 SRAM update
It uses the same UCODE ID(VCN0_RAM) but differnet cmd buffers for all instances.
--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1 -1
@@ -778,7 +778,7 @@ static int vcn_v4_0_3_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, b UVD_MASTINT_EN__VCPU_EN_MASK, 0, indirect);if (indirect) -amdgpu_vcn_psp_update_sram (adev, inst_idx); +amdgpu_vcn_psp_update_sram (adev,0 ); ring = &adev->vcn.inst[inst_idx].ring_enc[0 ];
Signature · 1 line
2.25.1
Quoted 15 lines · Lang Yu
It uses the same UCODE
ID(VCN0_RAM)but differnet cmd buffers for all instances.Fixes e928b52c58dd ("drm/amdgpu: use psp_execute_load_ip_fw_cmd_buf instead")Signed-off-by Lang Yu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +0
-0
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c static int vcn_v4_0_3_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, b · line 781
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1
-1@@ -778,7 +778,7 @@ static int vcn_v4_0_3_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, b UVD_MASTINT_EN__VCPU_EN_MASK, 0, indirect);if (indirect) -amdgpu_vcn_psp_update_sram (adev, inst_idx); +amdgpu_vcn_psp_update_sram (adev,0 );
This doesn't work either for passing the right buffer. Could you revert the two patches? Not seeing any simplification with those. Previously it was one psp API to be called.
Thanks,
Lijo
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +0
-0> ring = &adev->vcn.inst[inst_idx].ring_enc[0];
Quoted 13 lines · Lijo
Quoted 10 lines · Lang Yu
It uses the same UCODE
ID(VCN0_RAM)but differnet cmd buffers for all instances.Fixes e928b52c58dd ("drm/amdgpu: use psp_execute_load_ip_fw_cmd_buf instead")Signed-off-by Lang Yu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c static int vcn_v4_0_3_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, b · line 780
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1
-1@@ -778,7 +778,7 @@ static int vcn_v4_0_3_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, b UVD_MASTINT_EN__VCPU_EN_MASK, 0, indirect);if (indirect) -amdgpu_vcn_psp_update_sram (adev, inst_idx); +amdgpu_vcn_psp_update_sram (adev,0 );This doesn't work either for passing the right buffer. Could you revert the two patches? Not seeing any simplification with those. Previously it was one psp API to be called.
Oh, thanks. I got it ...
The purpose of psp_execute_load_ip_fw_cmd_buf is to serve other IPs, they have same use cases like what psp_update_vcn_sram does.
How about just call psp_execute_load_ip_fw_cmd_buf in VCN directly?
Or revert the two patches and add some functions like psp_update_AAA, psp_update_BBB, ... for Other IPs.
Regards,
Lang
Quoted 4 lines
Thanks,
LijoQuoted 1 line
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +0
-0> ring = &adev->vcn.inst[inst_idx].ring_enc[0];
Quoted 30 lines · Lang Yu
Quoted 13 lines · Lijo
Quoted 10 lines · Lang Yu
It uses the same UCODE
ID(VCN0_RAM)but differnet cmd buffers for all instances.Fixes e928b52c58dd ("drm/amdgpu: use psp_execute_load_ip_fw_cmd_buf instead")Signed-off-by Lang Yu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c static int vcn_v4_0_3_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, b · line 780
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1
-1@@ -778,7 +778,7 @@ static int vcn_v4_0_3_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, b UVD_MASTINT_EN__VCPU_EN_MASK, 0, indirect);if (indirect) -amdgpu_vcn_psp_update_sram (adev, inst_idx); +amdgpu_vcn_psp_update_sram (adev,0 );This doesn't work either for passing the right buffer. Could you revert the two patches? Not seeing any simplification with those. Previously it was one psp API to be called.
Oh, thanks. I got it ...
Quoted 8 lines
The purpose of
psp_execute_load_ip_fw_cmd_bufis to serve other IPs, they have same use cases like whatpsp_update_vcn_sramdoes.How about just call
psp_execute_load_ip_fw_cmd_bufin VCN directly?Or revert the two patches and add some functions like
psp_update_AAA,psp_update_BBB, ... for Other IPs.
At least for now, I think VCN is the only case which requires an extra specific ucode API. All other ucodes are loaded during psp hw_init.
Thanks,
Lijo
Quoted 8 lines
Regards,
LangQuoted 4 lines
Thanks,
LijoQuoted 1 line
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +0
-0> ring = &adev->vcn.inst[inst_idx].ring_enc[0];