[PATCH v6 3/9] vga_switcheroo: Use pci_is_display()
Mario Limonciello
superm1 at kernel.org
Fri Jun 27 04:31:02 UTC 2025
From: Mario Limonciello <mario.limonciello at amd.com>
The inline pci_is_display() helper does the same thing. Use it.
Reviewed-by: Daniel Dadap <ddadap at nvidia.com>
Reviewed-by: Simona Vetter <simona.vetter at ffwll.ch>
Suggested-by: Bjorn Helgaas <helgaas at kernel.org>
Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
drivers/gpu/vga/vga_switcheroo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index 18f2c92beff8e..68e45a26e85f7 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -437,7 +437,7 @@ find_active_client(struct list_head *head)
*/
bool vga_switcheroo_client_probe_defer(struct pci_dev *pdev)
{
- if ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
+ if (pci_is_display(pdev)) {
/*
* apple-gmux is needed on pre-retina MacBook Pro
* to probe the panel if pdev is the inactive GPU.
--
2.43.0
More information about the dri-devel
mailing list