remove unused code and add instance number to VCN
Subsystems (2)
cover remove unused code and add instance number to VCN
1 Remove unused code in vcn_v1_0.c and vcn_v4_0.c - found by Coverity scan 2 improve log message by adding instance number. It's more useful for
multiple VCN instances case.
David (Ming Qiang) Wu (3):
drm/amdgpu/vcn: remove unused code in vcn_v1_0.c drm/amdgpu/vcn: remove unused code in vcn_v4_0.c drm/amdgpu/vcn: add instance number to VCN version message
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 -- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 - 3 files changed, 4 insertions(+), 7 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/3 drm/amdgpu/vcn: remove unused code in vcn_v1_0.c
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +0 -2
@@ -1338,7 +1338,6 @@ static int vcn_v1_0_pause_dpg_mode(struct amdgpu_vcn_inst *vinst,WREG32_SOC15 (UVD ,0 , mmUVD_RB_RPTR2,lower_32_bits (ring->wptr));WREG32_SOC15 (UVD ,0 , mmUVD_RB_WPTR2,lower_32_bits (ring->wptr)); - ring = &adev->vcn.inst->ring_dec;WREG32_SOC15 (UVD ,0 , mmUVD_RBC_RB_WPTR,RREG32_SOC15 (UVD ,0 , mmUVD_SCRATCH2) &0x7FFFFFFF ); SOC15_WAIT_ON_RREG(UVD, 0, mmUVD_POWER_STATUS,
@@ -1399,7 +1398,6 @@ static int vcn_v1_0_pause_dpg_mode(struct amdgpu_vcn_inst *vinst,WREG32_SOC15 (UVD ,0 , mmUVD_JRBC_RB_CNTL,UVD_JRBC_RB_CNTL__RB_RPTR_WR_EN_MASK ); - ring = &adev->vcn.inst->ring_dec;WREG32_SOC15 (UVD ,0 , mmUVD_RBC_RB_WPTR,RREG32_SOC15 (UVD ,0 , mmUVD_SCRATCH2) &0x7FFFFFFF ); SOC15_WAIT_ON_RREG(UVD, 0, mmUVD_POWER_STATUS,
Signature · 1 line
2.43.0
PATCH 2/3 drm/amdgpu/vcn: remove unused code in vcn_v4_0.c
In reply to David (Ming Qiang) Wu--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +0 -1
@@ -1621,7 +1621,6 @@ static int vcn_v4_0_stop(struct amdgpu_vcn_inst *vinst)if (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG ) {vcn_v4_0_stop_dpg_mode (vinst); - r =0 ; goto done; }
Signature · 1 line
2.43.0
PATCH 3/3 drm/amdgpu/vcn: add instance number to VCN version message
In reply to David (Ming Qiang) WuFor multiple VCN instances case we get multiple lines of the same message like below:
amdgpu 0000:43:00.0: amdgpu: Found VCN firmware Version ENC: 1.24 DEC: 9 VEP: 0 Revision: 11 amdgpu 0000:43:00.0: amdgpu: Found VCN firmware Version ENC: 1.24 DEC: 9 VEP: 0 Revision: 11
By adding instance number to the log message for multiple VCN instances, each line will clearly indicate which VCN instance it refers to.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +4 -4
@@ -185,16 +185,16 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev, int i) dec_ver = (le32_to_cpu (hdr->ucode_version) >>24 ) &0xf ; vep = (le32_to_cpu (hdr->ucode_version) >>28 ) &0xf ;dev_info (adev->dev, -"Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n" , - enc_major, enc_minor, dec_ver, vep, fw_rev); +"[VCN instance %d] Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n" , + i, enc_major, enc_minor, dec_ver, vep, fw_rev); }else {unsigned int version_major, version_minor, family_id; family_id =le32_to_cpu (hdr->ucode_version) &0xff ; version_major = (le32_to_cpu (hdr->ucode_version) >>24 ) &0xff ; version_minor = (le32_to_cpu (hdr->ucode_version) >>8 ) &0xff ; -dev_info (adev->dev,"Found VCN firmware Version: %u.%u Family ID: %u\n" , - version_major, version_minor, family_id); +dev_info (adev->dev,"[VCN instance %d] Found VCN firmware Version: %u.%u Family ID: %u\n" , + i, version_major, version_minor, family_id); } bo_size =AMDGPU_VCN_STACK_SIZE +AMDGPU_VCN_CONTEXT_SIZE ;
Signature · 1 line
2.43.0
Re: [PATCH 3/3] drm/amdgpu/vcn: add instance number to VCN version message
Quoted 11 lines · David (Ming Qiang) Wu
For multiple VCN instances case we get multiple lines of the same message like below:
amdgpu 0000:43:00.0: amdgpu: Found VCN firmware Version ENC: 1.24 DEC: 9 VEP: 0 Revision: 11 amdgpu 0000:43:00.0: amdgpu: Found VCN firmware Version ENC: 1.24 DEC: 9 VEP: 0 Revision: 11
By adding instance number to the log message for multiple VCN instances, each line will clearly indicate which VCN instance it refers to.
Signed-off-by David (Ming Qiang) Wu <[email protected]>
Series is:
Quoted 32 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +4
-5@@ -185,16 +185,16 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev, int i) dec_ver = (le32_to_cpu (hdr->ucode_version) >>24 ) &0xf ; vep = (le32_to_cpu (hdr->ucode_version) >>28 ) &0xf ;dev_info (adev->dev, -"Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n" , - enc_major, enc_minor, dec_ver, vep, fw_rev); +"[VCN instance %d] Found VCN firmware Version ENC: %u.%u DEC: %u VEP: %u Revision: %u\n" , + i, enc_major, enc_minor, dec_ver, vep, fw_rev); }else {unsigned int version_major, version_minor, family_id; family_id =le32_to_cpu (hdr->ucode_version) &0xff ; version_major = (le32_to_cpu (hdr->ucode_version) >>24 ) &0xff ; version_minor = (le32_to_cpu (hdr->ucode_version) >>8 ) &0xff ; -dev_info (adev->dev,"Found VCN firmware Version: %u.%u Family ID: %u\n" , - version_major, version_minor, family_id); +dev_info (adev->dev,"[VCN instance %d] Found VCN firmware Version: %u.%u Family ID: %u\n" , + i, version_major, version_minor, family_id); } bo_size =AMDGPU_VCN_STACK_SIZE +AMDGPU_VCN_CONTEXT_SIZE ; --2.43.0