Skip to content

Adjust fbcon console device detection

Mario Limonciello (AMD) dri-devel linux-pci lkml regressions 10 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest4 patches 16 repliesIn review
  2. v99 patches 16 repliesSuperseded
  3. v89 patches 4 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v79 patches0 repliesSuperseded
v69 patches6 repliesSuperseded
v59 patches8 repliesSuperseded
v48 patches4 repliesSuperseded
v37 patches7 repliesSuperseded
v26 patches14 repliesSuperseded
v11 patch19 repliesSuperseded

Changes in v10 from the cover letter

* Add patches that didn't merge to v6.17-rc1 in
* Move sysfs file to drm ownership

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Fix access to video_is_primary_device() when compiled without CONFIG_VIDEOarch/parisc/include/asm/video.h arch/sparc/include/asm/video.h arch/x86/include/asm/video.h+5 -10 replies
2/4PCI/VGA: Replace vga_is_firmware_default() with a screen info checkdrivers/pci/vgaarb.c+5 -268 replies
3/4fbcon: Use screen info to find primary devicearch/x86/video/video-common.c+24 -15 replies
4/4DRM: Add a new 'boot_display' attributeDocumentation/ABI/testing/sysfs-class-drm drivers/gpu/drm/drm_sysfs.c+49 -01 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchThomas ZimmermannBjorn HelgaasManivannan Sadhasivam
1/4A-b
2/4R-b A-b
3/4R-b R-b
4/4R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v10 thread

Cover letter [PATCH v10 0/4] Adjust fbcon console device detection

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:

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.

---
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

Signature · 1 line
2.43.0