[PATCH] vgaswitchroo: set audio client id according to bound gpu client id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



indeed?I used 4.13 on the platform. let me have a try with the patch you mentioned

thinks
jimqu

?? Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Lukas Wunner <lukas@xxxxxxxxx>
Sent: Friday, June 29, 2018 5:21:38 PM
To: Qu, Jim
Cc: alsa-devel at alsa-project.org; dri-devel at lists.freedesktop.org; Deucher, Alexander; amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id

On Fri, Jun 29, 2018 at 08:55:40AM +0000, Qu, Jim wrote:
> When our dGPU does suspend by runtime pm. amdgpu driver for dgpu will
> also call vgaswtichroo to power off its audio. vgaswitchroo driver will
> find audio codec by vgaswitchroo dgpu client id(VGA_SWITCHEROO_DIS).

That is no longer the case since v4.17.  The HDA controller now runtime
suspends autonomously, see commit 07f4f97d7b4b ("vga_switcheroo: Use
device link for HDA controller").

Your patch appears to be geared towards an older kernel version.
Please retest on the laptop in question with a v4.17+ kernel.


> I think the issue should be observed on both Intel+AMD or AMD+AMD
> platform which has the same HW configuration.
>
> 1.if dGPU has no audio codec. the issue should be always observed.
> 2.if both iGPU and dGPU has audio codecs, the issue should be random,
> it depends on the first audio found by vgaswitchroo driver is on iGPU
> or dGPU.

On discrete AMD and Nvidia GPUs, the HDA controller is function 1 and
the GPU is function 0 in the same PCI slot.

On Intel chipsets, the HDA controller and the GPU have completely
different PCI device numbers, e.g. the GPU might be 0000:00:02.0 and
the HDA controller might be 0000:00:1b.0.

get_bound_vga() checks that the HDA controller is function 1 and there's
a GPU in function 0 of the same slot.

Thus get_bound_vga() always returns NULL for an Intel HDA controller and
the controller is never registered with vga_switcheroo (which is fine).

Thanks,

Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180629/ae93a460/attachment-0001.html>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux