Displaying 1 result from an estimated 1 matches for "t_f24_8".
2017 Aug 31
4
[RFC PATCH] drm/nouveau/therm: initial implementation of new gp1xx temperature sensor
...clude "priv.h"
+
+static int
+gp100_temp_get(struct nvkm_therm *therm)
+{
+ struct nvkm_device *device = therm->subdev.device;
+ struct nvkm_subdev *subdev = &therm->subdev;
+ u32 tsensor = nvkm_rd32(device, 0x20460);
+ u32 status = (tsensor & 0x60000000) >> 29;
+ u32 t_f24_8 = (tsensor & 0x0001fff8);
+
+ /* device SHADOWed */
+ if (status & 0x00000002)
+ nvkm_error(subdev, "Reading temperature from SHADOWed sensor\n");
+
+ /* device valid */
+ if (status & 0x00000001)
+ return t_f24_8 / 256;
+ else
+ return -ENODEV;
+}
+
+static const struct nv...