aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-09-23 14:36:42 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-09-24 02:29:41 -0400
commit5c4abd09bdefb41d0c80055aa9d98433624ce1f0 (patch)
tree6f8bfe5461bca1d5ecbc54894f4fbdb6719c8fc3 /drivers/gpu/drm/nouveau
parent66146da06643d8ee89bc5255fb0254006e3d0e79 (diff)
drm/nouveau: Misc cleanup of the PM code.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_pm.c10
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_temp.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv04_pm.c1
3 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index 85a56dea0ef7..b1d3f4b26ebd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -227,8 +227,8 @@ nouveau_pm_set_perflvl(struct device *d, struct device_attribute *a,
227 return strlen(buf); 227 return strlen(buf);
228} 228}
229 229
230DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR, 230static DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR,
231 nouveau_pm_get_perflvl, nouveau_pm_set_perflvl); 231 nouveau_pm_get_perflvl, nouveau_pm_set_perflvl);
232 232
233static int 233static int
234nouveau_sysfs_init(struct drm_device *dev) 234nouveau_sysfs_init(struct drm_device *dev)
@@ -283,8 +283,6 @@ nouveau_sysfs_fini(struct drm_device *dev)
283 } 283 }
284} 284}
285 285
286
287
288static ssize_t 286static ssize_t
289nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf) 287nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf)
290{ 288{
@@ -317,7 +315,7 @@ nouveau_hwmon_set_max_temp(struct device *d, struct device_attribute *a,
317 struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; 315 struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
318 long value; 316 long value;
319 317
320 if (strict_strtoul(buf, 10, &value) == -EINVAL) 318 if (strict_strtol(buf, 10, &value) == -EINVAL)
321 return count; 319 return count;
322 320
323 temp->down_clock = value/1000; 321 temp->down_clock = value/1000;
@@ -352,7 +350,7 @@ nouveau_hwmon_set_critical_temp(struct device *d, struct device_attribute *a,
352 struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; 350 struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp;
353 long value; 351 long value;
354 352
355 if (strict_strtoul(buf, 10, &value) == -EINVAL) 353 if (strict_strtol(buf, 10, &value) == -EINVAL)
356 return count; 354 return count;
357 355
358 temp->critical = value/1000; 356 temp->critical = value/1000;
diff --git a/drivers/gpu/drm/nouveau/nouveau_temp.c b/drivers/gpu/drm/nouveau/nouveau_temp.c
index f9eda87d1773..16bbbf1eff63 100644
--- a/drivers/gpu/drm/nouveau/nouveau_temp.c
+++ b/drivers/gpu/drm/nouveau/nouveau_temp.c
@@ -27,7 +27,7 @@
27#include "nouveau_drv.h" 27#include "nouveau_drv.h"
28#include "nouveau_pm.h" 28#include "nouveau_pm.h"
29 29
30void 30static void
31nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp) 31nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp)
32{ 32{
33 struct drm_nouveau_private *dev_priv = dev->dev_private; 33 struct drm_nouveau_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/nouveau/nv04_pm.c b/drivers/gpu/drm/nouveau/nv04_pm.c
index 15e4b9029df8..61ca92744f93 100644
--- a/drivers/gpu/drm/nouveau/nv04_pm.c
+++ b/drivers/gpu/drm/nouveau/nv04_pm.c
@@ -25,6 +25,7 @@
25#include "drmP.h" 25#include "drmP.h"
26#include "nouveau_drv.h" 26#include "nouveau_drv.h"
27#include "nouveau_hw.h" 27#include "nouveau_hw.h"
28#include "nouveau_pm.h"
28 29
29struct nv04_pm_state { 30struct nv04_pm_state {
30 struct pll_lims pll; 31 struct pll_lims pll;