Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282570
b: refs/heads/master
c: 1e05415
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Dec 21, 2011
1 parent ca0bb30 commit ca5a533
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 693461801464eb65eb779261b3d9d80dc9131f81
refs/heads/master: 1e05415733b0d4668fbce92856fafabfa1a33333
2 changes: 0 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,6 @@ struct nouveau_pm_engine {
int (*voltage_set)(struct drm_device *, int voltage);
int (*pwm_get)(struct drm_device *, struct dcb_gpio_entry*, u32*, u32*);
int (*pwm_set)(struct drm_device *, struct dcb_gpio_entry*, u32, u32);
int (*fanspeed_get)(struct drm_device *);
int (*fanspeed_set)(struct drm_device *, int fanspeed);
int (*temp_get)(struct drm_device *);
};

Expand Down
12 changes: 3 additions & 9 deletions trunk/drivers/gpu/drm/nouveau/nouveau_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,12 @@ nouveau_pwmfan_get(struct drm_device *dev)
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio;
struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
struct dcb_gpio_entry *gpio;
struct dcb_gpio_entry *gpio = NULL;
u32 divs, duty;
int ret;

if (!pm->pwm_get) {
if (pm->fanspeed_get)
return pm->fanspeed_get(dev);
if (!pm->pwm_get)
return -ENODEV;
}

gpio = nouveau_bios_gpio_entry(dev, DCB_GPIO_PWM_FAN);
if (gpio) {
Expand All @@ -75,11 +72,8 @@ nouveau_pwmfan_set(struct drm_device *dev, int percent)
struct dcb_gpio_entry *gpio;
u32 divs, duty;

if (!pm->pwm_set) {
if (pm->fanspeed_set)
return pm->fanspeed_set(dev, percent);
if (!pm->pwm_set)
return -ENODEV;
}

gpio = nouveau_bios_gpio_entry(dev, DCB_GPIO_PWM_FAN);
if (gpio) {
Expand Down

0 comments on commit ca5a533

Please sign in to comment.