From: Thomas Zimmermann <tzimmermann@suse.de>
To: javierm@redhat.com, pjones@redhat.com, deller@gmx.de, ardb@kernel.org
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 0/8] firmware/sysfb: Track parent device for screen_info
Date: Wed, 17 Jan 2024 13:39:04 +0100 [thread overview]
Message-ID: <20240117125527.23324-1-tzimmermann@suse.de> (raw)
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.
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 | 37 ++++++-
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 | 148 ++++++++++++++++++++++++++++
drivers/video/screen_info_pci.c | 142 ++++++++++++++++++++++++++
include/linux/screen_info.h | 126 +++++++++++++++++++++++
include/linux/sysfb.h | 3 +-
10 files changed, 472 insertions(+), 95 deletions(-)
create mode 100644 drivers/video/screen_info_generic.c
create mode 100644 drivers/video/screen_info_pci.c
--
2.43.0
next reply other threads:[~2024-01-17 12:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 12:39 Thomas Zimmermann [this message]
2024-01-17 12:39 ` [PATCH 1/8] video: Add helpers for decoding screen_info Thomas Zimmermann
2024-01-29 10:41 ` Javier Martinez Canillas
2024-01-30 13:12 ` Thomas Zimmermann
2024-01-17 12:39 ` [PATCH 2/8] video: Provide screen_info_get_pci_dev() to find screen_info's PCI device Thomas Zimmermann
2024-01-29 11:04 ` Javier Martinez Canillas
2024-01-30 10:12 ` Thomas Zimmermann
2024-01-30 10:23 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 3/8] firmware/sysfb: Set firmware-framebuffer parent device Thomas Zimmermann
2024-01-29 11:28 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 4/8] fbdev/efifb: Remove PM for " Thomas Zimmermann
2024-01-29 11:30 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 5/8] firmware/sysfb: Create firmware device only for enabled PCI devices Thomas Zimmermann
2024-01-29 11:36 ` Javier Martinez Canillas
2024-01-30 12:52 ` Thomas Zimmermann
2024-01-17 12:39 ` [PATCH 6/8] fbdev/efifb: Do not track parent device status Thomas Zimmermann
2024-01-29 11:38 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 7/8] firmware/sysfb: Update screen_info for relocated EFI framebuffers Thomas Zimmermann
2024-01-29 11:52 ` Javier Martinez Canillas
2024-01-29 12:03 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 8/8] fbdev/efifb: Remove framebuffer relocation tracking Thomas Zimmermann
2024-01-29 12:03 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240117125527.23324-1-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=ardb@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=pjones@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).