drm/amd/pm: correct the MGpuFanBoost support for Beige Goby
authorjsg <jsg@openbsd.org>
Wed, 9 Feb 2022 04:19:11 +0000 (04:19 +0000)
committerjsg <jsg@openbsd.org>
Wed, 9 Feb 2022 04:19:11 +0000 (04:19 +0000)
From Evan Quan
4f4c77ad5a13ac39d38cc3f1b963e85ecf9d528f in linux 5.15.y/5.15.22
3ec5586b4699cfb75cdfa09425e11d121db40773 in mainline linux

sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c

index e51e448..b509f1f 100644 (file)
@@ -3730,14 +3730,14 @@ static ssize_t sienna_cichlid_get_gpu_metrics(struct smu_context *smu,
 
 static int sienna_cichlid_enable_mgpu_fan_boost(struct smu_context *smu)
 {
-       struct smu_table_context *table_context = &smu->smu_table;
-       PPTable_t *smc_pptable = table_context->driver_pptable;
+       uint16_t *mgpu_fan_boost_limit_rpm;
 
+       GET_PPTABLE_MEMBER(MGpuFanBoostLimitRpm, &mgpu_fan_boost_limit_rpm);
        /*
         * Skip the MGpuFanBoost setting for those ASICs
         * which do not support it
         */
-       if (!smc_pptable->MGpuFanBoostLimitRpm)
+       if (*mgpu_fan_boost_limit_rpm == 0)
                return 0;
 
        return smu_cmn_send_smc_msg_with_param(smu,