Home
last modified time | relevance | path

Searched refs:therm (Results 1 – 19 of 19) sorted by relevance

/drivers/gpu/drm/nouveau/core/subdev/therm/
Dtemp.c33 nouveau_therm_temp_set_defaults(struct nouveau_therm *therm) in nouveau_therm_temp_set_defaults() argument
35 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_temp_set_defaults()
54 nouveau_therm_temp_safety_checks(struct nouveau_therm *therm) in nouveau_therm_temp_safety_checks() argument
56 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_temp_safety_checks()
67 void nouveau_therm_sensor_set_threshold_state(struct nouveau_therm *therm, in nouveau_therm_sensor_set_threshold_state() argument
71 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_sensor_set_threshold_state()
77 nouveau_therm_sensor_get_threshold_state(struct nouveau_therm *therm, in nouveau_therm_sensor_get_threshold_state() argument
80 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_sensor_get_threshold_state()
91 void nouveau_therm_sensor_event(struct nouveau_therm *therm, in nouveau_therm_sensor_event() argument
95 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_sensor_event()
[all …]
Dnv40.c35 nv40_sensor_style(struct nouveau_therm *therm) in nv40_sensor_style() argument
37 struct nouveau_device *device = nv_device(therm); in nv40_sensor_style()
61 nv40_sensor_setup(struct nouveau_therm *therm) in nv40_sensor_setup() argument
63 enum nv40_sensor_style style = nv40_sensor_style(therm); in nv40_sensor_setup()
67 nv_mask(therm, 0x15b8, 0x80000000, 0); in nv40_sensor_setup()
68 nv_wr32(therm, 0x15b0, 0x80003fff); in nv40_sensor_setup()
70 return nv_rd32(therm, 0x15b4) & 0x3fff; in nv40_sensor_setup()
72 nv_wr32(therm, 0x15b0, 0xff); in nv40_sensor_setup()
74 return nv_rd32(therm, 0x15b4) & 0xff; in nv40_sensor_setup()
80 nv40_temp_get(struct nouveau_therm *therm) in nv40_temp_get() argument
[all …]
Dbase.c33 nouveau_therm_update_trip(struct nouveau_therm *therm) in nouveau_therm_update_trip() argument
35 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_update_trip()
39 u8 temp = therm->temp_get(therm); in nouveau_therm_update_trip()
66 nouveau_therm_update_linear(struct nouveau_therm *therm) in nouveau_therm_update_linear() argument
68 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_update_linear()
71 u8 temp = therm->temp_get(therm); in nouveau_therm_update_linear()
90 nouveau_therm_update(struct nouveau_therm *therm, int mode) in nouveau_therm_update() argument
92 struct nouveau_timer *ptimer = nouveau_timer(therm); in nouveau_therm_update()
93 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_update()
107 duty = nouveau_therm_fan_get(therm); in nouveau_therm_update()
[all …]
Dfan.c39 struct nouveau_therm *therm = fan->parent; in nouveau_fan_update() local
40 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_fan_update()
53 nv_debug(therm, "FAN target: %d\n", target); in nouveau_fan_update()
58 duty = fan->get(therm); in nouveau_fan_update()
78 nv_debug(therm, "FAN update: %d\n", duty); in nouveau_fan_update()
79 ret = fan->set(therm, duty); in nouveau_fan_update()
117 nouveau_therm_fan_get(struct nouveau_therm *therm) in nouveau_therm_fan_get() argument
119 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_fan_get()
120 return priv->fan->get(therm); in nouveau_therm_fan_get()
124 nouveau_therm_fan_set(struct nouveau_therm *therm, bool immediate, int percent) in nouveau_therm_fan_set() argument
[all …]
Dnv84.c34 nv84_temp_get(struct nouveau_therm *therm) in nv84_temp_get() argument
36 struct nouveau_fuse *fuse = nouveau_fuse(therm); in nv84_temp_get()
39 return nv_rd32(therm, 0x20400); in nv84_temp_get()
45 nv84_sensor_setup(struct nouveau_therm *therm) in nv84_sensor_setup() argument
47 struct nouveau_fuse *fuse = nouveau_fuse(therm); in nv84_sensor_setup()
51 nv_mask(therm, 0x20008, 0x80008000, 0x80000000); in nv84_sensor_setup()
52 nv_mask(therm, 0x2000c, 0x80000003, 0x00000000); in nv84_sensor_setup()
58 nv84_therm_program_alarms(struct nouveau_therm *therm) in nv84_therm_program_alarms() argument
60 struct nouveau_therm_priv *priv = (void *)therm; in nv84_therm_program_alarms()
67 nv_wr32(therm, 0x20000, 0x000003ff); in nv84_therm_program_alarms()
[all …]
Dpriv.h47 int (*get)(struct nouveau_therm *therm);
48 int (*set)(struct nouveau_therm *therm, int percent);
106 int nouveau_therm_fan_mode(struct nouveau_therm *therm, int mode);
107 int nouveau_therm_attr_get(struct nouveau_therm *therm,
109 int nouveau_therm_attr_set(struct nouveau_therm *therm,
112 void nouveau_therm_ic_ctor(struct nouveau_therm *therm);
114 int nouveau_therm_sensor_ctor(struct nouveau_therm *therm);
116 int nouveau_therm_fan_ctor(struct nouveau_therm *therm);
117 int nouveau_therm_fan_init(struct nouveau_therm *therm);
118 int nouveau_therm_fan_fini(struct nouveau_therm *therm, bool suspend);
[all …]
Dnv50.c33 pwm_info(struct nouveau_therm *therm, int *line, int *ctrl, int *indx) in pwm_info() argument
50 nv_error(therm, "unknown pwm ctrl for gpio %d\n", *line); in pwm_info()
58 nv50_fan_pwm_ctrl(struct nouveau_therm *therm, int line, bool enable) in nv50_fan_pwm_ctrl() argument
61 int ctrl, id, ret = pwm_info(therm, &line, &ctrl, &id); in nv50_fan_pwm_ctrl()
63 nv_mask(therm, ctrl, 0x00010001 << line, data << line); in nv50_fan_pwm_ctrl()
68 nv50_fan_pwm_get(struct nouveau_therm *therm, int line, u32 *divs, u32 *duty) in nv50_fan_pwm_get() argument
70 int ctrl, id, ret = pwm_info(therm, &line, &ctrl, &id); in nv50_fan_pwm_get()
74 if (nv_rd32(therm, ctrl) & (1 << line)) { in nv50_fan_pwm_get()
75 *divs = nv_rd32(therm, 0x00e114 + (id * 8)); in nv50_fan_pwm_get()
76 *duty = nv_rd32(therm, 0x00e118 + (id * 8)); in nv50_fan_pwm_get()
[all …]
Dfanpwm.c39 nouveau_fanpwm_get(struct nouveau_therm *therm) in nouveau_fanpwm_get() argument
41 struct nouveau_therm_priv *tpriv = (void *)therm; in nouveau_fanpwm_get()
43 struct nouveau_gpio *gpio = nouveau_gpio(therm); in nouveau_fanpwm_get()
44 int card_type = nv_device(therm)->card_type; in nouveau_fanpwm_get()
48 ret = therm->pwm_get(therm, priv->func.line, &divs, &duty); in nouveau_fanpwm_get()
60 nouveau_fanpwm_set(struct nouveau_therm *therm, int percent) in nouveau_fanpwm_set() argument
62 struct nouveau_therm_priv *tpriv = (void *)therm; in nouveau_fanpwm_set()
64 int card_type = nv_device(therm)->card_type; in nouveau_fanpwm_set()
71 if (therm->pwm_clock) in nouveau_fanpwm_set()
72 divs = therm->pwm_clock(therm, priv->func.line); in nouveau_fanpwm_set()
[all …]
Dnvd0.c32 pwm_info(struct nouveau_therm *therm, int line) in pwm_info() argument
34 u32 gpio = nv_rd32(therm, 0x00d610 + (line * 0x04)); in pwm_info()
51 nv_error(therm, "GPIO %d unknown PWM: 0x%08x\n", line, gpio); in pwm_info()
56 nvd0_fan_pwm_ctrl(struct nouveau_therm *therm, int line, bool enable) in nvd0_fan_pwm_ctrl() argument
59 int indx = pwm_info(therm, line); in nvd0_fan_pwm_ctrl()
63 nv_mask(therm, 0x00d610 + (line * 0x04), 0x000000c0, data); in nvd0_fan_pwm_ctrl()
69 nvd0_fan_pwm_get(struct nouveau_therm *therm, int line, u32 *divs, u32 *duty) in nvd0_fan_pwm_get() argument
71 int indx = pwm_info(therm, line); in nvd0_fan_pwm_get()
75 if (nv_rd32(therm, 0x00d610 + (line * 0x04)) & 0x00000040) { in nvd0_fan_pwm_get()
76 *divs = nv_rd32(therm, 0x00e114 + (indx * 8)); in nvd0_fan_pwm_get()
[all …]
Dfantog.c77 nouveau_fantog_get(struct nouveau_therm *therm) in nouveau_fantog_get() argument
79 struct nouveau_therm_priv *tpriv = (void *)therm; in nouveau_fantog_get()
85 nouveau_fantog_set(struct nouveau_therm *therm, int percent) in nouveau_fantog_set() argument
87 struct nouveau_therm_priv *tpriv = (void *)therm; in nouveau_fantog_set()
89 if (therm->pwm_ctrl) in nouveau_fantog_set()
90 therm->pwm_ctrl(therm, priv->func.line, false); in nouveau_fantog_set()
96 nouveau_fantog_create(struct nouveau_therm *therm, struct dcb_gpio_func *func) in nouveau_fantog_create() argument
98 struct nouveau_therm_priv *tpriv = (void *)therm; in nouveau_fantog_create()
102 if (therm->pwm_ctrl) { in nouveau_fantog_create()
103 ret = therm->pwm_ctrl(therm, func->line, false); in nouveau_fantog_create()
Dgm107.c32 gm107_fan_pwm_ctrl(struct nouveau_therm *therm, int line, bool enable) in gm107_fan_pwm_ctrl() argument
39 gm107_fan_pwm_get(struct nouveau_therm *therm, int line, u32 *divs, u32 *duty) in gm107_fan_pwm_get() argument
41 *divs = nv_rd32(therm, 0x10eb20) & 0x1fff; in gm107_fan_pwm_get()
42 *duty = nv_rd32(therm, 0x10eb24) & 0x1fff; in gm107_fan_pwm_get()
47 gm107_fan_pwm_set(struct nouveau_therm *therm, int line, u32 divs, u32 duty) in gm107_fan_pwm_set() argument
49 nv_mask(therm, 0x10eb10, 0x1fff, divs); /* keep the high bits */ in gm107_fan_pwm_set()
50 nv_wr32(therm, 0x10eb14, duty | 0x80000000); in gm107_fan_pwm_set()
55 gm107_fan_pwm_clock(struct nouveau_therm *therm, int line) in gm107_fan_pwm_clock() argument
57 return nv_device(therm)->crystal * 1000; in gm107_fan_pwm_clock()
Dic.c85 nouveau_therm_ic_ctor(struct nouveau_therm *therm) in nouveau_therm_ic_ctor() argument
87 struct nouveau_therm_priv *priv = (void *)therm; in nouveau_therm_ic_ctor()
88 struct nouveau_bios *bios = nouveau_bios(therm); in nouveau_therm_ic_ctor()
89 struct nouveau_i2c *i2c = nouveau_i2c(therm); in nouveau_therm_ic_ctor()
99 board, probe_monitoring_device, therm); in nouveau_therm_ic_ctor()
111 board, probe_monitoring_device, therm); in nouveau_therm_ic_ctor()
120 nv_board_infos, probe_monitoring_device, therm); in nouveau_therm_ic_ctor()
Dfannil.c28 nouveau_fannil_get(struct nouveau_therm *therm) in nouveau_fannil_get() argument
34 nouveau_fannil_set(struct nouveau_therm *therm, int percent) in nouveau_fannil_set() argument
40 nouveau_fannil_create(struct nouveau_therm *therm) in nouveau_fannil_create() argument
42 struct nouveau_therm_priv *tpriv = (void *)therm; in nouveau_fannil_create()
Dnva3.c34 nva3_therm_fan_sense(struct nouveau_therm *therm) in nva3_therm_fan_sense() argument
36 u32 tach = nv_rd32(therm, 0x00e728) & 0x0000ffff; in nva3_therm_fan_sense()
37 u32 ctrl = nv_rd32(therm, 0x00e720); in nva3_therm_fan_sense()
/drivers/gpu/drm/nouveau/
Dnouveau_hwmon.c43 struct nouveau_therm *therm = nvkm_therm(&drm->device); in nouveau_hwmon_show_temp() local
44 int temp = therm->temp_get(therm); in nouveau_hwmon_show_temp()
69 struct nouveau_therm *therm = nvkm_therm(&drm->device); in nouveau_hwmon_temp1_auto_point1_temp() local
72 therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_FAN_BOOST) * 1000); in nouveau_hwmon_temp1_auto_point1_temp()
81 struct nouveau_therm *therm = nvkm_therm(&drm->device); in nouveau_hwmon_set_temp1_auto_point1_temp() local
87 therm->attr_set(therm, NOUVEAU_THERM_ATTR_THRS_FAN_BOOST, in nouveau_hwmon_set_temp1_auto_point1_temp()
102 struct nouveau_therm *therm = nvkm_therm(&drm->device); in nouveau_hwmon_temp1_auto_point1_temp_hyst() local
105 therm->attr_get(therm, NOUVEAU_THERM_ATTR_THRS_FAN_BOOST_HYST) * 1000); in nouveau_hwmon_temp1_auto_point1_temp_hyst()
114 struct nouveau_therm *therm = nvkm_therm(&drm->device); in nouveau_hwmon_set_temp1_auto_point1_temp_hyst() local
120 therm->attr_set(therm, NOUVEAU_THERM_ATTR_THRS_FAN_BOOST_HYST, in nouveau_hwmon_set_temp1_auto_point1_temp_hyst()
[all …]
DMakefile51 nouveau-y += core/subdev/bios/therm.o
189 nouveau-y += core/subdev/therm/base.o
190 nouveau-y += core/subdev/therm/fan.o
191 nouveau-y += core/subdev/therm/fannil.o
192 nouveau-y += core/subdev/therm/fanpwm.o
193 nouveau-y += core/subdev/therm/fantog.o
194 nouveau-y += core/subdev/therm/ic.o
195 nouveau-y += core/subdev/therm/temp.o
196 nouveau-y += core/subdev/therm/nv40.o
197 nouveau-y += core/subdev/therm/nv50.o
[all …]
/drivers/char/
Dds1620.c199 static void ds1620_write_state(struct therm *therm) in ds1620_write_state() argument
202 ds1620_out(THERM_WRITE_TL, 9, therm->lo); in ds1620_write_state()
203 ds1620_out(THERM_WRITE_TH, 9, therm->hi); in ds1620_write_state()
207 static void ds1620_read_state(struct therm *therm) in ds1620_read_state() argument
209 therm->lo = cvt_9_to_int(ds1620_in(THERM_READ_TL, 9)); in ds1620_read_state()
210 therm->hi = cvt_9_to_int(ds1620_in(THERM_READ_TH, 9)); in ds1620_read_state()
238 struct therm therm; in ds1620_ioctl() local
240 struct therm __user *therm; in ds1620_ioctl() member
254 if (get_user(therm.hi, uarg.i)) in ds1620_ioctl()
256 therm.lo = therm.hi - 3; in ds1620_ioctl()
[all …]
/drivers/gpu/drm/nouveau/core/subdev/bios/
Dtherm.c33 u16 therm = 0; in therm_table() local
37 therm = nv_ro16(bios, bit_P.offset + 12); in therm_table()
39 therm = nv_ro16(bios, bit_P.offset + 16); in therm_table()
47 if (!therm) in therm_table()
50 *ver = nv_ro08(bios, therm + 0); in therm_table()
51 *hdr = nv_ro08(bios, therm + 1); in therm_table()
52 *len = nv_ro08(bios, therm + 2); in therm_table()
53 *cnt = nv_ro08(bios, therm + 3); in therm_table()
55 return therm + nv_ro08(bios, therm + 1); in therm_table()
62 u16 therm = therm_table(bios, ver, &hdr, len, &cnt); in nvbios_therm_entry() local
[all …]
/drivers/gpu/drm/nouveau/core/include/subdev/
Dtherm.h56 struct nouveau_therm *therm = (p); \
57 _nouveau_therm_dtor(nv_object(therm)); \
60 struct nouveau_therm *therm = (p); \
61 _nouveau_therm_init(nv_object(therm)); \
64 struct nouveau_therm *therm = (p); \
65 _nouveau_therm_init(nv_object(therm), (s)); \