From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: linux-fbdev@vger.kernel.org, airlied@linux.ie, deller@gmx.de,
linuxppc-dev@lists.ozlabs.org, mark.cave-ayland@ilande.co.uk,
javierm@redhat.com, dri-devel@lists.freedesktop.org,
paulus@samba.org, maxime@cerno.tech, daniel@ffwll.ch,
msuchanek@suse.de, sam@ravnborg.org
Subject: Re: [PATCH v3 1/4] drm/ofdrm: Add ofdrm for Open Firmware framebuffers
Date: Fri, 23 Sep 2022 09:14:24 +0200 [thread overview]
Message-ID: <CAMuHMdW1echz6wc6Y2cfjrkPa2vZW+X4s83rXo7VebJ0E+qaqg@mail.gmail.com> (raw)
In-Reply-To: <20220922113306.11251-2-tzimmermann@suse.de>
Hi Thomas,
On Thu, Sep 22, 2022 at 1:33 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Open Firmware provides basic display output via the 'display' node.
> DT platform code already provides a device that represents the node's
> framebuffer. Add a DRM driver for the device. The display mode and
> color format is pre-initialized by the system's firmware. Runtime
> modesetting via DRM is not possible. The display is useful during
> early boot stages or as error fallback.
>
> Similar functionality is already provided by fbdev's offb driver,
> which is insufficient for modern userspace. The old driver includes
> support for BootX device tree, which can be found on old 32-bit
> PowerPC Macintosh systems. If these are still in use, the
> functionality can be added to ofdrm or implemented in a new
> driver. As with simpledrm, the fbdev driver cannot be selected if
> ofdrm is already enabled.
Thanks for your patch!
> The driver has been tested on qemu's ppc64le emulation. The device
> hand-over has been tested with bochs.
Oh, tested on little-endian only ;-)
> --- /dev/null
> +++ b/drivers/gpu/drm/tiny/ofdrm.c
> +static const struct drm_format_info *display_get_validated_format(struct drm_device *dev,
> + u32 depth)
> +{
> + const struct drm_format_info *info;
> + u32 format;
> +
> + switch (depth) {
> + case 8:
> + format = drm_mode_legacy_fb_format(8, 8);
> + break;
> + case 15:
> + case 16:
> + format = drm_mode_legacy_fb_format(16, depth);
> + break;
> + case 32:
> + format = drm_mode_legacy_fb_format(32, 24);
Shouldn't all of these use drm_driver_legacy_fb_format() (and the
driver set drm_mode_config.quirk_addfb_prefer_host_byte_order) to have
a chance of working on traditional big-endian PPC?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2022-09-23 7:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 11:33 [PATCH v3 0/4] drm: Add driver for PowerPC OF displays Thomas Zimmermann
2022-09-22 11:33 ` [PATCH v3 1/4] drm/ofdrm: Add ofdrm for Open Firmware framebuffers Thomas Zimmermann
2022-09-23 7:14 ` Geert Uytterhoeven [this message]
2022-09-23 7:41 ` Thomas Zimmermann
2022-09-27 15:33 ` Thomas Zimmermann
2022-09-22 11:33 ` [PATCH v3 2/4] drm/ofdrm: Add CRTC state Thomas Zimmermann
2022-09-22 11:33 ` [PATCH v3 3/4] drm/ofdrm: Add per-model device function Thomas Zimmermann
2022-09-22 11:33 ` [PATCH v3 4/4] drm/ofdrm: Support color management Thomas Zimmermann
2022-09-23 7:18 ` Geert Uytterhoeven
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=CAMuHMdW1echz6wc6Y2cfjrkPa2vZW+X4s83rXo7VebJ0E+qaqg@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=maxime@cerno.tech \
--cc=msuchanek@suse.de \
--cc=paulus@samba.org \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
/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 NNTP newsgroup(s).