* [PATCH 0/3] remove unused code and add instance number to VCN
@ 2025-08-25 21:01 David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 1/3] drm/amdgpu/vcn: remove unused code in vcn_v1_0.c David (Ming Qiang) Wu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: David (Ming Qiang) Wu @ 2025-08-25 21:01 UTC (permalink / raw)
To: amd-gfx
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(-)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] drm/amdgpu/vcn: remove unused code in vcn_v1_0.c
2025-08-25 21:01 [PATCH 0/3] remove unused code and add instance number to VCN David (Ming Qiang) Wu
@ 2025-08-25 21:01 ` David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 2/3] drm/amdgpu/vcn: remove unused code in vcn_v4_0.c David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 3/3] drm/amdgpu/vcn: add instance number to VCN version message David (Ming Qiang) Wu
2 siblings, 0 replies; 5+ messages in thread
From: David (Ming Qiang) Wu @ 2025-08-25 21:01 UTC (permalink / raw)
To: amd-gfx
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
---
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
index c74947705d778..1e89ba153d9d3 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
@@ -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,
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] drm/amdgpu/vcn: remove unused code in vcn_v4_0.c
2025-08-25 21:01 [PATCH 0/3] remove unused code and add instance number to VCN David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 1/3] drm/amdgpu/vcn: remove unused code in vcn_v1_0.c David (Ming Qiang) Wu
@ 2025-08-25 21:01 ` David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 3/3] drm/amdgpu/vcn: add instance number to VCN version message David (Ming Qiang) Wu
2 siblings, 0 replies; 5+ messages in thread
From: David (Ming Qiang) Wu @ 2025-08-25 21:01 UTC (permalink / raw)
To: amd-gfx
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
---
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index 1785786a72f8e..d0d27790b73b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] drm/amdgpu/vcn: add instance number to VCN version message
2025-08-25 21:01 [PATCH 0/3] remove unused code and add instance number to VCN David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 1/3] drm/amdgpu/vcn: remove unused code in vcn_v1_0.c David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 2/3] drm/amdgpu/vcn: remove unused code in vcn_v4_0.c David (Ming Qiang) Wu
@ 2025-08-25 21:01 ` David (Ming Qiang) Wu
2025-08-26 13:55 ` Alex Deucher
2 siblings, 1 reply; 5+ messages in thread
From: David (Ming Qiang) Wu @ 2025-08-25 21:01 UTC (permalink / raw)
To: amd-gfx
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 <David.Wu3@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index fd8ebf4b5a824..5a90abcea0ac1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] drm/amdgpu/vcn: add instance number to VCN version message
2025-08-25 21:01 ` [PATCH 3/3] drm/amdgpu/vcn: add instance number to VCN version message David (Ming Qiang) Wu
@ 2025-08-26 13:55 ` Alex Deucher
0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2025-08-26 13:55 UTC (permalink / raw)
To: David (Ming Qiang) Wu; +Cc: amd-gfx
On Mon, Aug 25, 2025 at 5:28 PM David (Ming Qiang) Wu <David.Wu3@amd.com> wrote:
>
> 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 <David.Wu3@amd.com>
Series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index fd8ebf4b5a824..5a90abcea0ac1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-26 13:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 21:01 [PATCH 0/3] remove unused code and add instance number to VCN David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 1/3] drm/amdgpu/vcn: remove unused code in vcn_v1_0.c David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 2/3] drm/amdgpu/vcn: remove unused code in vcn_v4_0.c David (Ming Qiang) Wu
2025-08-25 21:01 ` [PATCH 3/3] drm/amdgpu/vcn: add instance number to VCN version message David (Ming Qiang) Wu
2025-08-26 13:55 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).