ALSA: hda - implement link_power ops for i915 display power control
This patch implements the bus link_power ops to request/release i915 display
power well. It can be used by the display codec which shares this power well
with GPU on Intel platforms.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index e0bb623..120854e 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -775,9 +775,20 @@
return azx_rirb_get_response(bus, addr, res);
}
+static int azx_link_power(struct hdac_bus *bus, bool enable)
+{
+ struct azx *chip = bus_to_azx(bus);
+
+ if (chip->ops->link_power)
+ return chip->ops->link_power(chip, enable);
+ else
+ return -EINVAL;
+}
+
static const struct hdac_bus_ops bus_core_ops = {
.command = azx_send_cmd,
.get_response = azx_get_response,
+ .link_power = azx_link_power,
};
#ifdef CONFIG_SND_HDA_DSP_LOADER