Skip to contentSkip to conversation

drm/amdgpu: drop some kernel messages in VCN code

PATCH In review David (Ming Qiang) Wu 5 participants 6 messages May 23, 2024 – May 28, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
index b89605b400c0..5e2b7c340724 100644
@@ -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");
 	}
 }
 
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -3
index 64c856bfe0cb..68ef29bc70e2 100644
@@ -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 = {
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1 -9
index 36d4ca645c56..070b56610c7d 100644
@@ -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;
 	}
 
 	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);
 	}
 }
 
Signature · 1 line
2.34.1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Please see my question inline below.

Thanks,
Ruijing

-----Original Message-----
From: Wu, David <[email protected]>
Sent: Thursday, May 23, 2024 11:05 AM
To: [email protected]; Koenig, Christian <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>; Dong, Ruijing <[email protected]>
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.

---
 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
index b89605b400c0..5e2b7c340724 100644
@@ -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");
        }
 }
 
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -3
index 64c856bfe0cb..68ef29bc70e2 100644
@@ -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

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1 -9
@@ -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

#2 lore raw

please see in line.

Quoted 57 lines · Ruijing

[AMD Official Use Only - AMD Internal Distribution Only]

Please see my question inline below.

Thanks,
Ruijing

-----Original Message-----
From: Wu, David <[email protected]>
Sent: Thursday, May 23, 2024 11:05 AM
To: [email protected]; Koenig, Christian <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>; Dong, Ruijing <[email protected]>
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.

---
  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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
index b89605b400c0..5e2b7c340724 100644
@@ -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");
         }
  }
 
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -3
index 64c856bfe0cb..68ef29bc70e2 100644
@@ -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

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c static int vcn_v5_0_0_hw_init(void *handle) · line 205

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1 -1
@@ -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?

No - it could fail with errors and in this case the top level will report error. Otherwise it will succeed(and no need to report successful message).

David

Quoted 22 lines
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +0 -9
         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

#3 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Thanks for the response, and it looks good to me.

Ruijing

-----Original Message-----
From: Wu, David <[email protected]>
Sent: Thursday, May 23, 2024 12:55 PM
To: Dong, Ruijing <[email protected]>; Wu, David <[email protected]>; [email protected]; Koenig, Christian <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: drop some kernel messages in VCN code

please see in line.

Quoted 64 lines · Ruijing

[AMD Official Use Only - AMD Internal Distribution Only]

Please see my question inline below.

Thanks,
Ruijing

-----Original Message-----
From: Wu, David <[email protected]>
Sent: Thursday, May 23, 2024 11:05 AM
To: [email protected]; Koenig, Christian <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>; Dong, Ruijing <[email protected]>
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.

---
  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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
index b89605b400c0..5e2b7c340724 100644
@@ -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");
         }
  }
 
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -3
index 64c856bfe0cb..68ef29bc70e2 100644
@@ -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 = {
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +0 -0
index 36d4ca645c56..070b56610c7d 100644

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c static int vcn_v5_0_0_hw_init(void *handle) · line 205

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1 -1
@@ -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?

No - it could fail with errors and in this case the top level will report error. Otherwise it will succeed(and no need to report successful message).

David

Quoted 23 lines
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +0 -9
         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

#4 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

The patch is Reviewed-by: Sonny Jiang <[email protected]>

Thanks,
Sonny

________________________________
From: Dong, Ruijing <[email protected]>
Sent: Thursday, May 23, 2024 12:58 PM
To: Wu, David <[email protected]>; [email protected] <[email protected]>; Koenig, Christian <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: drop some kernel messages in VCN code

[AMD Official Use Only - AMD Internal Distribution Only]

Thanks for the response, and it looks good to me.

Ruijing

-----Original Message-----
From: Wu, David <[email protected]>
Sent: Thursday, May 23, 2024 12:55 PM
To: Dong, Ruijing <[email protected]>; Wu, David <[email protected]>; [email protected]; Koenig, Christian <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: drop some kernel messages in VCN code

please see in line.

Quoted 64 lines · Ruijing

[AMD Official Use Only - AMD Internal Distribution Only]

Please see my question inline below.

Thanks,
Ruijing

-----Original Message-----
From: Wu, David <[email protected]>
Sent: Thursday, May 23, 2024 11:05 AM
To: [email protected]; Koenig, Christian <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>; Dong, Ruijing <[email protected]>
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.

---
  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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
index b89605b400c0..5e2b7c340724 100644
@@ -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");
         }
  }
 
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -3
index 64c856bfe0cb..68ef29bc70e2 100644
@@ -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 = {
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +0 -0
index 36d4ca645c56..070b56610c7d 100644

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c static int vcn_v5_0_0_hw_init(void *handle) · line 205

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1 -1
@@ -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?

No - it could fail with errors and in this case the top level will report error. Otherwise it will succeed(and no need to report successful message).

David

Quoted 23 lines
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +0 -9
         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

#5 lore raw

Thanks,
Christian.

Am 23.05.24 um 19:11 schrieb Jiang, Sonny:

Quoted 139 lines

[AMD Official Use Only - AMD Internal Distribution Only]

The patch is Reviewed-by: Sonny Jiang <[email protected]>

Thanks,
Sonny

------------------------------------------------------------------------
*From:* Dong, Ruijing <[email protected]>
*Sent:* Thursday, May 23, 2024 12:58 PM
*To:* Wu, David <[email protected]>; [email protected] <[email protected]>; Koenig, Christian <[email protected]> *Cc:* Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]> *Subject:* RE: [PATCH] drm/amdgpu: drop some kernel messages in VCN code
[AMD Official Use Only - AMD Internal Distribution Only]

Thanks for the response, and it looks good to me.

Ruijing

-----Original Message-----
From: Wu, David <[email protected]>
Sent: Thursday, May 23, 2024 12:55 PM
To: Dong, Ruijing <[email protected]>; Wu, David <[email protected]>; [email protected]; Koenig, Christian <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liu, Leo <[email protected]>; Jiang, Sonny <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: drop some kernel messages in VCN code

please see in line.

Quoted 17 lines · Ruijing

[AMD Official Use Only - AMD Internal Distribution Only]

Please see my question inline below.

Thanks,
Ruijing

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

Quoted 1 line

We have messages when the VCN fails to initialize and there is no

need to report on success.

Quoted 5 lines

Also PSP loading FWs is the default for production.

---
   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 +---------

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c void amdgpu_vcn_setup_ucode(struct

Quoted 8 lines
   3 files changed, 1 insertion(+), 13 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -0
index b89605b400c0..5e2b7c340724 100644
@@ -1078,7 +1078,6 @@ void amdgpu_vcn_setup_ucode(struct 

amdgpu_device *adev)

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c void amdgpu_vcn_setup_ucode(struct amdgpu_device *adev)

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
                               IP_VERSION(4, 0, 3))
                                   break;
                   }
-               dev_info(adev->dev, "Will use PSP to load VCN 

firmware\n");

drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c static int jpeg_v5_0_0_hw_init(void *handle) · line 148

Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -0
           }
    }
 
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -1
index 64c856bfe0cb..68ef29bc70e2 100644
@@ -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");

drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c static const struct amdgpu_ring_funcs

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -1
-
           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)  {

Quoted 17 lines
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -1
 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 = {
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1 -1
index 36d4ca645c56..070b56610c7d 100644
@@ -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;
           }
Quoted 1 line

   [Ruijing] Are we assuming the hw init process always be successful?

No - it could fail with errors and in this case the top level will report error. Otherwise it will succeed(and no need to report successful message).

David

Quoted 4 lines

          return 0;
-done:
-       if (!r)
-               DRM_INFO("VCN decode and encode initialized

successfully(under %s).\n",

Quoted 1 line

-                       (adev->pg_flags &

AMD_PG_SUPPORT_VCN_DPG)?"DPG Mode":"SPG Mode");

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c static void · line 1127

Quoted 12 lines

-
-       return r;
   }

   /**

drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +0 -2
@@ -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);

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +0 -1
           }
    }
 
--

2.34.1