diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 12:21:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 12:21:39 -0400 |
commit | aa9f56b66d278aba2f278c75761b7e19fbaca97a (patch) | |
tree | f1a9a0e68b07a3a1a0643389cb5ff838366a2d32 /drivers/gpu/drm/radeon/radeon_pm.c | |
parent | 58d4ea65b98f154f3326b038eecda32f90b46ea8 (diff) | |
parent | 31ce4bfdfd10bf5db9bf85c92bbe0cf2edbdcad8 (diff) |
Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (55 commits)
io-mapping: move asm include inside the config option
vgaarb: drop vga.h include
drm/radeon: Add probing of clocks from device-tree
drm/radeon: drop old and broken mesa warning
drm/radeon: Fix pci_map_page() error checking
drm: Remove count_lock for calling lastclose() after 58474713 (v2)
drm/radeon/kms: allow FG_ALPHA_VALUE on r5xx
drm/radeon/kms: another r6xx/r7xx CS checker fix
DRM: Replace kmalloc/memset combos with kzalloc
drm: expand gamma_set
drm/edid: Split mode lists out to their own header for readability
drm/edid: Rewrite mode parse to use the generic detailed block walk
drm/edid: Add detailed block walk for VTB extensions
drm/edid: Add detailed block walk for CEA extensions
drm: Remove unused fields from drm_display_info
drm: Use ENOENT consistently for the error return for an unmatched handle.
drm/radeon/kms: mark 3D power states as performance
drm: Only set DPMS once on the CRTC not after every encoder.
drm/radeon/kms: add additional quirk for Acer rv620 laptop
drm: Propagate error code from fb_create()
...
Fix up trivial conflicts in drivers/gpu/drm/drm_edid.c
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 95f8b3a3c43d..58038f5cab38 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -472,9 +472,9 @@ static const struct attribute_group hwmon_attrgroup = { | |||
472 | .attrs = hwmon_attributes, | 472 | .attrs = hwmon_attributes, |
473 | }; | 473 | }; |
474 | 474 | ||
475 | static void radeon_hwmon_init(struct radeon_device *rdev) | 475 | static int radeon_hwmon_init(struct radeon_device *rdev) |
476 | { | 476 | { |
477 | int err; | 477 | int err = 0; |
478 | 478 | ||
479 | rdev->pm.int_hwmon_dev = NULL; | 479 | rdev->pm.int_hwmon_dev = NULL; |
480 | 480 | ||
@@ -483,15 +483,26 @@ static void radeon_hwmon_init(struct radeon_device *rdev) | |||
483 | case THERMAL_TYPE_RV770: | 483 | case THERMAL_TYPE_RV770: |
484 | case THERMAL_TYPE_EVERGREEN: | 484 | case THERMAL_TYPE_EVERGREEN: |
485 | rdev->pm.int_hwmon_dev = hwmon_device_register(rdev->dev); | 485 | rdev->pm.int_hwmon_dev = hwmon_device_register(rdev->dev); |
486 | if (IS_ERR(rdev->pm.int_hwmon_dev)) { | ||
487 | err = PTR_ERR(rdev->pm.int_hwmon_dev); | ||
488 | dev_err(rdev->dev, | ||
489 | "Unable to register hwmon device: %d\n", err); | ||
490 | break; | ||
491 | } | ||
486 | dev_set_drvdata(rdev->pm.int_hwmon_dev, rdev->ddev); | 492 | dev_set_drvdata(rdev->pm.int_hwmon_dev, rdev->ddev); |
487 | err = sysfs_create_group(&rdev->pm.int_hwmon_dev->kobj, | 493 | err = sysfs_create_group(&rdev->pm.int_hwmon_dev->kobj, |
488 | &hwmon_attrgroup); | 494 | &hwmon_attrgroup); |
489 | if (err) | 495 | if (err) { |
490 | DRM_ERROR("Unable to create hwmon sysfs file: %d\n", err); | 496 | dev_err(rdev->dev, |
497 | "Unable to create hwmon sysfs file: %d\n", err); | ||
498 | hwmon_device_unregister(rdev->dev); | ||
499 | } | ||
491 | break; | 500 | break; |
492 | default: | 501 | default: |
493 | break; | 502 | break; |
494 | } | 503 | } |
504 | |||
505 | return err; | ||
495 | } | 506 | } |
496 | 507 | ||
497 | static void radeon_hwmon_fini(struct radeon_device *rdev) | 508 | static void radeon_hwmon_fini(struct radeon_device *rdev) |
@@ -540,6 +551,7 @@ void radeon_pm_resume(struct radeon_device *rdev) | |||
540 | int radeon_pm_init(struct radeon_device *rdev) | 551 | int radeon_pm_init(struct radeon_device *rdev) |
541 | { | 552 | { |
542 | int ret; | 553 | int ret; |
554 | |||
543 | /* default to profile method */ | 555 | /* default to profile method */ |
544 | rdev->pm.pm_method = PM_METHOD_PROFILE; | 556 | rdev->pm.pm_method = PM_METHOD_PROFILE; |
545 | rdev->pm.profile = PM_PROFILE_DEFAULT; | 557 | rdev->pm.profile = PM_PROFILE_DEFAULT; |
@@ -561,7 +573,9 @@ int radeon_pm_init(struct radeon_device *rdev) | |||
561 | } | 573 | } |
562 | 574 | ||
563 | /* set up the internal thermal sensor if applicable */ | 575 | /* set up the internal thermal sensor if applicable */ |
564 | radeon_hwmon_init(rdev); | 576 | ret = radeon_hwmon_init(rdev); |
577 | if (ret) | ||
578 | return ret; | ||
565 | if (rdev->pm.num_power_states > 1) { | 579 | if (rdev->pm.num_power_states > 1) { |
566 | /* where's the best place to put these? */ | 580 | /* where's the best place to put these? */ |
567 | ret = device_create_file(rdev->dev, &dev_attr_power_profile); | 581 | ret = device_create_file(rdev->dev, &dev_attr_power_profile); |