]> git.baikalelectronics.ru Git - kernel.git/commit
vga_switcheroo: Fix missing gpu_bound call at audio client registration
authorTakashi Iwai <tiwai@suse.de>
Mon, 5 Nov 2018 10:52:50 +0000 (11:52 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 5 Nov 2018 13:56:21 +0000 (14:56 +0100)
commit07450303e924eaadd4a1132748d0a8d478f7508b
tree528092c94abe1705aa9cf5b6e98f4f40249f9379
parentf630c74755763954e46ada22cb887770a3c4fdd4
vga_switcheroo: Fix missing gpu_bound call at audio client registration

The commit 1413fb09bc23 ("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: 1413fb09bc23 ("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>
drivers/gpu/vga/vga_switcheroo.c