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] [day] [month] [year] [list]
Message-ID: <95c66d6c-a91e-4174-a556-9a9669d53c57@kernel.org>
Date: Thu, 4 Sep 2025 17:36:10 -0500
From: Mario Limonciello <superm1@...nel.org>
To: Maxime Ripard <mripard@...nel.org>,
 Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Alex Deucher <alexander.deucher@....com>,
 Christian König <christian.koenig@....com>
Cc: Simona Vetter <simona@...ll.ch>,
 "open list:DRM DRIVERS" <dri-devel@...ts.freedesktop.org>,
 open list <linux-kernel@...r.kernel.org>,
 "open list:PCI SUBSYSTEM" <linux-pci@...r.kernel.org>,
 Daniel Dadap <ddadap@...dia.com>, Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v10 0/4] Adjust fbcon console device detection

On 8/11/2025 11:26 AM, Mario Limonciello (AMD) wrote:
> Systems with more than one GPU userspace doesn't know which one to be
> used to treat as primary.  The concept of primary is important to be
> able to decide which GPU is used for display and  which is used for
> rendering.  If it's guessed wrong then both GPUs will be kept awake
> burning a lot of power.
> 
> Historically it would use the "boot_vga" attribute but this isn't
> present on modern GPUs.
> 
> This series started out as changes to VGA arbiter to try to handle a case
> of a system with 2 GPUs that are not VGA devices and avoid changes to
> userspace.  This was discussed but decided not to overload the VGA arbiter
> for non VGA devices.
> 
> Instead move the x86 specific detection of framebuffer resources into x86
> specific code that the fbcon can use to properly identify the primary
> device. This code is still called from the VGA arbiter, and the logic does
> not change there. To avoid regression default to VGA arbiter and only fall
> back to looking up with x86 specific detection method.
> 
> In order for userspace to also be able to discover which device was the
> primary video display device create a new sysfs file 'boot_display'.
> 
> A matching userspace implementation for this file is available here:
> Link: https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/merge_requests/39
> Link: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2038
> 
> Dave Airlie has been pinged for a comment on this approach.
> Dave had suggested in the past [1]:
> 
> "
>   But yes if that doesn't work, then maybe we need to make the boot_vga
>   flag mean boot_display_gpu, and fix it in the kernel
> "
> 
> This was one of the approached tried in earlier revisions and it was
> rejected in favor of creating a new sysfs file (which is what this
> version does).
> 
> As the dependendent symbols are in 6.17-rc1 this can merge through
> drm-misc-next.
> 
> Link: https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/merge_requests/37#note_2938602 [1]
> 
> ---
> v10:
>   * Add patches that didn't merge to v6.17-rc1 in
>   * Move sysfs file to drm ownership
> 
> Mario Limonciello (AMD) (4):
>    Fix access to video_is_primary_device() when compiled without
>      CONFIG_VIDEO
>    PCI/VGA: Replace vga_is_firmware_default() with a screen info check
>    fbcon: Use screen info to find primary device
>    DRM: Add a new 'boot_display' attribute
> 
>   Documentation/ABI/testing/sysfs-class-drm |  8 +++++
>   arch/parisc/include/asm/video.h           |  2 +-
>   arch/sparc/include/asm/video.h            |  2 ++
>   arch/x86/include/asm/video.h              |  2 ++
>   arch/x86/video/video-common.c             | 25 +++++++++++++-
>   drivers/gpu/drm/drm_sysfs.c               | 41 +++++++++++++++++++++++
>   drivers/pci/vgaarb.c                      | 31 +++--------------
>   7 files changed, 83 insertions(+), 28 deletions(-)
>   create mode 100644 Documentation/ABI/testing/sysfs-class-drm
> 
> 
> base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585

DRM maintainers, can I please get a review on patch 4 [0]?  This changes 
the ABI of DRM to offer a new file, so I would like to make sure that is 
amenable.  All other patches have reviews.

In the earlier versions of this series it was done by PCI, but there was 
a push to move to DRM.

[0] 
https://lore.kernel.org/dri-devel/20250811162606.587759-5-superm1@kernel.org/#t

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ