drm/amd/powerplay: add error message to remind user updating firmware
authorHuang Rui <ray.huang@amd.com>
Thu, 20 Apr 2017 07:25:39 +0000 (15:25 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:32:48 +0000 (17:32 -0400)
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c

index 7a36a7404f738988a658b9e5b5ab0007dfd30f48..21b61315fc40a8f88e0fcfc0b1a9c0ffbf53a30c 100644 (file)
@@ -369,8 +369,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;
 }