]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/pm: Enable thermal alert on SMUv15.0.8
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 5 Mar 2026 11:16:14 +0000 (16:46 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Apr 2026 19:41:13 +0000 (15:41 -0400)
Enable thermal alert interrupts on SMUv15.0.8

v2: squash in cleanups

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c

index 25cfb051d0c6eabe076856c270f8128f6f065a0e..912a1e1e0cd6aca048f031cfbb52a8c6be5ae4ab 100644 (file)
@@ -2191,6 +2191,14 @@ static int smu_v15_0_8_get_ppt_limit(struct smu_context *smu,
        return -EOPNOTSUPP;
 }
 
+static int smu_v15_0_8_enable_thermal_alert(struct smu_context *smu)
+{
+       if (!smu->irq_source.num_types)
+               return 0;
+
+       return amdgpu_irq_get(smu->adev, &smu->irq_source, 0);
+}
+
 static const struct pptable_funcs smu_v15_0_8_ppt_funcs = {
        .init_allowed_features = smu_v15_0_8_init_allowed_features,
        .set_default_dpm_table = smu_v15_0_8_set_default_dpm_table,
@@ -2208,6 +2216,8 @@ static const struct pptable_funcs smu_v15_0_8_ppt_funcs = {
        .get_enabled_mask = smu_v15_0_8_get_enabled_mask,
        .feature_is_enabled = smu_cmn_feature_is_enabled,
        .register_irq_handler = smu_v15_0_8_register_irq_handler,
+       .enable_thermal_alert = smu_v15_0_8_enable_thermal_alert,
+       .disable_thermal_alert = smu_v15_0_disable_thermal_alert,
        .setup_pptable = smu_v15_0_8_setup_pptable,
        .get_pp_feature_mask = smu_cmn_get_pp_feature_mask,
        .wait_for_event = smu_v15_0_wait_for_event,