Skip to content

firmware/sysfb: Track parent device for screen_info

Thomas Zimmermann dri-devel linux-fbdev 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 0 repliesNew
  2. v38 patches 0 repliesSuperseded
  3. v28 patches 17 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches13 repliesSuperseded

Changes in v4 from the cover letter

* fix sysfb.h header file

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8video: Add helpers for decoding screen_infodrivers/firmware/Kconfig drivers/video/Kconfig drivers/video/Makefile +2 more+254 -00 replies
2/8video: Provide screen_info_get_pci_dev() to find screen_info's PCI devicedrivers/video/Makefile drivers/video/screen_info_pci.c include/linux/screen_info.h+59 -00 replies
3/8firmware/sysfb: Set firmware-framebuffer parent devicedrivers/firmware/sysfb.c drivers/firmware/sysfb_simplefb.c include/linux/sysfb.h+28 -40 replies
4/8fbdev/efifb: Remove PM for parent devicedrivers/video/fbdev/efifb.c+3 -130 replies
5/8firmware/sysfb: Create firmware device only for enabled PCI devicesdrivers/firmware/sysfb.c+30 -20 replies
6/8fbdev/efifb: Do not track parent device statusdrivers/video/fbdev/efifb.c+1 -40 replies
7/8firmware/sysfb: Update screen_info for relocated EFI framebuffersdrivers/firmware/sysfb.c drivers/video/screen_info_pci.c include/linux/screen_info.h+106 -00 replies
8/8fbdev/efifb: Remove framebuffer relocation trackingdrivers/video/fbdev/efifb.c+1 -750 replies

Reviews trailers per patch

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

PatchJavier Martinez CanillasSui Jingfeng
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/8] firmware/sysfb: Track parent device for screen_info

Detect the firmware framebuffer's parent device from the global screen_info state and set up the framebuffer's device accordingly. Remove the equivalent functionality from efifb. Other drivers for firmware framebuffers, such as simpledrm or vesafb, now add these new features.

Patches 1 and 2 provide a set of helper functions to avoid parsing the screen_info values manually. Decoding screen_info is fragile and many drivers get it wrong. We should later adopt these helpers in existing drivers, such as efifb, vesafb, as well.

Patches 3 and 4 set the firmware framebuffer's parent device. There is code in efifb to do something similar for power management. That is now obsolete and being cleaned up. Setting the parent device makes Linux track the power management correctly.

Patches 5 and 6 track the parent device's enable state. We don't create framebuffer devices if the underlying hardware device has been disabled. Remove the functionality from efifb.

Patches 7 and 8 track the parent device's PCI BAR location. It can happen on aarch64 that the firmware framebuffer moves its location during the kernel's boot. We now fix up the screen_info state to point to the correct location. Again remove such functionality from efifb.

v4:
* fix sysfb.h header file
v3:
* filter PCI device list with pci_get_base_class() (Sui)
* fix error handling for screen_info_pci_dev() (Sui)
* fix build for CONFIG_SYSFB_SIMPLEFB=n (Sui)
* small cleanups
v2:
* small refactorings throughout the patchset

Thomas Zimmermann (8):
video: Add helpers for decoding screen_info
video: Provide screen_info_get_pci_dev() to find screen_info's PCI
device
firmware/sysfb: Set firmware-framebuffer parent device fbdev/efifb: Remove PM for parent device
firmware/sysfb: Create firmware device only for enabled PCI devices fbdev/efifb: Do not track parent device status firmware/sysfb: Update screen_info for relocated EFI framebuffers fbdev/efifb: Remove framebuffer relocation tracking

 drivers/firmware/Kconfig            |   1 +
 drivers/firmware/sysfb.c            |  51 +++++++++-
 drivers/firmware/sysfb_simplefb.c   |   5 +-
 drivers/video/Kconfig               |   4 +
 drivers/video/Makefile              |   4 +
 drivers/video/fbdev/efifb.c         |  97 +-----------------
 drivers/video/screen_info_generic.c | 146 ++++++++++++++++++++++++++++
 drivers/video/screen_info_pci.c     | 136 ++++++++++++++++++++++++++
 include/linux/screen_info.h         | 126 ++++++++++++++++++++++++
 include/linux/sysfb.h               |   6 +-
 10 files changed, 480 insertions(+), 96 deletions(-)
 create mode 100644 drivers/video/screen_info_generic.c
 create mode 100644 drivers/video/screen_info_pci.c
Signature · 1 line
2.43.0