aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
diff options
context:
space:
mode:
authorshaoyunl <shaoyun.liu@amd.com>2021-03-10 12:03:37 -0500
committerAlex Deucher <alexander.deucher@amd.com>2021-03-23 23:25:43 -0400
commit0e92159640f3708070d87dba79617dc7e7b63c1d (patch)
treec9c02d3723a2b8ce97773494beb5934b18b5fbf8 /drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
parentdrm/amdgpu: skip read eeprom for device that pending on XGMI reset (diff)
downloadlinux-dev-0e92159640f3708070d87dba79617dc7e7b63c1d.tar.xz
linux-dev-0e92159640f3708070d87dba79617dc7e7b63c1d.zip
drm/amd/pm: Add LightSBR SMU MSG support
This new MSG provide the interface for driver to enable/disable the Light Secondary Bus Reset support from SMU. When enabled, SMU will only do minimum NBIO response to the SBR request and leave the real HW reset to be handled by driver later. When disabled (default state),SMU will pass the request to PSP for a HW reset Signed-off-by: shaoyunl <shaoyun.liu@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 6a6fafc11588..1202b9e7d0f9 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2972,6 +2972,19 @@ int smu_gfx_state_change_set(struct smu_context *smu, uint32_t state)
return ret;
}
+int smu_set_light_sbr(struct smu_context *smu, bool enable)
+{
+ int ret = 0;
+
+ mutex_lock(&smu->mutex);
+ if (smu->ppt_funcs->set_light_sbr)
+ ret = smu->ppt_funcs->set_light_sbr(smu, enable);
+ mutex_unlock(&smu->mutex);
+
+ return ret;
+}
+
+
static const struct amd_pm_funcs swsmu_pm_funcs = {
/* export for sysfs */
.set_fan_control_mode = smu_pp_set_fan_control_mode,