[PATCH] drm/amdgpu: drop some kernel messages in VCN code

Dong, Ruijing Ruijing.Dong at amd.com
Thu May 23 16:02:52 UTC 2024


[AMD Official Use Only - AMD Internal Distribution Only]

Please see my question inline below.

Thanks,
Ruijing

-----Original Message-----
From: Wu, David <David.Wu3 at amd.com>
Sent: Thursday, May 23, 2024 11:05 AM
To: amd-gfx at lists.freedesktop.org; Koenig, Christian <Christian.Koenig at amd.com>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Liu, Leo <Leo.Liu at amd.com>; Jiang, Sonny <Sonny.Jiang at amd.com>; Dong, Ruijing <Ruijing.Dong at amd.com>
Subject: [PATCH] drm/amdgpu: drop some kernel messages in VCN code

We have messages when the VCN fails to initialize and there is no need to report on success.
Also PSP loading FWs is the default for production.

Signed-off-by: David (Ming Qiang) Wu <David.Wu3 at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c  |  1 -  drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c |  3 ---  drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c  | 10 +---------
 3 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index b89605b400c0..5e2b7c340724 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -1078,7 +1078,6 @@ void amdgpu_vcn_setup_ucode(struct amdgpu_device *adev)
                            IP_VERSION(4, 0, 3))
                                break;
                }
-               dev_info(adev->dev, "Will use PSP to load VCN firmware\n");
        }
 }

diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
index 64c856bfe0cb..68ef29bc70e2 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
@@ -145,8 +145,6 @@ static int jpeg_v5_0_0_hw_init(void *handle)
        if (r)
                return r;

-       DRM_DEV_INFO(adev->dev, "JPEG decode initialized successfully.\n");
-
        return 0;
 }

@@ -549,7 +547,6 @@ static const struct amdgpu_ring_funcs jpeg_v5_0_0_dec_ring_vm_funcs = {  static void jpeg_v5_0_0_set_dec_ring_funcs(struct amdgpu_device *adev)  {
        adev->jpeg.inst->ring_dec->funcs = &jpeg_v5_0_0_dec_ring_vm_funcs;
-       DRM_DEV_INFO(adev->dev, "JPEG decode is enabled in VM mode\n");
 }

 static const struct amdgpu_irq_src_funcs jpeg_v5_0_0_irq_funcs = { diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
index 36d4ca645c56..070b56610c7d 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
@@ -200,16 +200,10 @@ static int vcn_v5_0_0_hw_init(void *handle)

                r = amdgpu_ring_test_helper(ring);
                if (r)
-                       goto done;
+                       return r;
        }
 [Ruijing] Are we assuming the hw init process always be successful?
        return 0;
-done:
-       if (!r)
-               DRM_INFO("VCN decode and encode initialized successfully(under %s).\n",
-                       (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG)?"DPG Mode":"SPG Mode");
-
-       return r;
 }

 /**
@@ -1122,8 +1116,6 @@ static void vcn_v5_0_0_set_unified_ring_funcs(struct amdgpu_device *adev)

                adev->vcn.inst[i].ring_enc[0].funcs = &vcn_v5_0_0_unified_ring_vm_funcs;
                adev->vcn.inst[i].ring_enc[0].me = i;
-
-               DRM_INFO("VCN(%d) encode/decode are enabled in VM mode\n", i);
        }
 }

--
2.34.1



More information about the amd-gfx mailing list