aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-05 13:17:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-05 13:17:26 -0400
commita09e9a7a4b907f2dfa9bdb2b98a1828ab4b340b2 (patch)
treec7a2df4e887573648eeaf8f7939889046990d3f6 /sound
parent9ab073bc45b8b523cc39658925bb44bef35ca657 (diff)
parent86a7e1224a68511d3a1ae0b7e11581b9d37723ae (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm tree changes from Dave Airlie: "This is the main drm pull request, I have some overlap with sound and arm-soc, the sound patch is acked and may conflict based on -next reports but should be a trivial fixup, which I'll leave to you! Highlights: - new drivers: MSM driver from Rob Clark - non-drm: switcheroo and hdmi audio driver support for secondary GPU poweroff, so drivers can use runtime PM to poweroff the GPUs. This can save 5 or 6W on some optimus laptops. - drm core: combined GEM and TTM VMA manager per-filp mmap permission tracking initial rendernode support (via a runtime enable for now, until we get api stable), remove old proc support, lots of cleanups of legacy code hdmi vendor infoframes and 4k modes lots of gem/prime locking and races fixes async pageflip scaffolding drm bridge objects - i915: Haswell PC8+ support and eLLC support, HDMI 4K support, initial per-process VMA pieces, watermark reworks, convert to generic hdmi infoframes, encoder reworking, fastboot support, - radeon: CIK PM support, remove 3d blit code in favour of DMA engines, Berlin GPU support, HDMI audio fixes - nouveau: secondary GPU power down support for optimus laptops, lots of fixes, use MSI, VP3 engine support - exynos: runtime pm support for g2d, DT support, remove non-DT, - tda998x i2c driver: lots of fixes for sync issues - gma500: lots of cleanups - rcar: add LVDS support, fbdev emulation, - tegra: just minor fixes" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (684 commits) drm/exynos: Fix build error with exynos_drm_connector.c drm/exynos: Remove non-DT support in exynos_drm_fimd drm/exynos: Remove non-DT support in exynos_hdmi drm/exynos: Remove non-DT support in exynos_drm_g2d drm/exynos: Remove non-DT support in exynos_hdmiphy drm/exynos: Remove non-DT support in exynos_ddc drm/exynos: Make Exynos DRM drivers depend on OF drm/exynos: Consider fallback option to allocation fail drm/exynos: fimd: move platform data parsing to separate function drm/exynos: fimd: get signal polarities from device tree drm/exynos: fimd: replace struct fb_videomode with videomode drm/exynos: check a pixel format to a particular window layer drm/exynos: fix fimd pixel format setting drm/exynos: Add NULL pointer check drm/exynos: Remove redundant error messages drm/exynos: Add missing of.h header include drm/exynos: Remove redundant NULL check in exynos_drm_buf drm/exynos: add device tree support for rotator drm/exynos: Add missing includes drm/exynos: add runtime pm interfaces to g2d driver ...
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_intel.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index c6c98298ac39..e54ebd530849 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -555,6 +555,9 @@ struct azx {
555#ifdef CONFIG_SND_HDA_DSP_LOADER 555#ifdef CONFIG_SND_HDA_DSP_LOADER
556 struct azx_dev saved_azx_dev; 556 struct azx_dev saved_azx_dev;
557#endif 557#endif
558
559 /* secondary power domain for hdmi audio under vga device */
560 struct dev_pm_domain hdmi_pm_domain;
558}; 561};
559 562
560#define CREATE_TRACE_POINTS 563#define CREATE_TRACE_POINTS
@@ -1397,8 +1400,9 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)
1397 int i, ok; 1400 int i, ok;
1398 1401
1399#ifdef CONFIG_PM_RUNTIME 1402#ifdef CONFIG_PM_RUNTIME
1400 if (chip->pci->dev.power.runtime_status != RPM_ACTIVE) 1403 if (chip->driver_caps & AZX_DCAPS_PM_RUNTIME)
1401 return IRQ_NONE; 1404 if (chip->pci->dev.power.runtime_status != RPM_ACTIVE)
1405 return IRQ_NONE;
1402#endif 1406#endif
1403 1407
1404 spin_lock(&chip->reg_lock); 1408 spin_lock(&chip->reg_lock);
@@ -1409,7 +1413,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)
1409 } 1413 }
1410 1414
1411 status = azx_readl(chip, INTSTS); 1415 status = azx_readl(chip, INTSTS);
1412 if (status == 0) { 1416 if (status == 0 || status == 0xffffffff) {
1413 spin_unlock(&chip->reg_lock); 1417 spin_unlock(&chip->reg_lock);
1414 return IRQ_NONE; 1418 return IRQ_NONE;
1415 } 1419 }
@@ -2971,6 +2975,12 @@ static int azx_runtime_suspend(struct device *dev)
2971 struct snd_card *card = dev_get_drvdata(dev); 2975 struct snd_card *card = dev_get_drvdata(dev);
2972 struct azx *chip = card->private_data; 2976 struct azx *chip = card->private_data;
2973 2977
2978 if (chip->disabled)
2979 return 0;
2980
2981 if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
2982 return 0;
2983
2974 /* enable controller wake up event */ 2984 /* enable controller wake up event */
2975 azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) | 2985 azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) |
2976 STATESTS_INT_MASK); 2986 STATESTS_INT_MASK);
@@ -2991,6 +3001,12 @@ static int azx_runtime_resume(struct device *dev)
2991 struct hda_codec *codec; 3001 struct hda_codec *codec;
2992 int status; 3002 int status;
2993 3003
3004 if (chip->disabled)
3005 return 0;
3006
3007 if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
3008 return 0;
3009
2994 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) 3010 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL)
2995 hda_display_power(true); 3011 hda_display_power(true);
2996 3012
@@ -3020,6 +3036,9 @@ static int azx_runtime_idle(struct device *dev)
3020 struct snd_card *card = dev_get_drvdata(dev); 3036 struct snd_card *card = dev_get_drvdata(dev);
3021 struct azx *chip = card->private_data; 3037 struct azx *chip = card->private_data;
3022 3038
3039 if (chip->disabled)
3040 return 0;
3041
3023 if (!power_save_controller || 3042 if (!power_save_controller ||
3024 !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) 3043 !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
3025 return -EBUSY; 3044 return -EBUSY;
@@ -3102,13 +3121,19 @@ static void azx_vs_set_state(struct pci_dev *pci,
3102 "%s: %s via VGA-switcheroo\n", pci_name(chip->pci), 3121 "%s: %s via VGA-switcheroo\n", pci_name(chip->pci),
3103 disabled ? "Disabling" : "Enabling"); 3122 disabled ? "Disabling" : "Enabling");
3104 if (disabled) { 3123 if (disabled) {
3124 pm_runtime_put_sync_suspend(&pci->dev);
3105 azx_suspend(&pci->dev); 3125 azx_suspend(&pci->dev);
3126 /* when we get suspended by vga switcheroo we end up in D3cold,
3127 * however we have no ACPI handle, so pci/acpi can't put us there,
3128 * put ourselves there */
3129 pci->current_state = PCI_D3cold;
3106 chip->disabled = true; 3130 chip->disabled = true;
3107 if (snd_hda_lock_devices(chip->bus)) 3131 if (snd_hda_lock_devices(chip->bus))
3108 snd_printk(KERN_WARNING SFX "%s: Cannot lock devices!\n", 3132 snd_printk(KERN_WARNING SFX "%s: Cannot lock devices!\n",
3109 pci_name(chip->pci)); 3133 pci_name(chip->pci));
3110 } else { 3134 } else {
3111 snd_hda_unlock_devices(chip->bus); 3135 snd_hda_unlock_devices(chip->bus);
3136 pm_runtime_get_noresume(&pci->dev);
3112 chip->disabled = false; 3137 chip->disabled = false;
3113 azx_resume(&pci->dev); 3138 azx_resume(&pci->dev);
3114 } 3139 }
@@ -3163,6 +3188,9 @@ static int register_vga_switcheroo(struct azx *chip)
3163 if (err < 0) 3188 if (err < 0)
3164 return err; 3189 return err;
3165 chip->vga_switcheroo_registered = 1; 3190 chip->vga_switcheroo_registered = 1;
3191
3192 /* register as an optimus hdmi audio power domain */
3193 vga_switcheroo_init_domain_pm_optimus_hdmi_audio(&chip->pci->dev, &chip->hdmi_pm_domain);
3166 return 0; 3194 return 0;
3167} 3195}
3168#else 3196#else
@@ -3913,7 +3941,7 @@ static int azx_probe_continue(struct azx *chip)
3913 power_down_all_codecs(chip); 3941 power_down_all_codecs(chip);
3914 azx_notifier_register(chip); 3942 azx_notifier_register(chip);
3915 azx_add_card_list(chip); 3943 azx_add_card_list(chip);
3916 if (chip->driver_caps & AZX_DCAPS_PM_RUNTIME) 3944 if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || chip->use_vga_switcheroo)
3917 pm_runtime_put_noidle(&pci->dev); 3945 pm_runtime_put_noidle(&pci->dev);
3918 3946
3919 return 0; 3947 return 0;