Commit 8667eb64 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: drop unnecessary sw smu check

There is already sw smu check on IP block adding.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 97df424f
...@@ -436,9 +436,6 @@ static int smu_sw_init(void *handle) ...@@ -436,9 +436,6 @@ static int smu_sw_init(void *handle)
struct smu_context *smu = &adev->smu; struct smu_context *smu = &adev->smu;
int ret; int ret;
if (!is_support_sw_smu(adev))
return -EINVAL;
smu->pool_size = adev->pm.smu_prv_buffer_size; smu->pool_size = adev->pm.smu_prv_buffer_size;
smu->smu_feature.feature_num = SMU_FEATURE_MAX; smu->smu_feature.feature_num = SMU_FEATURE_MAX;
mutex_init(&smu->smu_feature.mutex); mutex_init(&smu->smu_feature.mutex);
...@@ -490,9 +487,6 @@ static int smu_sw_fini(void *handle) ...@@ -490,9 +487,6 @@ static int smu_sw_fini(void *handle)
struct smu_context *smu = &adev->smu; struct smu_context *smu = &adev->smu;
int ret; int ret;
if (!is_support_sw_smu(adev))
return -EINVAL;
ret = smu_smc_table_sw_fini(smu); ret = smu_smc_table_sw_fini(smu);
if (ret) { if (ret) {
pr_err("Failed to sw fini smc table!\n"); pr_err("Failed to sw fini smc table!\n");
...@@ -818,9 +812,6 @@ static int smu_hw_init(void *handle) ...@@ -818,9 +812,6 @@ static int smu_hw_init(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct smu_context *smu = &adev->smu; struct smu_context *smu = &adev->smu;
if (!is_support_sw_smu(adev))
return -EINVAL;
if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) { if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
ret = smu_load_microcode(smu); ret = smu_load_microcode(smu);
if (ret) if (ret)
...@@ -879,9 +870,6 @@ static int smu_hw_fini(void *handle) ...@@ -879,9 +870,6 @@ static int smu_hw_fini(void *handle)
struct smu_table_context *table_context = &smu->smu_table; struct smu_table_context *table_context = &smu->smu_table;
int ret = 0; int ret = 0;
if (!is_support_sw_smu(adev))
return -EINVAL;
kfree(table_context->driver_pptable); kfree(table_context->driver_pptable);
table_context->driver_pptable = NULL; table_context->driver_pptable = NULL;
...@@ -936,9 +924,6 @@ static int smu_suspend(void *handle) ...@@ -936,9 +924,6 @@ static int smu_suspend(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct smu_context *smu = &adev->smu; struct smu_context *smu = &adev->smu;
if (!is_support_sw_smu(adev))
return -EINVAL;
ret = smu_system_features_control(smu, false); ret = smu_system_features_control(smu, false);
if (ret) if (ret)
return ret; return ret;
...@@ -954,9 +939,6 @@ static int smu_resume(void *handle) ...@@ -954,9 +939,6 @@ static int smu_resume(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct smu_context *smu = &adev->smu; struct smu_context *smu = &adev->smu;
if (!is_support_sw_smu(adev))
return -EINVAL;
pr_info("SMU is resuming...\n"); pr_info("SMU is resuming...\n");
mutex_lock(&smu->mutex); mutex_lock(&smu->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment