From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
airlied@linux.ie, daniel@ffwll.ch, deller@gmx.de,
maxime@cerno.tech, sam@ravnborg.org, msuchanek@suse.de,
mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org,
geert@linux-m68k.org, mark.cave-ayland@ilande.co.uk
Cc: linux-fbdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 5/5] drm/ofdrm: Support big-endian scanout buffers
Date: Tue, 11 Oct 2022 13:30:57 +0200 [thread overview]
Message-ID: <83071743-a7f2-f761-baa3-da688f26b5e3@suse.de> (raw)
In-Reply-To: <23333ff7-3ae1-494f-7abe-62da6698fd00@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1637 bytes --]
Hi
Am 11.10.22 um 09:46 schrieb Javier Martinez Canillas:
> Hello Thomas,
>
> On 9/28/22 12:50, Thomas Zimmermann wrote:
>> All DRM formats assume little-endian byte order. On big-endian systems,
>> it is likely that the scanout buffer is in big endian as well. Update
>
> You say it is likely, not always then? Does it depend on whether the Open
> Firmware is BE or LE ?
It's the endianess of the framebuffer. There's graphics hardware that
can switch between the two or even support both at the same time
(depending on the aperture range). I don't know the exact semantics when
each is being used, but I suspect that it corresponds to host endianess.
>
> [...]
>
>> +static bool display_get_big_endian_of(struct drm_device *dev, struct device_node *of_node)
>> +{
>> + bool big_endian;
>> +
>> +#ifdef __BIG_ENDIAN
>> + big_endian = true;
>> + if (of_get_property(of_node, "little-endian", NULL))
>> + big_endian = false;
>> +#else
>> + big_endian = false;
>> + if (of_get_property(of_node, "big-endian", NULL))
>> + big_endian = true;
>> +#endif
>> +
>> + return big_endian;
>> +}
>> +
>
> Ah, I see. The heuristic then is whether the build is BE or LE or if the Device
> Tree has an explicit node defining the endianess. The patch looks good to me:
Yes. I took this test from offb.
>
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
>
Thanks
Best regards
Thomas
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2022-10-11 11:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 10:50 [PATCH v4 0/5] drm: Add driver for PowerPC OF displays Thomas Zimmermann
2022-09-28 10:50 ` [PATCH v4 1/5] drm/ofdrm: Add ofdrm for Open Firmware framebuffers Thomas Zimmermann
2022-09-28 10:50 ` [PATCH v4 2/5] drm/ofdrm: Add CRTC state Thomas Zimmermann
2022-09-28 10:50 ` [PATCH v4 3/5] drm/ofdrm: Add per-model device function Thomas Zimmermann
2022-09-28 10:50 ` [PATCH v4 4/5] drm/ofdrm: Support color management Thomas Zimmermann
2022-09-28 10:50 ` [PATCH v4 5/5] drm/ofdrm: Support big-endian scanout buffers Thomas Zimmermann
2022-09-28 11:12 ` Michal Suchánek
2022-09-28 11:30 ` Thomas Zimmermann
2022-10-11 7:46 ` Javier Martinez Canillas
2022-10-11 11:30 ` Thomas Zimmermann [this message]
2022-10-11 20:06 ` Arnd Bergmann
2022-10-11 21:38 ` Michal Suchánek
2022-10-12 6:29 ` Arnd Bergmann
2022-10-12 7:23 ` Michal Suchánek
2022-10-12 6:46 ` Thomas Zimmermann
2022-10-12 7:17 ` Arnd Bergmann
2022-10-12 7:40 ` Thomas Zimmermann
2022-10-12 7:44 ` Arnd Bergmann
2022-10-12 8:27 ` Thomas Zimmermann
2022-10-12 8:38 ` Arnd Bergmann
2022-10-12 12:00 ` Thomas Zimmermann
2022-10-12 13:12 ` Arnd Bergmann
2022-10-12 14:27 ` Michal Suchánek
2022-10-13 7:39 ` Javier Martinez Canillas
2022-10-17 6:44 ` Benjamin Herrenschmidt
2022-10-12 14:31 ` Thomas Zimmermann
2022-10-12 14:59 ` Ville Syrjälä
2022-10-12 16:01 ` Michal Suchánek
2022-10-12 12:07 ` Michal Suchánek
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=83071743-a7f2-f761-baa3-da688f26b5e3@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=benh@kernel.crashing.org \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.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=mpe@ellerman.id.au \
--cc=msuchanek@suse.de \
--cc=paulus@samba.org \
--cc=sam@ravnborg.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 NNTP newsgroup(s).