summaryrefslogtreecommitdiff
path: root/sound/hda
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-03-26 06:15:27 +1000
committerDave Airlie <airlied@redhat.com>2019-03-26 06:15:27 +1000
commitf144e67b0e683cbb2c476b20a93e27aa1cd9d458 (patch)
tree3d83219f702d6b2ad39e993ab2b84e2ff4086498 /sound/hda
parent0bec6219e5a0cf2dd17716949a7592807e10f3d7 (diff)
parent1284ec985572232ace4817476baeb2d82b60be7a (diff)
Merge tag 'drm-intel-next-2019-03-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
UAPI Changes: - Report an error early instead of SIGBUS later when mmap beyond BO size Core Changes: - This includes backmerge of drm-next and two merges of Maarten's topic/hdr-formats Driver Changes: - Add Comet Lake (Gen9) PCI IDs to Coffee Lake ID list (Anusha) - Add missing ICL PCI ID (Jose) - Fix legacy gamma mode for ICL (Ville) - Assume eDP is present on port A when there is no VBT (Thomas) - Corrections to eDP training patterns (Jose) - Fix PSR2 selective update corruption after PSR1 setup (Jose) - Fix CRC mismatch error for DP link layer compliance (Aditya) - Fix CNL DPLL readout and clean up code (Ville) - Turn off the CUS when turning off a HDR plane (Ville) - Avoid a race with execlist tasklet during race (Chris) - Add missing CSC readout and clean up code (Ville) - Avoid unnecessary wakeref during debugfs/drop_caches/set (Chris, Caz) - Hold references to ring/HW context/context explicitly when used (Chris) - Assume next platforms inherit old platform (Rodrigo) - Use HWS indices rather than addresses for breadcrumbs (Chris) - Add REG_BIT/REG_GENMASK and REG_FIELD_PREP macros (Jani) - Convert crept in C99 types to kernel fixed size types (Jani) - Avoid passing full dev_priv in forcewake functions (Daniele) - Reset GuC on GPU reset (Sujaritha) - Rework MG and Combo PLLs to vfuncs (Lucas) - Explicitly track ppGTT size (Chris, Bob) - Coding style improvements and code modularization (Ville) - Selftest and debugging improvements (Chris) Signed-off-by: Dave Airlie <airlied@redhat.com> # Conflicts: # drivers/gpu/drm/i915/intel_hdmi.c From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190325124925.GA12726@jlahtine-desk.ger.corp.intel.com
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/hdac_component.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c
index 5c95933e739a..13915fdc6a54 100644
--- a/sound/hda/hdac_component.c
+++ b/sound/hda/hdac_component.c
@@ -79,17 +79,23 @@ void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
if (bus->display_power_status) {
if (!bus->display_power_active) {
+ unsigned long cookie = -1;
+
if (acomp->ops->get_power)
- acomp->ops->get_power(acomp->dev);
+ cookie = acomp->ops->get_power(acomp->dev);
+
snd_hdac_set_codec_wakeup(bus, true);
snd_hdac_set_codec_wakeup(bus, false);
- bus->display_power_active = true;
+ bus->display_power_active = cookie;
}
} else {
if (bus->display_power_active) {
+ unsigned long cookie = bus->display_power_active;
+
if (acomp->ops->put_power)
- acomp->ops->put_power(acomp->dev);
- bus->display_power_active = false;
+ acomp->ops->put_power(acomp->dev, cookie);
+
+ bus->display_power_active = 0;
}
}
}
@@ -325,9 +331,9 @@ int snd_hdac_acomp_exit(struct hdac_bus *bus)
return 0;
if (WARN_ON(bus->display_power_active) && acomp->ops)
- acomp->ops->put_power(acomp->dev);
+ acomp->ops->put_power(acomp->dev, bus->display_power_active);
- bus->display_power_active = false;
+ bus->display_power_active = 0;
bus->display_power_status = 0;
component_master_del(dev, &hdac_component_master_ops);