[V3] vga_switcheroo: set audio client id according to bound GPU id

Takashi Iwai tiwai at suse.de
Tue Jul 17 09:22:57 UTC 2018


On Tue, 17 Jul 2018 10:56:37 +0200,
jimqu wrote:
> 
> 
> 
> On 2018年07月17日 16:52, Takashi Iwai wrote:
> > On Tue, 17 Jul 2018 10:38:58 +0200,
> > Lukas Wunner wrote:
> >> On Tue, Jul 17, 2018 at 04:20:50PM +0800, Jim Qu wrote:
> >>> On modern laptop, there are more and more platforms
> >>> have two GPUs, and each of them maybe have audio codec
> >>> for HDMP/DP output. For some dGPU which is no output,
> >>> audio codec usually is disabled.
> >>>
> >>> In currect HDA audio driver, it will set all codec as
> >>> VGA_SWITCHEROO_DIS, the audio which is binded to UMA
> >>> will be suspended if user use debugfs to contorl power
> >>>
> >>> In HDA driver side, it is difficult to know which GPU
> >>> the audio has binded to. So set the bound gpu pci dev
> >>> to vga_switcheroo.
> >>>
> >>> if the audio client is not the third registration, audio
> >>> id will set in vga_switcheroo enable function. if the
> >>> audio client is the last registration when vga_switcheroo
> >>> _ready() get true, we should get audio client id from bound
> >>> GPU directly.
> >>>
> >>> Signed-off-by: Jim Qu <Jim.Qu at amd.com>
> >> Reviewed-by: Lukas Wunner <lukas at wunner.de>
> >>
> >> @Takashi, any preference which tree to merge this through?
> >> sound or drm-misc, either way would seem fine to me.  I think
> >> there's going to be one final drm-misc pull sent to Dave this
> >> week, after that it's 4.20.
> > Since it's basically an audio problem and I'd love to merge it for
> > 4.19, I'd prefer taking through sound git tree, unless anyone has
> > objection.
> 
> Thanks to Takashi and Lukas great help. Please kindly help merge the
> patch into suitable branch.

I pushed the fix to topic/vga_switcheroo branch of sound git tree now
so that 0day bot can check it.  I'll wait for a while and merge it
later to for-next branch if nothing happens.

The brach is (and will be) based on fresh 4.18-rc5 so that other trees
may merge it cleanly.


thanks,

Takashi


More information about the dri-devel mailing list