6.7: misc-additions: Get rid of merged 'wifi: ath11k: rely on mac80211 debugfs handling for vif', prototype patch for SMU13.0.0 powercap and regression revert for rdna3 shutdown/reboot hang.
Those were fixed in 6.7.3
This commit is contained in:
@@ -97,483 +97,3 @@ index f4b210ab061291..837d0dbb28ea08 100644
|
|||||||
depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
|
depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
|
||||||
help
|
help
|
||||||
This value can be used to select the number of bits to use to
|
This value can be used to select the number of bits to use to
|
||||||
|
|
||||||
From 7c13cc521f78fd261de3001dac48fd572baae671 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Berg <benjamin.berg@intel.com>
|
|
||||||
Date: Thu, 11 Jan 2024 18:06:29 +0100
|
|
||||||
Subject: [PATCH] wifi: ath11k: rely on mac80211 debugfs handling for vif
|
|
||||||
|
|
||||||
mac80211 started to delete debugfs entries in certain cases, causing a
|
|
||||||
conflict between ath11k also trying to delete them later on. Fix this by
|
|
||||||
relying on mac80211 to delete the entries when appropriate and adding
|
|
||||||
them from the vif_add_debugfs handler.
|
|
||||||
|
|
||||||
Fixes: 0a3d898ee9a8 ("wifi: mac80211: add/remove driver debugfs entries as appropriate")
|
|
||||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=218364
|
|
||||||
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
|
|
||||||
Cherry-picked-for: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/18
|
|
||||||
---
|
|
||||||
drivers/net/wireless/ath/ath11k/core.h | 4 ----
|
|
||||||
drivers/net/wireless/ath/ath11k/debugfs.c | 25 +++++++++--------------
|
|
||||||
drivers/net/wireless/ath/ath11k/debugfs.h | 12 ++---------
|
|
||||||
drivers/net/wireless/ath/ath11k/mac.c | 12 +----------
|
|
||||||
4 files changed, 13 insertions(+), 40 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
index f12b606e2d2e56..667d55e261560f 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
||||||
@@ -368,10 +368,6 @@ struct ath11k_vif {
|
|
||||||
struct ieee80211_chanctx_conf chanctx;
|
|
||||||
struct ath11k_arp_ns_offload arp_ns_offload;
|
|
||||||
struct ath11k_rekey_data rekey_data;
|
|
||||||
-
|
|
||||||
-#ifdef CONFIG_ATH11K_DEBUGFS
|
|
||||||
- struct dentry *debugfs_twt;
|
|
||||||
-#endif /* CONFIG_ATH11K_DEBUGFS */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ath11k_vif_iter {
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/debugfs.c b/drivers/net/wireless/ath/ath11k/debugfs.c
|
|
||||||
index be76e7d1c4366e..3ba6aa077e36d2 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/debugfs.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/debugfs.c
|
|
||||||
@@ -1893,35 +1893,30 @@ static const struct file_operations ath11k_fops_twt_resume_dialog = {
|
|
||||||
.open = simple_open
|
|
||||||
};
|
|
||||||
|
|
||||||
-void ath11k_debugfs_add_interface(struct ath11k_vif *arvif)
|
|
||||||
+void ath11k_debugfs_op_add_interface(struct ieee80211_hw *hw,
|
|
||||||
+ struct ieee80211_vif *vif)
|
|
||||||
{
|
|
||||||
+ struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
|
|
||||||
struct ath11k_base *ab = arvif->ar->ab;
|
|
||||||
+ struct dentry *debugfs_twt;
|
|
||||||
|
|
||||||
if (arvif->vif->type != NL80211_IFTYPE_AP &&
|
|
||||||
!(arvif->vif->type == NL80211_IFTYPE_STATION &&
|
|
||||||
test_bit(WMI_TLV_SERVICE_STA_TWT, ab->wmi_ab.svc_map)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
- arvif->debugfs_twt = debugfs_create_dir("twt",
|
|
||||||
- arvif->vif->debugfs_dir);
|
|
||||||
- debugfs_create_file("add_dialog", 0200, arvif->debugfs_twt,
|
|
||||||
+ debugfs_twt = debugfs_create_dir("twt",
|
|
||||||
+ arvif->vif->debugfs_dir);
|
|
||||||
+ debugfs_create_file("add_dialog", 0200, debugfs_twt,
|
|
||||||
arvif, &ath11k_fops_twt_add_dialog);
|
|
||||||
|
|
||||||
- debugfs_create_file("del_dialog", 0200, arvif->debugfs_twt,
|
|
||||||
+ debugfs_create_file("del_dialog", 0200, debugfs_twt,
|
|
||||||
arvif, &ath11k_fops_twt_del_dialog);
|
|
||||||
|
|
||||||
- debugfs_create_file("pause_dialog", 0200, arvif->debugfs_twt,
|
|
||||||
+ debugfs_create_file("pause_dialog", 0200, debugfs_twt,
|
|
||||||
arvif, &ath11k_fops_twt_pause_dialog);
|
|
||||||
|
|
||||||
- debugfs_create_file("resume_dialog", 0200, arvif->debugfs_twt,
|
|
||||||
+ debugfs_create_file("resume_dialog", 0200, debugfs_twt,
|
|
||||||
arvif, &ath11k_fops_twt_resume_dialog);
|
|
||||||
}
|
|
||||||
|
|
||||||
-void ath11k_debugfs_remove_interface(struct ath11k_vif *arvif)
|
|
||||||
-{
|
|
||||||
- if (!arvif->debugfs_twt)
|
|
||||||
- return;
|
|
||||||
-
|
|
||||||
- debugfs_remove_recursive(arvif->debugfs_twt);
|
|
||||||
- arvif->debugfs_twt = NULL;
|
|
||||||
-}
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/debugfs.h b/drivers/net/wireless/ath/ath11k/debugfs.h
|
|
||||||
index 3af0169f6cf218..b0bdd5e5f82b22 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/debugfs.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/debugfs.h
|
|
||||||
@@ -306,8 +306,8 @@ static inline int ath11k_debugfs_rx_filter(struct ath11k *ar)
|
|
||||||
return ar->debug.rx_filter;
|
|
||||||
}
|
|
||||||
|
|
||||||
-void ath11k_debugfs_add_interface(struct ath11k_vif *arvif);
|
|
||||||
-void ath11k_debugfs_remove_interface(struct ath11k_vif *arvif);
|
|
||||||
+void ath11k_debugfs_op_add_interface(struct ieee80211_hw *hw,
|
|
||||||
+ struct ieee80211_vif *vif);
|
|
||||||
void ath11k_debugfs_add_dbring_entry(struct ath11k *ar,
|
|
||||||
enum wmi_direct_buffer_module id,
|
|
||||||
enum ath11k_dbg_dbr_event event,
|
|
||||||
@@ -386,14 +386,6 @@ static inline int ath11k_debugfs_get_fw_stats(struct ath11k *ar,
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static inline void ath11k_debugfs_add_interface(struct ath11k_vif *arvif)
|
|
||||||
-{
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-static inline void ath11k_debugfs_remove_interface(struct ath11k_vif *arvif)
|
|
||||||
-{
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
static inline void
|
|
||||||
ath11k_debugfs_add_dbring_entry(struct ath11k *ar,
|
|
||||||
enum wmi_direct_buffer_module id,
|
|
||||||
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
index 7f7b3981777377..6acf11fafb22e5 100644
|
|
||||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
||||||
@@ -6750,13 +6750,6 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* In the case of hardware recovery, debugfs files are
|
|
||||||
- * not deleted since ieee80211_ops.remove_interface() is
|
|
||||||
- * not invoked. In such cases, try to delete the files.
|
|
||||||
- * These will be re-created later.
|
|
||||||
- */
|
|
||||||
- ath11k_debugfs_remove_interface(arvif);
|
|
||||||
-
|
|
||||||
memset(arvif, 0, sizeof(*arvif));
|
|
||||||
|
|
||||||
arvif->ar = ar;
|
|
||||||
@@ -6933,8 +6926,6 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
|
|
||||||
|
|
||||||
ath11k_dp_vdev_tx_attach(ar, arvif);
|
|
||||||
|
|
||||||
- ath11k_debugfs_add_interface(arvif);
|
|
||||||
-
|
|
||||||
if (vif->type != NL80211_IFTYPE_MONITOR &&
|
|
||||||
test_bit(ATH11K_FLAG_MONITOR_CONF_ENABLED, &ar->monitor_flags)) {
|
|
||||||
ret = ath11k_mac_monitor_vdev_create(ar);
|
|
||||||
@@ -7050,8 +7041,6 @@ static void ath11k_mac_op_remove_interface(struct ieee80211_hw *hw,
|
|
||||||
/* Recalc txpower for remaining vdev */
|
|
||||||
ath11k_mac_txpower_recalc(ar);
|
|
||||||
|
|
||||||
- ath11k_debugfs_remove_interface(arvif);
|
|
||||||
-
|
|
||||||
/* TODO: recal traffic pause state based on the available vdevs */
|
|
||||||
|
|
||||||
mutex_unlock(&ar->conf_mutex);
|
|
||||||
@@ -9149,6 +9138,7 @@ static const struct ieee80211_ops ath11k_ops = {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_ATH11K_DEBUGFS
|
|
||||||
+ .vif_add_debugfs = ath11k_debugfs_op_add_interface,
|
|
||||||
.sta_add_debugfs = ath11k_debugfs_sta_op_add,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
From 431ea67ac560bcd521c0ef8901039ba3bf278c84 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Evan Quan <evan.quan@amd.com>
|
|
||||||
Date: Tue, 13 Jun 2023 10:50:58 +0800
|
|
||||||
Subject: [PATCH] drm/amd/pm: fix the power limit setting for SMU13.0.0
|
|
||||||
|
|
||||||
Prototype for test purpose only.
|
|
||||||
|
|
||||||
Signed-off-by: Evan Quan <evan.quan@amd.com>
|
|
||||||
---
|
|
||||||
.../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 50 ++++++++++++++++++-
|
|
||||||
1 file changed, 49 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
|
|
||||||
index dbe9b29a287e..a15bb4de4e70 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
|
|
||||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
|
|
||||||
@@ -2024,6 +2024,54 @@ static int smu_v13_0_0_get_power_limit(struct smu_context *smu,
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int smu_v13_0_0_set_power_limit(struct smu_context *smu,
|
|
||||||
+ enum smu_ppt_limit_type limit_type,
|
|
||||||
+ uint32_t limit)
|
|
||||||
+{
|
|
||||||
+ PPTable_t *pptable = smu->smu_table.driver_pptable;
|
|
||||||
+ SkuTable_t *skutable = &pptable->SkuTable;
|
|
||||||
+ uint32_t msg_limt = skutable->MsgLimits.Power[PPT_THROTTLER_PPT0][POWER_SOURCE_AC];
|
|
||||||
+ struct smu_table_context *table_context = &smu->smu_table;
|
|
||||||
+ OverDriveTableExternal_t *od_table =
|
|
||||||
+ (OverDriveTableExternal_t *)table_context->overdrive_table;
|
|
||||||
+ int ret = 0;
|
|
||||||
+
|
|
||||||
+ if (limit_type != SMU_DEFAULT_PPT_LIMIT)
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ if (limit <= msg_limt) {
|
|
||||||
+ if (smu->current_power_limit > msg_limt) {
|
|
||||||
+ /* revert previous OD settings */
|
|
||||||
+ od_table->OverDriveTable.Ppt = 0;
|
|
||||||
+ od_table->OverDriveTable.FeatureCtrlMask |= 1U << PP_OD_FEATURE_PPT_BIT;
|
|
||||||
+
|
|
||||||
+ ret = smu_v13_0_0_upload_overdrive_table(smu, od_table);
|
|
||||||
+ if (ret) {
|
|
||||||
+ dev_err(smu->adev->dev, "Failed to upload overdrive table!\n");
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return smu_v13_0_set_power_limit(smu, limit_type, limit);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ret = smu_v13_0_set_power_limit(smu, limit_type, smu->default_power_limit);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ od_table->OverDriveTable.Ppt = (limit * 100) / smu->default_power_limit - 100;
|
|
||||||
+ od_table->OverDriveTable.FeatureCtrlMask |= 1U << PP_OD_FEATURE_PPT_BIT;
|
|
||||||
+
|
|
||||||
+ ret = smu_v13_0_0_upload_overdrive_table(smu, od_table);
|
|
||||||
+ if (ret) {
|
|
||||||
+ dev_err(smu->adev->dev, "Failed to upload overdrive table!\n");
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ smu->current_power_limit = limit;
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int smu_v13_0_0_get_power_profile_mode(struct smu_context *smu,
|
|
||||||
char *buf)
|
|
||||||
{
|
|
||||||
@@ -2702,7 +2750,7 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
|
|
||||||
.set_fan_control_mode = smu_v13_0_set_fan_control_mode,
|
|
||||||
.enable_mgpu_fan_boost = smu_v13_0_0_enable_mgpu_fan_boost,
|
|
||||||
.get_power_limit = smu_v13_0_0_get_power_limit,
|
|
||||||
- .set_power_limit = smu_v13_0_set_power_limit,
|
|
||||||
+ .set_power_limit = smu_v13_0_0_set_power_limit,
|
|
||||||
.set_power_source = smu_v13_0_set_power_source,
|
|
||||||
.get_power_profile_mode = smu_v13_0_0_get_power_profile_mode,
|
|
||||||
.set_power_profile_mode = smu_v13_0_0_set_power_profile_mode,
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
From 3cfb591e23181791195a74efe2e9065e0d4bd201 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Etienne JUVIGNY <ti3nou@gmail.com>
|
|
||||||
Date: Mon, 15 Jan 2024 19:09:39 +0100
|
|
||||||
Subject: Revert: drm/amd/pm: fix the high voltage and temperature issue
|
|
||||||
|
|
||||||
This was supposed to fix the high voltage and temperature issue after the driver is unloaded on smu 13.0.0,
|
|
||||||
smu 13.0.7 and smu 13.0.10, but introduced an arguably more annoying issue. Let's revert it until a proper fix is offered.
|
|
||||||
|
|
||||||
Fixes rdna3 shutdown/reboot hang.
|
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
|
||||||
index 93cf73d6f..960966f4b 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
|
||||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
|
||||||
@@ -4050,23 +4050,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
|
|
||||||
- case IP_VERSION(13, 0, 0):
|
|
||||||
- case IP_VERSION(13, 0, 7):
|
|
||||||
- case IP_VERSION(13, 0, 10):
|
|
||||||
- r = psp_gpu_reset(adev);
|
|
||||||
- break;
|
|
||||||
- default:
|
|
||||||
- tmp = amdgpu_reset_method;
|
|
||||||
- /* It should do a default reset when loading or reloading the driver,
|
|
||||||
- * regardless of the module parameter reset_method.
|
|
||||||
- */
|
|
||||||
- amdgpu_reset_method = AMD_RESET_METHOD_NONE;
|
|
||||||
- r = amdgpu_asic_reset(adev);
|
|
||||||
- amdgpu_reset_method = tmp;
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
+ tmp = amdgpu_reset_method;
|
|
||||||
+ /* It should do a default reset when loading or reloading the driver,
|
|
||||||
+ * regardless of the module parameter reset_method.
|
|
||||||
+ */
|
|
||||||
+ amdgpu_reset_method = AMD_RESET_METHOD_NONE;
|
|
||||||
+ r = amdgpu_asic_reset(adev);
|
|
||||||
+ amdgpu_reset_method = tmp;
|
|
||||||
if (r) {
|
|
||||||
dev_err(adev->dev, "asic reset on init failed\n");
|
|
||||||
goto failed;
|
|
||||||
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
|
|
||||||
index e1a5ee911..308ebeb43 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
|
|
||||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
|
|
||||||
@@ -733,7 +733,7 @@ static int smu_early_init(void *handle)
|
|
||||||
smu->adev = adev;
|
|
||||||
smu->pm_enabled = !!amdgpu_dpm;
|
|
||||||
smu->is_apu = false;
|
|
||||||
- smu->smu_baco.state = SMU_BACO_STATE_NONE;
|
|
||||||
+ smu->smu_baco.state = SMU_BACO_STATE_EXIT;
|
|
||||||
smu->smu_baco.platform_support = false;
|
|
||||||
smu->user_dpm_profile.fan_mode = -1;
|
|
||||||
|
|
||||||
@@ -1753,31 +1753,10 @@ static int smu_smc_hw_cleanup(struct smu_context *smu)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int smu_reset_mp1_state(struct smu_context *smu)
|
|
||||||
-{
|
|
||||||
- struct amdgpu_device *adev = smu->adev;
|
|
||||||
- int ret = 0;
|
|
||||||
-
|
|
||||||
- if ((!adev->in_runpm) && (!adev->in_suspend) &&
|
|
||||||
- (!amdgpu_in_reset(adev)))
|
|
||||||
- switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
|
|
||||||
- case IP_VERSION(13, 0, 0):
|
|
||||||
- case IP_VERSION(13, 0, 7):
|
|
||||||
- case IP_VERSION(13, 0, 10):
|
|
||||||
- ret = smu_set_mp1_state(smu, PP_MP1_STATE_UNLOAD);
|
|
||||||
- break;
|
|
||||||
- default:
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return ret;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
static int smu_hw_fini(void *handle)
|
|
||||||
{
|
|
||||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
|
||||||
struct smu_context *smu = adev->powerplay.pp_handle;
|
|
||||||
- int ret;
|
|
||||||
|
|
||||||
if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev))
|
|
||||||
return 0;
|
|
||||||
@@ -1795,15 +1774,7 @@ static int smu_hw_fini(void *handle)
|
|
||||||
|
|
||||||
adev->pm.dpm_enabled = false;
|
|
||||||
|
|
||||||
- ret = smu_smc_hw_cleanup(smu);
|
|
||||||
- if (ret)
|
|
||||||
- return ret;
|
|
||||||
-
|
|
||||||
- ret = smu_reset_mp1_state(smu);
|
|
||||||
- if (ret)
|
|
||||||
- return ret;
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
+ return smu_smc_hw_cleanup(smu);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void smu_late_fini(void *handle)
|
|
||||||
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
|
|
||||||
index f8b2e6cc2..e8329d157 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
|
|
||||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
|
|
||||||
@@ -419,7 +419,6 @@ enum smu_reset_mode {
|
|
||||||
enum smu_baco_state {
|
|
||||||
SMU_BACO_STATE_ENTER = 0,
|
|
||||||
SMU_BACO_STATE_EXIT,
|
|
||||||
- SMU_BACO_STATE_NONE,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct smu_baco_context {
|
|
||||||
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
|
|
||||||
index 95cb91971..cc02f979e 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
|
|
||||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
|
|
||||||
@@ -299,7 +299,5 @@ int smu_v13_0_update_pcie_parameters(struct smu_context *smu,
|
|
||||||
uint8_t pcie_gen_cap,
|
|
||||||
uint8_t pcie_width_cap);
|
|
||||||
|
|
||||||
-int smu_v13_0_disable_pmfw_state(struct smu_context *smu);
|
|
||||||
-
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
|
|
||||||
index cf1b84060..a49e5adf7 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
|
|
||||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
|
|
||||||
@@ -2477,16 +2477,3 @@ int smu_v13_0_update_pcie_parameters(struct smu_context *smu,
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
-
|
|
||||||
-int smu_v13_0_disable_pmfw_state(struct smu_context *smu)
|
|
||||||
-{
|
|
||||||
- int ret;
|
|
||||||
- struct amdgpu_device *adev = smu->adev;
|
|
||||||
-
|
|
||||||
- WREG32_PCIE(MP1_Public | (smnMP1_FIRMWARE_FLAGS & 0xffffffff), 0);
|
|
||||||
-
|
|
||||||
- ret = RREG32_PCIE(MP1_Public |
|
|
||||||
- (smnMP1_FIRMWARE_FLAGS & 0xffffffff));
|
|
||||||
-
|
|
||||||
- return ret == 0 ? 0 : -EINVAL;
|
|
||||||
-}
|
|
||||||
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
|
|
||||||
index 82c4e1f1c..2ba77b1d1 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
|
|
||||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
|
|
||||||
@@ -2574,20 +2574,14 @@ static int smu_v13_0_0_baco_enter(struct smu_context *smu)
|
|
||||||
static int smu_v13_0_0_baco_exit(struct smu_context *smu)
|
|
||||||
{
|
|
||||||
struct amdgpu_device *adev = smu->adev;
|
|
||||||
- int ret;
|
|
||||||
|
|
||||||
if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev)) {
|
|
||||||
/* Wait for PMFW handling for the Dstate change */
|
|
||||||
usleep_range(10000, 11000);
|
|
||||||
- ret = smu_v13_0_baco_set_armd3_sequence(smu, BACO_SEQ_ULPS);
|
|
||||||
+ return smu_v13_0_baco_set_armd3_sequence(smu, BACO_SEQ_ULPS);
|
|
||||||
} else {
|
|
||||||
- ret = smu_v13_0_baco_exit(smu);
|
|
||||||
+ return smu_v13_0_baco_exit(smu);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- if (!ret)
|
|
||||||
- adev->gfx.is_poweron = false;
|
|
||||||
-
|
|
||||||
- return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool smu_v13_0_0_is_mode1_reset_supported(struct smu_context *smu)
|
|
||||||
@@ -2772,13 +2766,7 @@ static int smu_v13_0_0_set_mp1_state(struct smu_context *smu,
|
|
||||||
|
|
||||||
switch (mp1_state) {
|
|
||||||
case PP_MP1_STATE_UNLOAD:
|
|
||||||
- ret = smu_cmn_send_smc_msg_with_param(smu,
|
|
||||||
- SMU_MSG_PrepareMp1ForUnload,
|
|
||||||
- 0x55, NULL);
|
|
||||||
-
|
|
||||||
- if (!ret && smu->smu_baco.state == SMU_BACO_STATE_EXIT)
|
|
||||||
- ret = smu_v13_0_disable_pmfw_state(smu);
|
|
||||||
-
|
|
||||||
+ ret = smu_cmn_set_mp1_state(smu, mp1_state);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* Ignore others */
|
|
||||||
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
|
|
||||||
index 81eafed76..19c1289d0 100644
|
|
||||||
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
|
|
||||||
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
|
|
||||||
@@ -2499,13 +2499,7 @@ static int smu_v13_0_7_set_mp1_state(struct smu_context *smu,
|
|
||||||
|
|
||||||
switch (mp1_state) {
|
|
||||||
case PP_MP1_STATE_UNLOAD:
|
|
||||||
- ret = smu_cmn_send_smc_msg_with_param(smu,
|
|
||||||
- SMU_MSG_PrepareMp1ForUnload,
|
|
||||||
- 0x55, NULL);
|
|
||||||
-
|
|
||||||
- if (!ret && smu->smu_baco.state == SMU_BACO_STATE_EXIT)
|
|
||||||
- ret = smu_v13_0_disable_pmfw_state(smu);
|
|
||||||
-
|
|
||||||
+ ret = smu_cmn_set_mp1_state(smu, mp1_state);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* Ignore others */
|
|
||||||
@@ -2531,20 +2525,14 @@ static int smu_v13_0_7_baco_enter(struct smu_context *smu)
|
|
||||||
static int smu_v13_0_7_baco_exit(struct smu_context *smu)
|
|
||||||
{
|
|
||||||
struct amdgpu_device *adev = smu->adev;
|
|
||||||
- int ret;
|
|
||||||
|
|
||||||
if (adev->in_runpm && smu_cmn_is_audio_func_enabled(adev)) {
|
|
||||||
/* Wait for PMFW handling for the Dstate change */
|
|
||||||
usleep_range(10000, 11000);
|
|
||||||
- ret = smu_v13_0_baco_set_armd3_sequence(smu, BACO_SEQ_ULPS);
|
|
||||||
+ return smu_v13_0_baco_set_armd3_sequence(smu, BACO_SEQ_ULPS);
|
|
||||||
} else {
|
|
||||||
- ret = smu_v13_0_baco_exit(smu);
|
|
||||||
+ return smu_v13_0_baco_exit(smu);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
- if (!ret)
|
|
||||||
- adev->gfx.is_poweron = false;
|
|
||||||
-
|
|
||||||
- return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool smu_v13_0_7_is_mode1_reset_supported(struct smu_context *smu)
|
|
||||||
|
Reference in New Issue
Block a user