drm/nouveau: move pwm_divisor to the nouveau_pm_fan struct
authorMartin Peres <martin.peres@ensi-bourges.fr>
Sat, 20 Aug 2011 14:37:06 +0000 (16:37 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Mar 2012 07:06:11 +0000 (17:06 +1000)
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_perf.c
drivers/gpu/drm/nouveau/nouveau_pm.c

index 378c64c2973ee2003339849ca8a9685e9a060f06..78302cccf6fd12037a1c970e27d5c524df350fec 100644 (file)
@@ -523,6 +523,7 @@ struct nouveau_pm_fan {
        u32 min_duty;
        u32 max_duty;
        u32 pwm_freq;
+       u32 pwm_divisor;
 };
 
 struct nouveau_pm_engine {
@@ -533,7 +534,6 @@ struct nouveau_pm_engine {
        struct nouveau_pm_temp_sensor_constants sensor_constants;
        struct nouveau_pm_threshold_temp threshold_temp;
        struct nouveau_pm_fan fan;
-       u32 pwm_divisor;
 
        struct nouveau_pm_level boot;
        struct nouveau_pm_level *cur;
index 54895cc60d2a74b2a62f61d6bd07931b089be7e8..2ca26f39292ace5b4b1e07c927292e6b8cc58630 100644 (file)
@@ -206,7 +206,7 @@ nouveau_perf_init(struct drm_device *dev)
                        recordlen = perf[3] + (perf[4] * perf[5]);
                        entries   = perf[2];
 
-                       pm->pwm_divisor = ROM16(perf[6]);
+                       pm->fan.pwm_divisor = ROM16(perf[6]);
                } else {
                        recordlen = perf[2] + (perf[3] * perf[4]);
                        entries   = perf[5];
index 0c79f060f7f1c8442a10ef86fbe7a9523d398e27..5ee5ca6166aa32d9133836ec999b13f17b1ceff3 100644 (file)
@@ -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);
        if (ret == 0) {
-               divs = pm->pwm_divisor;
+               divs = pm->fan.pwm_divisor;
                if (pm->fan.pwm_freq) {
                        /*XXX: PNVIO clock more than likely... */
                        divs = 135000 / pm->fan.pwm_freq;