From: Thomas Zimmermann <tzimmermann@suse.de>
To: deller@gmx.de, James.Bottomley@HansenPartnership.com, arnd@arndb.de
Cc: linux-parisc@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH v2 0/4] arch/parisc: Detect primary framebuffer from device
Date: Tue, 2 Jan 2024 10:52:32 +0100 [thread overview]
Message-ID: <20240102095604.7276-1-tzimmermann@suse.de> (raw)
On parisc, change detection of the primary framebuffer to test for
the Linux device instead of fbdev's fb_info in fb_is_primary_device().
Makes the test independent from fbdev.
This patchset is part of a larger effort to clean up the low-level
display handling. There are various functions that attempt to detect
the system's primary framebuffer device, such as in vgaarb, [1]
fbcon, [2] or fbmon. [3] This code should be unified in a single helper
that implements the test. The function fb_is_primary_device() already
does this, but requires fbdev on parisc. With the patchset applied, the
parisc implementation tests directly with the Linux device. No fbdev is
required.
Patch 1 adds the framebuffer's Linux device to the STI ROM structures,
which represents the graphics firmware. Patches 2 updates the stifb
driver to refer to the correct Linux device. The device is used in
patch 3 to change the test in fb_is_primary_device(). Patch 4 removes
the obsolete fb_info from the STI ROM structures.
A later patchset will update the interface of fb_is_primary_device() to
receive a Linux device instead of an instance of fb_info. This involves
several architectures, so it is better done in a separate patch.
[1] https://elixir.bootlin.com/linux/v6.6/source/drivers/pci/vgaarb.c#L557
[2] https://elixir.bootlin.com/linux/v6.6/source/drivers/video/fbdev/core/fbcon.c#L2943
[3] https://elixir.bootlin.com/linux/v6.6/source/drivers/video/fbdev/core/fbmon.c#L1503
v2:
* fix crash during driver initialization (Helge)
Thomas Zimmermann (4):
video/sticore: Store ROM device in STI struct
fbdev/stifb: Allocate fb_info instance with framebuffer_alloc()
arch/parisc: Detect primary video device from device instance
video/sticore: Remove info field from STI struct
arch/parisc/video/fbdev.c | 2 +-
drivers/video/fbdev/stifb.c | 111 ++++++++++++++++++------------------
drivers/video/sticore.c | 5 ++
include/video/sticore.h | 6 +-
4 files changed, 66 insertions(+), 58 deletions(-)
base-commit: 25232eb8a9ac7fa0dac7e846a4bf7fba2b6db39a
--
2.43.0
next reply other threads:[~2024-01-02 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 9:52 Thomas Zimmermann [this message]
2024-01-02 9:52 ` [PATCH v2 1/4] video/sticore: Store ROM device in STI struct Thomas Zimmermann
2024-01-02 9:52 ` [PATCH v2 2/4] fbdev/stifb: Allocate fb_info instance with framebuffer_alloc() Thomas Zimmermann
2024-01-02 9:52 ` [PATCH v2 3/4] arch/parisc: Detect primary video device from device instance Thomas Zimmermann
2024-01-02 9:52 ` [PATCH v2 4/4] video/sticore: Remove info field from STI struct Thomas Zimmermann
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=20240102095604.7276-1-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=arnd@arndb.de \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
/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).