]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
vgaarb: Use ACPI HID name to find integrated GPU
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Fri, 21 May 2021 13:07:00 +0000 (15:07 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 28 May 2021 10:39:09 +0000 (12:39 +0200)
commitb12be6bf7ad04a0030b0f34ee9af5cf6f3cd6c81
tree3f8789c8472c0dc287cef91d49c08fa0b93f05cd
parent56a43c7f08015206293020e575098c42d7212bc1
vgaarb: Use ACPI HID name to find integrated GPU

BugLink: https://bugs.launchpad.net/bugs/1929217
Commit 3d42f1ddc47a ("vgaarb: Keep adding VGA device in queue") assumes
the first device is an integrated GPU. However, on AMD platforms an
integrated GPU can have higher PCI device number than a discrete GPU.

Integrated GPU on ACPI platform generally has _DOD and _DOS method, so
use that as predicate to find integrated GPU. If the new strategy
doesn't work, fallback to use the first device as boot VGA.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210519135723.525997-1-kai.heng.feng@canonical.com
(cherry picked from commit 808a4ae5fa7dfba286a274e729e40522500c57fe linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/gpu/vga/vgaarb.c