dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm v2 04/10] util: Add missing big-endian RGB16 frame buffer formats
Date: Mon, 11 Jul 2022 15:17:05 +0300	[thread overview]
Message-ID: <YswUwWO8GZfBZhsj@intel.com> (raw)
In-Reply-To: <a89f148bf61bc20a7bb9c0e8ba030b0b770f9fe2.1657302103.git.geert@linux-m68k.org>

On Fri, Jul 08, 2022 at 08:21:43PM +0200, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> Any better suggestion than appending "be"?
> 
> v2:
>   - New.
> ---
>  tests/util/format.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/util/format.c b/tests/util/format.c
> index a5464de6fc1ac70f..42a652c9a402a654 100644
> --- a/tests/util/format.c
> +++ b/tests/util/format.c
> @@ -76,6 +76,9 @@ static const struct util_format_info format_info[] = {
>  	{ DRM_FORMAT_BGRX5551, "BX15", MAKE_RGB_INFO(5, 1, 5, 6, 5, 11, 0, 0) },
>  	{ DRM_FORMAT_RGB565, "RG16", MAKE_RGB_INFO(5, 11, 6, 5, 5, 0, 0, 0) },
>  	{ DRM_FORMAT_BGR565, "BG16", MAKE_RGB_INFO(5, 0, 6, 5, 5, 11, 0, 0) },
> +	/* Big-endian RGB16 */
> +	{ DRM_FORMAT_XRGB1555 | DRM_FORMAT_BIG_ENDIAN, "XR15be", MAKE_RGB_INFO(5, 10, 5, 5, 5, 0, 0, 0) },
> +	{ DRM_FORMAT_RGB565 | DRM_FORMAT_BIG_ENDIAN, "RG16be", MAKE_RGB_INFO(5, 11, 6, 5, 5, 0, 0, 0) },

How about just stripping the BE bit in util_format_info_find()
so we don't have to duplicate the entries in the table?

I guess util_format_fourcc() would end up being more a bit
complicated since you'd have to massage the string.

But I'm not sure why we even store the fourcc as a string in
the table anyway. Could just add some kind of string_to_fourcc()
thingy instead AFAICS.

>  	/* RGB24 */
>  	{ DRM_FORMAT_BGR888, "BG24", MAKE_RGB_INFO(8, 0, 8, 8, 8, 16, 0, 0) },
>  	{ DRM_FORMAT_RGB888, "RG24", MAKE_RGB_INFO(8, 16, 8, 8, 8, 0, 0, 0) },
> -- 
> 2.25.1

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2022-07-11 12:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 18:21 [PATCH libdrm v2 00/10] Big-endian fixes Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 01/10] intel: Improve checks for big-endian Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 02/10] util: Fix 32 bpp patterns on big-endian Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 03/10] util: Fix 16 " Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 04/10] util: Add missing big-endian RGB16 frame buffer formats Geert Uytterhoeven
2022-07-11 12:17   ` Ville Syrjälä [this message]
2022-07-11 12:34     ` Geert Uytterhoeven
2022-07-12 10:20       ` Michel Dänzer
2023-07-05 16:08       ` Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 05/10] modetest: Fix printing of big-endian fourcc values Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 06/10] modetest: Add support for parsing big-endian formats Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 07/10] util: Add test pattern support for big-endian XRGB1555/RGB565 Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 08/10] util: Fix pwetty on big-endian Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 09/10] util: Add pwetty support for big-endian RGB565 Geert Uytterhoeven
2022-07-08 18:21 ` [PATCH libdrm v2 10/10] modetest: Add support for big-endian XRGB1555/RGB565 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=YswUwWO8GZfBZhsj@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.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