drm/amd/powerplay: add error message to remind user updating firmware

Submitted by Huang, Ray on April 20, 2017, 7:33 a.m.

Details

Message ID 1492673633-21017-1-git-send-email-ray.huang@amd.com
State New
Headers show
Series "drm/amd/powerplay: add error message to remind user updating firmware" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Huang, Ray April 20, 2017, 7:33 a.m.
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
index 2685f02..b3f3af2 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
@@ -378,8 +378,11 @@  static int vega10_verify_smc_interface(struct pp_smumgr *smumgr)
 			"Attempt to read SMC IF Version Number Failed!",
 			return -1);
 
-	if (smc_driver_if_version != SMU9_DRIVER_IF_VERSION)
-		return -1;
+	if (smc_driver_if_version != SMU9_DRIVER_IF_VERSION) {
+		pr_err("Your firmware(0x%x) doesn't match SMU9_DRIVER_IF_VERSION(0x%x). Please update your firmware!\n",
+		       smc_driver_if_version, SMU9_DRIVER_IF_VERSION);
+		return -EINVAL;
+	}
 
 	return 0;
 }

Comments

Reviewed-by: Evan Quan <evan.quan@amd.com>

>-----Original Message-----
>From: Huang Rui [mailto:ray.huang@amd.com]
>Sent: Thursday, April 20, 2017 3:34 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Quan, Evan
><Evan.Quan@amd.com>; Huang, Ray <Ray.Huang@amd.com>
>Subject: [PATCH] drm/amd/powerplay: add error message to remind user
>updating firmware
>
>Signed-off-by: Huang Rui <ray.huang@amd.com>
>---
> drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
>b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
>index 2685f02..b3f3af2 100644
>--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
>+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
>@@ -378,8 +378,11 @@ static int vega10_verify_smc_interface(struct
>pp_smumgr *smumgr)
> 			"Attempt to read SMC IF Version Number Failed!",
> 			return -1);
>
>-	if (smc_driver_if_version != SMU9_DRIVER_IF_VERSION)
>-		return -1;
>+	if (smc_driver_if_version != SMU9_DRIVER_IF_VERSION) {
>+		pr_err("Your firmware(0x%x) doesn't match
>SMU9_DRIVER_IF_VERSION(0x%x). Please update your firmware!\n",
>+		       smc_driver_if_version, SMU9_DRIVER_IF_VERSION);
>+		return -EINVAL;
>+	}
>
> 	return 0;
> }
>--
>2.7.4
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>

On 04/20/2017 05:33 PM, Huang Rui wrote:
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
> index 2685f02..b3f3af2 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
> @@ -378,8 +378,11 @@ static int vega10_verify_smc_interface(struct pp_smumgr *smumgr)
>  			"Attempt to read SMC IF Version Number Failed!",
>  			return -1);
>  
> -	if (smc_driver_if_version != SMU9_DRIVER_IF_VERSION)
> -		return -1;
> +	if (smc_driver_if_version != SMU9_DRIVER_IF_VERSION) {
> +		pr_err("Your firmware(0x%x) doesn't match SMU9_DRIVER_IF_VERSION(0x%x). Please update your firmware!\n",
> +		       smc_driver_if_version, SMU9_DRIVER_IF_VERSION);
> +		return -EINVAL;
> +	}
>  
>  	return 0;
>  }
>
On Thu, Apr 20, 2017 at 3:33 AM, Huang Rui <ray.huang@amd.com> wrote:
> Signed-off-by: Huang Rui <ray.huang@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
> index 2685f02..b3f3af2 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
> @@ -378,8 +378,11 @@ static int vega10_verify_smc_interface(struct pp_smumgr *smumgr)
>                         "Attempt to read SMC IF Version Number Failed!",
>                         return -1);
>
> -       if (smc_driver_if_version != SMU9_DRIVER_IF_VERSION)
> -               return -1;
> +       if (smc_driver_if_version != SMU9_DRIVER_IF_VERSION) {
> +               pr_err("Your firmware(0x%x) doesn't match SMU9_DRIVER_IF_VERSION(0x%x). Please update your firmware!\n",
> +                      smc_driver_if_version, SMU9_DRIVER_IF_VERSION);
> +               return -EINVAL;
> +       }
>
>         return 0;
>  }
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx