[alsa-devel] [PATCH] ALSA: hda - Enable runtime PM on AMD/ATI GPU only for discrete GPU

Takashi Iwai tiwai at suse.de
Thu Sep 13 08:09:19 CEST 2018


On Wed, 12 Sep 2018 11:48:33 +0200,
Takashi Iwai wrote:
> 
> The recent change of vga_switcheroo allowed the runtime PM for
> HD-audio on AMD GPU, but this also resulted in a regression.  When the
> HD-audio controller driver gets runtime-suspended, HD-audio link is
> turned off, and the hotplug notification is ignored.  This leads to
> the inconsistent audio state (the connection isn't notified and ELD is
> ignored).
> 
> The best fix would be to implement the proper ELD notification via the
> audio component, but it's still not ready.  As a quick workaround,
> this patch adds the check of runtime_idle and allows the runtime
> suspend only when the vga_switcheroo is bound with discrete GPU.
> That is, a system with a single GPU would be again without runtime PM
> (of the controller), as well as the APU that needs to keep the
> HD-audio link for the hotplug notification and ELD read out.
> 
> For identifying the audio client connection type, a new API is added
> to vga_switcheroo.  Other than that, the patch does a pretty simple
> job.
> 
> Note that this patch won't influence on the HD-audio *codec* runtime
> PM.  When a codec is unused and the system goes to S3/S4 and resumed,
> the codec won't be resumed immediately because it's unused.  This
> likely keeps the hotplug notification broken, but this is basically
> the expected behavior, a cost needed for the power-saving.  The
> hotplug state will be activated once when you access to the device (or
> triggering the power up via reading a codec#* proc file or such).
> 
> Again, this issue will be solved by the proper audio component
> notification, but it's still not ready.  Until then, user would need
> to disable the power-saving explicitly if the ELD hotplug notification
> is required.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200945
> Fixes: 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller")
> Signed-off-by: Takashi Iwai <tiwai at suse.de>

Scratch this one.  It still has a problem of the forced
codec->auto_runtime_pm flag.

The v2 patch (with a completely different implementation) seems
working better, according to Bugzilla report.  Will submit v2 patch.


thanks,

Takashi


More information about the Alsa-devel mailing list