[PATCH 1/2] Revert "drm/amd/pm: workaround to pass jpeg unit test"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This reverts commit a03b8169582453c01cbf76d8a92a8194d3421b13.
Revert this due to a final solution in amdgpu vcn:
commit eef47ed5f703377781ce89eae4b9140325049873
Author: Sonny Jiang <sonjiang@xxxxxxx>
Date:   Tue Jun 18 11:11:11 2024 -0400

    drm/amdgpu/jpeg5: reprogram doorbell setting after power up for each playback

    Doorbell needs to be configured after power up during each playback

Signed-off-by: Kenneth Feng <kenneth.feng@xxxxxxx>
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c     |  3 +-
 .../drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c  | 30 +------------------
 2 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 8e694b576d1c..00384b381289 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -237,7 +237,6 @@ static int smu_dpm_set_vcn_enable(struct smu_context *smu,
 {
 	struct smu_power_context *smu_power = &smu->smu_power;
 	struct smu_power_gate *power_gate = &smu_power->power_gate;
-	struct amdgpu_device *adev = smu->adev;
 	int ret = 0;
 
 	/*
@@ -253,7 +252,7 @@ static int smu_dpm_set_vcn_enable(struct smu_context *smu,
 		return 0;
 
 	ret = smu->ppt_funcs->dpm_set_vcn_enable(smu, enable);
-	if (!ret && !adev->enable_jpeg_test)
+	if (!ret)
 		atomic_set(&power_gate->vcn_gated, !enable);
 
 	return ret;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
index 7179cdacf156..98ea58d792ca 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
@@ -1869,34 +1869,6 @@ static ssize_t smu_v14_0_2_get_ecc_info(struct smu_context *smu,
 	return ret;
 }
 
-static int smu_v14_0_2_set_vcn_enable(struct smu_context *smu,
-			     bool enable)
-{
-	struct amdgpu_device *adev = smu->adev;
-	struct smu_power_gate *power_gate = &smu->smu_power.power_gate;
-	int i, ret = 0;
-
-	if (!adev->enable_jpeg_test)
-		return smu_v14_0_set_vcn_enable(smu, enable);
-
-	if (!atomic_read(&power_gate->vcn_gated) || !enable)
-		return 0;
-
-	for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
-		if (adev->vcn.harvest_config & (1 << i))
-			continue;
-
-		ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn,
-						      i << 16U, NULL);
-		if (ret)
-			return ret;
-	}
-
-	atomic_set(&power_gate->vcn_gated, 0);
-
-	return ret;
-}
-
 static const struct pptable_funcs smu_v14_0_2_ppt_funcs = {
 	.get_allowed_feature_mask = smu_v14_0_2_get_allowed_feature_mask,
 	.set_default_dpm_table = smu_v14_0_2_set_default_dpm_table,
@@ -1919,7 +1891,7 @@ static const struct pptable_funcs smu_v14_0_2_ppt_funcs = {
 	.system_features_control = smu_v14_0_system_features_control,
 	.set_allowed_mask = smu_v14_0_set_allowed_mask,
 	.get_enabled_mask = smu_cmn_get_enabled_mask,
-	.dpm_set_vcn_enable = smu_v14_0_2_set_vcn_enable,
+	.dpm_set_vcn_enable = smu_v14_0_set_vcn_enable,
 	.dpm_set_jpeg_enable = smu_v14_0_set_jpeg_enable,
 	.get_dpm_ultimate_freq = smu_v14_0_2_get_dpm_ultimate_freq,
 	.get_vbios_bootup_values = smu_v14_0_get_vbios_bootup_values,
-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux