summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/inc
diff options
context:
space:
mode:
authorhersen wu <hersenxs.wu@amd.com>2019-05-21 15:38:59 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-06-21 18:59:32 -0500
commit26e2b581482d69053eff27d355c04e182fb6b662 (patch)
treee43c019b69e610e7f376bd5df9362f0e4ddb96bb /drivers/gpu/drm/amd/powerplay/inc
parent2e13c7551ca03dac449c0d55a08a0459d876ea11 (diff)
drm/amd/powerplay: wake up azalia from d3 by sending smu message
this is hw workaround to wake up azalia from d3. display asic and azalia are two different pci devices. while display asic wake from d3, current hw does not send signal to azalia. workaround: display driver ask smu send message to azalia device to let azalia wake up. Defintion of SMU message, like PPSMC_MSG_BacroAudioD3PME, is per asic. It is shared by different OS. Signed-off-by: hersen wu <hersenxs.wu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/inc')
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h4
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_ppsmc.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
index 267c4f6eb317..8acc17973577 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
@@ -239,6 +239,7 @@ enum smu_message_type
SMU_MSG_PowerDownVcn,
SMU_MSG_PowerUpJpeg,
SMU_MSG_PowerDownJpeg,
+ SMU_MSG_BacoAudioD3PME,
SMU_MSG_MAX_COUNT,
};
@@ -687,6 +688,7 @@ struct smu_funcs
int (*set_xgmi_pstate)(struct smu_context *smu, uint32_t pstate);
int (*gfx_off_control)(struct smu_context *smu, bool enable);
int (*register_irq_handler)(struct smu_context *smu);
+ int (*set_azalia_d3_pme)(struct smu_context *smu);
};
#define smu_init_microcode(smu) \
@@ -893,6 +895,8 @@ struct smu_funcs
((smu)->ppt_funcs->get_thermal_temperature_range? (smu)->ppt_funcs->get_thermal_temperature_range((smu), (range)) : 0)
#define smu_register_irq_handler(smu) \
((smu)->funcs->register_irq_handler ? (smu)->funcs->register_irq_handler(smu) : 0)
+#define smu_set_azalia_d3_pme(smu) \
+ ((smu)->funcs->set_azalia_d3_pme ? (smu)->funcs->set_azalia_d3_pme((smu)) : 0)
extern int smu_get_atom_data_table(struct smu_context *smu, uint32_t table,
uint16_t *size, uint8_t *frev, uint8_t *crev,
diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_ppsmc.h b/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_ppsmc.h
index 2cb063664557..373861ddccd0 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_ppsmc.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_ppsmc.h
@@ -118,8 +118,9 @@
#define PPSMC_MSG_SetGeminiApertureLow 0x44
#define PPSMC_MSG_GetVoltageByDpmOverdrive 0x45
+#define PPSMC_MSG_BacoAudioD3PME 0x48
-#define PPSMC_Message_Count 0x47
+#define PPSMC_Message_Count 0x49
typedef uint32_t PPSMC_Result;
typedef uint32_t PPSMC_Msg;