提交 b1aa5531 编写于 作者: M Martin Peres 提交者: Ben Skeggs

drm/nouveau: move pwm_divisor to the nouveau_pm_fan struct

Signed-off-by: NMartin Peres <martin.peres@labri.fr>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 bc6389e4
...@@ -523,6 +523,7 @@ struct nouveau_pm_fan { ...@@ -523,6 +523,7 @@ struct nouveau_pm_fan {
u32 min_duty; u32 min_duty;
u32 max_duty; u32 max_duty;
u32 pwm_freq; u32 pwm_freq;
u32 pwm_divisor;
}; };
struct nouveau_pm_engine { struct nouveau_pm_engine {
...@@ -533,7 +534,6 @@ struct nouveau_pm_engine { ...@@ -533,7 +534,6 @@ struct nouveau_pm_engine {
struct nouveau_pm_temp_sensor_constants sensor_constants; struct nouveau_pm_temp_sensor_constants sensor_constants;
struct nouveau_pm_threshold_temp threshold_temp; struct nouveau_pm_threshold_temp threshold_temp;
struct nouveau_pm_fan fan; struct nouveau_pm_fan fan;
u32 pwm_divisor;
struct nouveau_pm_level boot; struct nouveau_pm_level boot;
struct nouveau_pm_level *cur; struct nouveau_pm_level *cur;
......
...@@ -206,7 +206,7 @@ nouveau_perf_init(struct drm_device *dev) ...@@ -206,7 +206,7 @@ nouveau_perf_init(struct drm_device *dev)
recordlen = perf[3] + (perf[4] * perf[5]); recordlen = perf[3] + (perf[4] * perf[5]);
entries = perf[2]; entries = perf[2];
pm->pwm_divisor = ROM16(perf[6]); pm->fan.pwm_divisor = ROM16(perf[6]);
} else { } else {
recordlen = perf[2] + (perf[3] * perf[4]); recordlen = perf[2] + (perf[3] * perf[4]);
entries = perf[5]; entries = perf[5];
......
...@@ -77,7 +77,7 @@ nouveau_pwmfan_set(struct drm_device *dev, int percent) ...@@ -77,7 +77,7 @@ nouveau_pwmfan_set(struct drm_device *dev, int percent)
ret = nouveau_gpio_find(dev, 0, DCB_GPIO_PWM_FAN, 0xff, &gpio); ret = nouveau_gpio_find(dev, 0, DCB_GPIO_PWM_FAN, 0xff, &gpio);
if (ret == 0) { if (ret == 0) {
divs = pm->pwm_divisor; divs = pm->fan.pwm_divisor;
if (pm->fan.pwm_freq) { if (pm->fan.pwm_freq) {
/*XXX: PNVIO clock more than likely... */ /*XXX: PNVIO clock more than likely... */
divs = 135000 / pm->fan.pwm_freq; divs = 135000 / pm->fan.pwm_freq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册