aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
diff options
context:
space:
mode:
authorLijo Lazar <[email protected]>2021-03-16 11:34:38 +0000
committerAlex Deucher <[email protected]>2021-04-09 20:46:01 +0000
commit6d77dd9f75bc7fd6b984aeea48e4919523c2e3c9 (patch)
tree6b13f0f04cfe470513ad6a6460734e3d4f835d4b /drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
parentdrm/amd/pm: Modify mode2 msg sequence on aldebaran (diff)
downloadkernel-6d77dd9f75bc7fd6b984aeea48e4919523c2e3c9.tar.gz
kernel-6d77dd9f75bc7fd6b984aeea48e4919523c2e3c9.zip
drm/amd/pm: Add function to wait for smu events
v1: Add function to wait for specific event/states from PMFW v2: Add mutex lock, simplify sequence Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h')
-rw-r--r--drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
index c823570ba7ef..65672bb46337 100644
--- a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
@@ -195,6 +195,11 @@ struct smu_user_dpm_profile {
uint32_t clk_dependency;
};
+enum smu_event_type {
+
+ SMU_EVENT_RESET_COMPLETE = 0,
+};
+
#define SMU_TABLE_INIT(tables, table_id, s, a, d) \
do { \
tables[table_id].size = s; \
@@ -338,7 +343,6 @@ struct smu_power_context {
struct smu_power_gate power_gate;
};
-
#define SMU_FEATURE_MAX (64)
struct smu_feature
{
@@ -1167,6 +1171,12 @@ struct pptable_funcs {
* @set_light_sbr: Set light sbr mode for the SMU.
*/
int (*set_light_sbr)(struct smu_context *smu, bool enable);
+
+ /**
+ * @wait_for_event: Wait for events from SMU.
+ */
+ int (*wait_for_event)(struct smu_context *smu,
+ enum smu_event_type event, uint64_t event_arg);
};
typedef enum {
@@ -1283,5 +1293,8 @@ int smu_gfx_state_change_set(struct smu_context *smu, uint32_t state);
int smu_set_light_sbr(struct smu_context *smu, bool enable);
+int smu_wait_for_event(struct amdgpu_device *adev, enum smu_event_type event,
+ uint64_t event_arg);
+
#endif
#endif