diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-05-05 16:54:33 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-05 16:54:33 +0200 |
commit | 59991da498122f779434c4e0beac8a69e0322938 (patch) | |
tree | 23e46bc7f355c6d65f3246f756cd8ef84cfc3030 /drivers/gpu/drm/radeon/radeon_device.c | |
parent | ALSA: fm801: introduce fm801_ac97_is_ready()/fm801_ac97_is_valid() helpers (diff) | |
parent | ALSA: hda - hdmi: Set converter channel count even without sink (diff) | |
download | linux-59991da498122f779434c4e0beac8a69e0322938.tar.xz linux-59991da498122f779434c4e0beac8a69e0322938.zip |
Merge branch 'for-linus' into for-next
... for applying the further HDMI fixes.
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 835516d2d257..511fe26198e4 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -102,11 +102,14 @@ static const char radeon_family_name[][16] = { "LAST", }; -#if defined(CONFIG_VGA_SWITCHEROO) -bool radeon_is_px(void); -#else -static inline bool radeon_is_px(void) { return false; } -#endif +bool radeon_is_px(struct drm_device *dev) +{ + struct radeon_device *rdev = dev->dev_private; + + if (rdev->flags & RADEON_IS_PX) + return true; + return false; +} /** * radeon_program_register_sequence - program an array of registers. @@ -1082,7 +1085,7 @@ static void radeon_switcheroo_set_state(struct pci_dev *pdev, enum vga_switchero { struct drm_device *dev = pci_get_drvdata(pdev); - if (radeon_is_px() && state == VGA_SWITCHEROO_OFF) + if (radeon_is_px(dev) && state == VGA_SWITCHEROO_OFF) return; if (state == VGA_SWITCHEROO_ON) { @@ -1301,9 +1304,7 @@ int radeon_device_init(struct radeon_device *rdev, * ignore it */ vga_client_register(rdev->pdev, rdev, NULL, radeon_vga_set_decode); - if (radeon_runtime_pm == 1) - runtime = true; - if ((radeon_runtime_pm == -1) && radeon_is_px()) + if (rdev->flags & RADEON_IS_PX) runtime = true; vga_switcheroo_register_client(rdev->pdev, &radeon_switcheroo_ops, runtime); if (runtime) |