[PATCH 0/8] drm: Add support for low-color frame buffer formats

Geert Uytterhoeven posted 8 patches 4 years, 4 months ago
There is a newer version of this series
drivers/gpu/drm/drm_client.c                 |   4 +-
drivers/gpu/drm/drm_fb_helper.c              | 120 ++++++++++++++-----
drivers/gpu/drm/drm_fourcc.c                 |  45 +++++++
drivers/gpu/drm/drm_framebuffer.c            |   2 +-
drivers/gpu/drm/drm_gem_framebuffer_helper.c |  12 +-
include/drm/drm_fourcc.h                     |   1 +
include/uapi/drm/drm_fourcc.h                |  15 +++
7 files changed, 160 insertions(+), 39 deletions(-)
[PATCH 0/8] drm: Add support for low-color frame buffer formats
Posted by Geert Uytterhoeven 4 years, 4 months ago
	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 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, with text console operation and
fbtest.

Overview:
  - Patches 1 and 2 give a working system, albeit with a too large pitch
    (line length),
  - Patches 3 and 4 reduce memory consumption by correcting the pitch
    in case bpp < 8,
  - Patches 5 and 6 are untested, but may become useful with DRM
    userspace,
  - Patches 7 and 8 add more fourcc codes for grayscale and monochrome
    frame buffer formats, which may be useful for e.g. the ssd130x and
    repaper drivers.

Notes:
  - I haven't looked yet into making modetest draw a correct image.
  - 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!

Geert Uytterhoeven (8):
  drm/fourcc: Add DRM_FORMAT_C[124]
  drm/fb-helper: Add support for DRM_FORMAT_C[124]
  drm/fourcc: Add drm_format_info_bpp() helper
  drm/client: Use actual bpp when allocating frame buffers
  drm/framebuffer: Use actual bpp for DRM_IOCTL_MODE_GETFB
  drm/gem-fb-helper: Use actual bpp for size calculations
  drm/fourcc: Add DRM_FORMAT_R[124]
  drm/fourcc: Add DRM_FORMAT_D1

 drivers/gpu/drm/drm_client.c                 |   4 +-
 drivers/gpu/drm/drm_fb_helper.c              | 120 ++++++++++++++-----
 drivers/gpu/drm/drm_fourcc.c                 |  45 +++++++
 drivers/gpu/drm/drm_framebuffer.c            |   2 +-
 drivers/gpu/drm/drm_gem_framebuffer_helper.c |  12 +-
 include/drm/drm_fourcc.h                     |   1 +
 include/uapi/drm/drm_fourcc.h                |  15 +++
 7 files changed, 160 insertions(+), 39 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
Re: [PATCH 0/8] drm: Add support for low-color frame buffer formats
Posted by Sam Ravnborg 4 years, 4 months ago
Hi Geert,

On Tue, Feb 15, 2022 at 05:52:18PM +0100, Geert Uytterhoeven wrote:
> 	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 small embedded displays.

This is one of the pieces missing for a long time - great to see
something done here. Thanks Geert!

	Sam
Re: [PATCH 0/8] drm: Add support for low-color frame buffer formats
Posted by Thomas Zimmermann 4 years, 4 months ago

Am 17.02.22 um 21:37 schrieb Sam Ravnborg:
> Hi Geert,
> 
> On Tue, Feb 15, 2022 at 05:52:18PM +0100, Geert Uytterhoeven wrote:
>> 	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 small embedded displays.
> 
> This is one of the pieces missing for a long time - great to see
> something done here. Thanks Geert!

Absolutely! I'm looking forward to see these patches being merged.

Best regards
Thomas

> 
> 	Sam

-- 
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