drm/amd/powerplay: print msg id when smu failed.
authorRex Zhu <Rex.Zhu@amd.com>
Fri, 21 Apr 2017 02:32:09 +0000 (10:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 May 2017 22:25:52 +0000 (18:25 -0400)
Print the failed msg when it fails.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c

index b69dcb9e6a39f54759730a6a792ab3b2493e7cd2..ce0a30388ea1152caa3ea246e9683a194428bdc5 100644 (file)
@@ -124,9 +124,8 @@ int rv_send_msg_to_smc(struct pp_smumgr *smumgr, uint16_t msg)
 
        rv_send_msg_to_smc_without_waiting(smumgr, msg);
 
-       PP_ASSERT_WITH_CODE(rv_wait_for_response(smumgr) == 1,
-                       "Failed to send Message.",
-                       return -EINVAL);
+       if (rv_wait_for_response(smumgr) == 0)
+               printk("Failed to send Message %x.\n", msg);
 
        return 0;
 }
@@ -149,9 +148,9 @@ int rv_send_msg_to_smc_with_parameter(struct pp_smumgr *smumgr,
 
        rv_send_msg_to_smc_without_waiting(smumgr, msg);
 
-       PP_ASSERT_WITH_CODE(rv_wait_for_response(smumgr) == 1,
-                       "Failed to send Message.",
-                       return -EINVAL);
+
+       if (rv_wait_for_response(smumgr) == 0)
+               printk("Failed to send Message %x.\n", msg);
 
        return 0;
 }