diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-11-05 11:52:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:09:00 -0800 |
commit | fcd90d7dea56f968cc540ba5b500700449799be8 (patch) | |
tree | bf7cf26c78658d127fb621d3827a500131ea7af3 | |
parent | 34d9615249671e901522c43297e1ba2ca7b54899 (diff) | |
download | linux-stable-fcd90d7dea56f968cc540ba5b500700449799be8.tar.gz linux-stable-fcd90d7dea56f968cc540ba5b500700449799be8.tar.bz2 linux-stable-fcd90d7dea56f968cc540ba5b500700449799be8.zip |
vga_switcheroo: Fix missing gpu_bound call at audio client registration
commit fc09ab7a767394f9ecdad84ea6e85d68b83c8e21 upstream.
The commit 37a3a98ef601 ("ALSA: hda - Enable runtime PM only for
discrete GPU") added a new ops gpu_bound to be called when GPU gets
bound. The patch overlooked, however, that vga_switcheroo_enable() is
called only once at GPU is bound. When an audio client is registered
after that point, it would miss the gpu_bound call. This leads to the
unexpected lack of runtime PM in HD-audio side.
For addressing that regression, just call gpu_bound callback manually
at vga_switcheroo_register_audio_client() when the GPU was already
bound.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201615
Fixes: 37a3a98ef601 ("ALSA: hda - Enable runtime PM only for discrete GPU")
Cc: <stable@vger.kernel.org>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/gpu/vga/vga_switcheroo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index cf2a18571d48..a132c37d7334 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -380,6 +380,9 @@ int vga_switcheroo_register_audio_client(struct pci_dev *pdev, mutex_unlock(&vgasr_mutex); return -EINVAL; } + /* notify if GPU has been already bound */ + if (ops->gpu_bound) + ops->gpu_bound(pdev, id); } mutex_unlock(&vgasr_mutex); |