From: Geert Uytterhoeven <geert@linux-m68k.org> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Javier Martinez Canillas <javierm@redhat.com>, Sam Ravnborg <sam@ravnborg.org>, Helge Deller <deller@gmx.de> Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org> Subject: [PATCH v2 00/10] drm: Add support for low-color frame buffer formats Date: Mon, 7 Mar 2022 21:52:35 +0100 [thread overview] Message-ID: <cover.1646683502.git.geert@linux-m68k.org> (raw) Hi all, A long outstanding issue with the DRM subsystem has been the lack of support for low-color displays, as used typically on older desktop systems, and on small embedded displays. This patch series adds support for color-indexed frame buffer formats with 2, 4, and 16 colors. It has been tested on ARAnyM using a work-in-progress Atari DRM driver supporting 2, 4, 16, and 256 colors, with text console operation, fbtest, and modetest. Overview: - Patch 1 introduces a helper, to be used by later patches in the series, - Patch 2 introduces a flag to indicate color-indexed formats, - Patches 3 and 4 correct calculations of bits per pixel for sub-byte pixel formats, - Patches 5 and 6 introduce the new C[124] formats, - Patch 7 fixes an untested code path, - Patch 8 documents the use of "red" for light-on-dark displays, - Patches 9 and 10 add more fourcc codes for light-on-dark and dark-on-light frame buffer formats, which may be useful for e.g. the ssd130x and repaper drivers. Changes compared to v1[1]: - Reshuffle patches, - New patch "[PATCH v2 02/10] drm/fourcc: Add drm_format_info.is_color_indexed flag", - Improve pixel descriptions, - Require depth to match bpp in drm_mode_legacy_fb_format(), - Set .is_color_indexed flag. - Use drm_format_info_bpp() helper instead of deprecated .depth field or format-dependent calculations, - Use new .is_color_indexed field instead of checking against a list of formats, - Add Acked-by, - Replace FIXME by TODO comment, - New patch "[PATCH v2 08/10] [RFC] drm/fourcc: Document that single-channel "red" can be any color", - Add rationale for adding new formats, - Add D[248] for completeness. Notes: - Using modetest with the C4 formats requires [2]. - Using modetest with the default XR24 format requires [3]. - As this was used on emulated hardware only, and I do not have Atari hardware, I do not have performance figures to compare with fbdev. I hope to do proper measuring with an Amiga DRM driver, eventually. Thanks for your comments! [1] "[PATCH 0/8] drm: Add support for low-color frame buffer formats" https://lore.kernel.org/r/20220215165226.2738568-1-geert@linux-m68k.org/ [2] "[PATCH libdrm 0/3] Add support for low-color frame buffer formats" https://lore.kernel.org/r/cover.1646683737.git.geert@linux-m68k.org [3] "[PATCH RFC libdrm 0/2] Big-endian fixes" https://lore.kernel.org/r/cover.1646684158.git.geert@linux-m68k.org Geert Uytterhoeven (10): drm/fourcc: Add drm_format_info_bpp() helper drm/fourcc: Add drm_format_info.is_color_indexed flag drm/client: Use actual bpp when allocating frame buffers drm/framebuffer: Use actual bpp for DRM_IOCTL_MODE_GETFB drm/fourcc: Add DRM_FORMAT_C[124] drm/fb-helper: Add support for DRM_FORMAT_C[124] [RFC] drm/gem-fb-helper: Use actual bpp for size calculations [RFC] drm/fourcc: Document that single-channel "red" can be any color [RFC] drm/fourcc: Add DRM_FORMAT_R[124] [RFC] drm/fourcc: Add DRM_FORMAT_D[1248] drivers/gpu/drm/drm_client.c | 4 +- drivers/gpu/drm/drm_fb_helper.c | 101 ++++++++++++++----- drivers/gpu/drm/drm_fourcc.c | 55 +++++++++- drivers/gpu/drm/drm_framebuffer.c | 2 +- drivers/gpu/drm/drm_gem_framebuffer_helper.c | 12 +-- include/drm/drm_fourcc.h | 4 + include/uapi/drm/drm_fourcc.h | 36 +++++-- 7 files changed, 169 insertions(+), 45 deletions(-) -- 2.25.1 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
WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Javier Martinez Canillas <javierm@redhat.com>, Sam Ravnborg <sam@ravnborg.org>, Helge Deller <deller@gmx.de> Cc: linux-fbdev@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>, linux-m68k@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 00/10] drm: Add support for low-color frame buffer formats Date: Mon, 7 Mar 2022 21:52:35 +0100 [thread overview] Message-ID: <cover.1646683502.git.geert@linux-m68k.org> (raw) Hi all, A long outstanding issue with the DRM subsystem has been the lack of support for low-color displays, as used typically on older desktop systems, and on small embedded displays. This patch series adds support for color-indexed frame buffer formats with 2, 4, and 16 colors. It has been tested on ARAnyM using a work-in-progress Atari DRM driver supporting 2, 4, 16, and 256 colors, with text console operation, fbtest, and modetest. Overview: - Patch 1 introduces a helper, to be used by later patches in the series, - Patch 2 introduces a flag to indicate color-indexed formats, - Patches 3 and 4 correct calculations of bits per pixel for sub-byte pixel formats, - Patches 5 and 6 introduce the new C[124] formats, - Patch 7 fixes an untested code path, - Patch 8 documents the use of "red" for light-on-dark displays, - Patches 9 and 10 add more fourcc codes for light-on-dark and dark-on-light frame buffer formats, which may be useful for e.g. the ssd130x and repaper drivers. Changes compared to v1[1]: - Reshuffle patches, - New patch "[PATCH v2 02/10] drm/fourcc: Add drm_format_info.is_color_indexed flag", - Improve pixel descriptions, - Require depth to match bpp in drm_mode_legacy_fb_format(), - Set .is_color_indexed flag. - Use drm_format_info_bpp() helper instead of deprecated .depth field or format-dependent calculations, - Use new .is_color_indexed field instead of checking against a list of formats, - Add Acked-by, - Replace FIXME by TODO comment, - New patch "[PATCH v2 08/10] [RFC] drm/fourcc: Document that single-channel "red" can be any color", - Add rationale for adding new formats, - Add D[248] for completeness. Notes: - Using modetest with the C4 formats requires [2]. - Using modetest with the default XR24 format requires [3]. - As this was used on emulated hardware only, and I do not have Atari hardware, I do not have performance figures to compare with fbdev. I hope to do proper measuring with an Amiga DRM driver, eventually. Thanks for your comments! [1] "[PATCH 0/8] drm: Add support for low-color frame buffer formats" https://lore.kernel.org/r/20220215165226.2738568-1-geert@linux-m68k.org/ [2] "[PATCH libdrm 0/3] Add support for low-color frame buffer formats" https://lore.kernel.org/r/cover.1646683737.git.geert@linux-m68k.org [3] "[PATCH RFC libdrm 0/2] Big-endian fixes" https://lore.kernel.org/r/cover.1646684158.git.geert@linux-m68k.org Geert Uytterhoeven (10): drm/fourcc: Add drm_format_info_bpp() helper drm/fourcc: Add drm_format_info.is_color_indexed flag drm/client: Use actual bpp when allocating frame buffers drm/framebuffer: Use actual bpp for DRM_IOCTL_MODE_GETFB drm/fourcc: Add DRM_FORMAT_C[124] drm/fb-helper: Add support for DRM_FORMAT_C[124] [RFC] drm/gem-fb-helper: Use actual bpp for size calculations [RFC] drm/fourcc: Document that single-channel "red" can be any color [RFC] drm/fourcc: Add DRM_FORMAT_R[124] [RFC] drm/fourcc: Add DRM_FORMAT_D[1248] drivers/gpu/drm/drm_client.c | 4 +- drivers/gpu/drm/drm_fb_helper.c | 101 ++++++++++++++----- drivers/gpu/drm/drm_fourcc.c | 55 +++++++++- drivers/gpu/drm/drm_framebuffer.c | 2 +- drivers/gpu/drm/drm_gem_framebuffer_helper.c | 12 +-- include/drm/drm_fourcc.h | 4 + include/uapi/drm/drm_fourcc.h | 36 +++++-- 7 files changed, 169 insertions(+), 45 deletions(-) -- 2.25.1 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 reply other threads:[~2022-03-07 20:53 UTC|newest] Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-07 20:52 Geert Uytterhoeven [this message] 2022-03-07 20:52 ` [PATCH v2 00/10] drm: Add support for low-color frame buffer formats Geert Uytterhoeven 2022-03-07 20:52 ` [PATCH v2 01/10] drm/fourcc: Add drm_format_info_bpp() helper Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-09 12:46 ` Javier Martinez Canillas 2022-03-09 12:46 ` Javier Martinez Canillas 2022-03-07 20:52 ` [PATCH v2 02/10] drm/fourcc: Add drm_format_info.is_color_indexed flag Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-09 12:50 ` Javier Martinez Canillas 2022-03-09 12:50 ` Javier Martinez Canillas 2022-03-07 20:52 ` [PATCH v2 03/10] drm/client: Use actual bpp when allocating frame buffers Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-09 12:51 ` Javier Martinez Canillas 2022-03-09 12:51 ` Javier Martinez Canillas 2022-03-07 20:52 ` [PATCH v2 04/10] drm/framebuffer: Use actual bpp for DRM_IOCTL_MODE_GETFB Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-09 12:53 ` Javier Martinez Canillas 2022-03-09 12:53 ` Javier Martinez Canillas 2022-03-07 20:52 ` [PATCH v2 05/10] drm/fourcc: Add DRM_FORMAT_C[124] Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-08 9:04 ` Pekka Paalanen 2022-03-08 9:04 ` Pekka Paalanen 2022-03-09 12:57 ` Javier Martinez Canillas 2022-03-09 12:57 ` Javier Martinez Canillas 2022-03-14 13:30 ` Geert Uytterhoeven 2022-03-14 13:30 ` Geert Uytterhoeven 2022-03-14 15:05 ` Pekka Paalanen 2022-03-14 15:05 ` Pekka Paalanen 2022-03-14 19:01 ` Geert Uytterhoeven 2022-03-14 19:01 ` Geert Uytterhoeven 2022-03-14 22:15 ` Finn Thain 2022-03-14 22:15 ` Finn Thain 2022-03-15 7:32 ` Pekka Paalanen 2022-03-15 7:32 ` Pekka Paalanen 2022-03-15 7:51 ` Geert Uytterhoeven 2022-03-15 7:51 ` Geert Uytterhoeven 2022-03-15 7:52 ` Geert Uytterhoeven 2022-03-15 7:52 ` Geert Uytterhoeven 2022-03-15 8:45 ` Pekka Paalanen 2022-03-15 8:45 ` Pekka Paalanen 2022-03-15 8:57 ` Geert Uytterhoeven 2022-03-15 8:57 ` Geert Uytterhoeven 2022-03-15 10:48 ` Pekka Paalanen 2022-03-15 10:48 ` Pekka Paalanen 2022-03-07 20:52 ` [PATCH v2 06/10] drm/fb-helper: Add support for DRM_FORMAT_C[124] Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-09 13:10 ` Javier Martinez Canillas 2022-03-09 13:10 ` Javier Martinez Canillas 2022-03-09 13:14 ` Geert Uytterhoeven 2022-03-09 13:14 ` Geert Uytterhoeven 2022-03-07 20:52 ` [PATCH v2 RFC 07/10] drm/gem-fb-helper: Use actual bpp for size calculations Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-09 13:16 ` Javier Martinez Canillas 2022-03-09 13:16 ` Javier Martinez Canillas 2022-03-07 20:52 ` [PATCH v2 RFC 08/10] drm/fourcc: Document that single-channel "red" can be any color Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-08 9:06 ` Pekka Paalanen 2022-03-08 9:06 ` Pekka Paalanen 2022-03-09 13:33 ` Javier Martinez Canillas 2022-03-09 13:33 ` Javier Martinez Canillas 2022-03-07 20:52 ` [PATCH v2 RFC 09/10] drm/fourcc: Add DRM_FORMAT_R[124] Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-09 13:39 ` Javier Martinez Canillas 2022-03-09 13:39 ` Javier Martinez Canillas 2022-03-07 20:52 ` [PATCH v2 RFC 10/10] drm/fourcc: Add DRM_FORMAT_D[1248] Geert Uytterhoeven 2022-03-07 20:52 ` Geert Uytterhoeven 2022-03-09 13:41 ` Javier Martinez Canillas 2022-03-09 13:41 ` 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=cover.1646683502.git.geert@linux-m68k.org \ --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=linux-kernel@vger.kernel.org \ --cc=linux-m68k@vger.kernel.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=mripard@kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.