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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e260136-009b-44cd-8fe8-85c34cd93ff8@kernel.org>
Date: Tue, 22 Jul 2025 09:45:28 -0500
From: Mario Limonciello <superm1@...nel.org>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: David Airlie <airlied@...il.com>, Bjorn Helgaas <bhelgaas@...gle.com>,
 Alex Deucher <alexander.deucher@....com>,
 Christian König <christian.koenig@....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>,
 "open list:DRM DRIVERS" <dri-devel@...ts.freedesktop.org>,
 open list <linux-kernel@...r.kernel.org>,
 "open list:INTEL IOMMU (VT-d)" <iommu@...ts.linux.dev>,
 "open list:PCI SUBSYSTEM" <linux-pci@...r.kernel.org>,
 "open list:VFIO DRIVER" <kvm@...r.kernel.org>,
 "open list:SOUND" <linux-sound@...r.kernel.org>,
 Daniel Dadap <ddadap@...dia.com>,
 Mario Limonciello <mario.limonciello@....com>
Subject: Re: [PATCH v9 8/9] fbcon: Use screen info to find primary device

On 7/22/25 9:38 AM, Bjorn Helgaas wrote:
> On Thu, Jul 17, 2025 at 12:38:11PM -0500, Mario Limonciello wrote:
>> From: Mario Limonciello <mario.limonciello@....com>
>>
>> On systems with non VGA GPUs fbcon can't find the primary GPU because
>> video_is_primary_device() only checks the VGA arbiter.
>>
>> Add a screen info check to video_is_primary_device() so that callers
>> can get accurate data on such systems.
> 
> This relies on screen_info, which I think is an x86 BIOS-ism.  Isn't
> there a UEFI console path?  How does that compare with this?  Is that
> relevant or is it something completely different?

When I created and tested this I actually did this on a UEFI system 
(which provides a UEFI GOP driver).
  >
>>   bool video_is_primary_device(struct device *dev)
>>   {
>> +#ifdef CONFIG_SCREEN_INFO
>> +	struct screen_info *si = &screen_info;
>> +#endif
>>   	struct pci_dev *pdev;
>>   
>>   	if (!dev_is_pci(dev))
>> @@ -34,7 +38,18 @@ bool video_is_primary_device(struct device *dev)
>>   
>>   	pdev = to_pci_dev(dev);
>>   
>> -	return (pdev == vga_default_device());
>> +	if (!pci_is_display(pdev))
>> +		return false;
>> +
>> +	if (pdev == vga_default_device())
>> +		return true;
>> +
>> +#ifdef CONFIG_SCREEN_INFO
>> +	if (pdev == screen_info_pci_dev(si))
>> +		return true;
>> +#endif
>> +
>> +	return false;
>>   }
>>   EXPORT_SYMBOL(video_is_primary_device);
>>   
>> -- 
>> 2.43.0
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ