lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250617175910.1640546-1-superm1@kernel.org>
Date: Tue, 17 Jun 2025 12:59:04 -0500
From: Mario Limonciello <superm1@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Alex Deucher <alexander.deucher@....com>,
	Christian König <christian.koenig@....com>,
	David Airlie <airlied@...il.com>,
	Simona Vetter <simona@...ll.ch>,
	Lukas Wunner <lukas@...ner.de>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Woodhouse <dwmw2@...radead.org>,
	Lu Baolu <baolu.lu@...ux.intel.com>,
	Joerg Roedel <joro@...tes.org>,
	Will Deacon <will@...nel.org>,
	Robin Murphy <robin.murphy@....com>,
	Alex Williamson <alex.williamson@...hat.com>,
	Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>,
	dri-devel@...ts.freedesktop.org (open list:DRM DRIVERS),
	linux-kernel@...r.kernel.org (open list),
	iommu@...ts.linux.dev (open list:INTEL IOMMU (VT-d)),
	linux-pci@...r.kernel.org (open list:PCI SUBSYSTEM),
	kvm@...r.kernel.org (open list:VFIO DRIVER),
	linux-sound@...r.kernel.org (open list:SOUND),
	Daniel Dadap <ddadap@...dia.com>,
	Mario Limonciello <mario.limonciello@....com>
Subject: [PATCH v2 0/6] PCI/VGA: Look at all PCI display devices in VGA arbiter

From: Mario Limonciello <mario.limonciello@....com>

On a mobile system with an AMD integrated GPU + NVIDIA discrete GPU the
AMD GPU is not being selected by some desktop environments for any
rendering tasks. This is because the neither GPU is being treated as
"boot_vga" but that is what some environments use to select a GPU [1].

The VGA arbiter driver only looks at devices that report as PCI display
VGA class devices. Neither GPU on the system is a display VGA class
device:

c5:00.0 3D controller: NVIDIA Corporation Device 2db9 (rev a1)
c6:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 150e (rev d1)

This series introduces a new helper to find PCI display class devices
and adjusts various places in the kernel to use it.

It also adjust the VGA arbiter code to consider all these devices as
the VGA arbiter code does manage to select the correct device by looking
at which device is using the firmware framebuffer.

v1->v2:
 * Split helper to it's own patch
 * Add patches to use helper elsewhere in kernel
 * Simplify logic instead of making more passes

Mario Limonciello (6):
  PCI: Add helper for checking if a PCI device is a display controller
  vfio/pci: Use pci_is_display()
  vga_switcheroo: Use pci_is_display()
  iommu/vt-d: Use pci_is_display()
  ALSA: hda: Use pci_is_display()
  vgaarb: Look at all PCI display devices in VGA arbiter

 drivers/gpu/vga/vga_switcheroo.c |  2 +-
 drivers/iommu/intel/iommu.c      |  2 +-
 drivers/pci/pci-sysfs.c          |  2 +-
 drivers/pci/vgaarb.c             |  8 ++++----
 drivers/vfio/pci/vfio_pci_igd.c  |  3 +--
 include/linux/pci.h              | 15 +++++++++++++++
 sound/hda/hdac_i915.c            |  2 +-
 sound/pci/hda/hda_intel.c        |  4 ++--
 8 files changed, 26 insertions(+), 12 deletions(-)


base-commit: e04c78d86a9699d136910cfc0bdcf01087e3267e
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ