]> git.baikalelectronics.ru Git - kernel.git/commit
vgaarb: Use ACPI HID name to find integrated GPU
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Wed, 19 May 2021 13:57:23 +0000 (21:57 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 18:55:56 +0000 (14:55 -0400)
commit808a4ae5fa7dfba286a274e729e40522500c57fe
treea6e2ae697c8dc49a9f988ba7afb22b5ee8d4914b
parent3203e497eb769cdf3b2f835bdc92083fee2796a9
vgaarb: Use ACPI HID name to find integrated GPU

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
drivers/gpu/vga/vgaarb.c