All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 3/8] drm/amd/pp: Delete is_smc_ram_running function on RV
Date: Wed, 7 Mar 2018 18:46:05 +0800	[thread overview]
Message-ID: <1520419570-28831-3-git-send-email-Rex.Zhu@amd.com> (raw)
In-Reply-To: <1520419570-28831-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>

1. There is a race condition when another ip also use same register pairs
2. check once at boot up by GetDriverIfVersion message is sufficient
   to check SMU health. so delete is_smc_ram_running check.

Change-Id: I3c5f5ebac36c1ae4a7dd72f482fc27a4f362975e
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 27 ------------------------
 1 file changed, 27 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c
index 6362d46..e6317fd 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c
@@ -47,34 +47,10 @@
 #define smnMP1_FIRMWARE_FLAGS       0x3010028
 
 
-bool rv_is_smc_ram_running(struct pp_hwmgr *hwmgr)
-{
-	uint32_t mp1_fw_flags, reg;
-
-	reg = soc15_get_register_offset(NBIF_HWID, 0,
-			mmPCIE_INDEX2_BASE_IDX, mmPCIE_INDEX2);
-
-	cgs_write_register(hwmgr->device, reg,
-			(MP1_Public | (smnMP1_FIRMWARE_FLAGS & 0xffffffff)));
-
-	reg = soc15_get_register_offset(NBIF_HWID, 0,
-			mmPCIE_DATA2_BASE_IDX, mmPCIE_DATA2);
-
-	mp1_fw_flags = cgs_read_register(hwmgr->device, reg);
-
-	if (mp1_fw_flags & MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK)
-		return true;
-
-	return false;
-}
-
 static uint32_t rv_wait_for_response(struct pp_hwmgr *hwmgr)
 {
 	uint32_t reg;
 
-	if (!rv_is_smc_ram_running(hwmgr))
-		return -EINVAL;
-
 	reg = soc15_get_register_offset(MP1_HWID, 0,
 			mmMP1_SMN_C2PMSG_90_BASE_IDX, mmMP1_SMN_C2PMSG_90);
 
@@ -89,9 +65,6 @@ int rv_send_msg_to_smc_without_waiting(struct pp_hwmgr *hwmgr,
 {
 	uint32_t reg;
 
-	if (!rv_is_smc_ram_running(hwmgr))
-		return -EINVAL;
-
 	reg = soc15_get_register_offset(MP1_HWID, 0,
 			mmMP1_SMN_C2PMSG_66_BASE_IDX, mmMP1_SMN_C2PMSG_66);
 	cgs_write_register(hwmgr->device, reg, msg);
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-03-07 10:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 10:46 [PATCH 1/8] drm/amd/pp: Refine code for smu7 in powerplay Rex Zhu
     [not found] ` <1520419570-28831-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-07 10:46   ` [PATCH 2/8] drm/amd/pp: Clean up header file include Rex Zhu
     [not found]     ` <1520419570-28831-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-07 17:13       ` Alex Deucher
2018-03-07 10:46   ` Rex Zhu [this message]
     [not found]     ` <1520419570-28831-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-07 17:15       ` [PATCH 3/8] drm/amd/pp: Delete is_smc_ram_running function on RV Alex Deucher
2018-03-07 10:46   ` [PATCH 4/8] drm/amd/pp: Clean up the code for RV in powerplay Rex Zhu
     [not found]     ` <1520419570-28831-4-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-07 17:23       ` Alex Deucher
     [not found]         ` <CADnq5_Nf-hZLLYiOOc96EiP4amYo+nZodfQWrsi7LLL5zZCLdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-08  4:42           ` Zhu, Rex
     [not found]             ` <CY4PR12MB16876C89FC2C08EB2197FE62FBDF0-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-03-08 13:37               ` Alex Deucher
2018-03-07 10:46   ` [PATCH 5/8] drm/amd/pp: Clean up " Rex Zhu
     [not found]     ` <1520419570-28831-5-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-07 17:25       ` Alex Deucher
2018-03-07 10:46   ` [PATCH 6/8] drm/amd/pp: Add new smu backend function smc_table_manager Rex Zhu
     [not found]     ` <1520419570-28831-6-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-07 17:28       ` Alex Deucher
2018-03-07 10:46   ` [PATCH 7/8] drm/amd/pp: Add rv_copy_table_from/to_smc to smu backend function table Rex Zhu
2018-03-07 10:46   ` [PATCH 8/8] drm/amd/pp: Replace rv_* with smu10_* Rex Zhu
2018-03-07 17:12   ` [PATCH 1/8] drm/amd/pp: Refine code for smu7 in powerplay Alex Deucher
     [not found]     ` <CADnq5_OeOQwxo6pMsrDEdCgwYK06cEq3bU7ztF+nvAFHmVQ-yw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-09 10:55       ` Zhu, Rex
     [not found]         ` <CY4PR12MB168736E41ADC884B48DF5171FBDE0-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-03-09 17:06           ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520419570-28831-3-git-send-email-Rex.Zhu@amd.com \
    --to=rex.zhu-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.