forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c
....@@ -21,8 +21,10 @@
2121 *
2222 * Authors: Martin Peres
2323 */
24
-#include <nvkm/core/option.h>
2524 #include "priv.h"
25
+
26
+#include <core/option.h>
27
+#include <subdev/pmu.h>
2628
2729 int
2830 nvkm_therm_temp_get(struct nvkm_therm *therm)
....@@ -192,8 +194,7 @@
192194
193195 /* The default PPWR ucode on fermi interferes with fan management */
194196 if ((mode >= ARRAY_SIZE(name)) ||
195
- (mode != NVKM_THERM_CTRL_NONE && device->card_type >= NV_C0 &&
196
- !device->pmu))
197
+ (mode != NVKM_THERM_CTRL_NONE && nvkm_pmu_fan_controlled(device)))
197198 return -EINVAL;
198199
199200 /* do not allow automatic fan management if the thermal sensor is