Skip to content

drm/vesadrm: Support 8-bit palettes

Thomas Zimmermann dri-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 2 repliesIn review
  2. v19 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- improve commenting (Javier)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9video: pixel_format: Add compare helpersinclude/video/pixel_format.h+58 -00 replies
2/9video: screen_info: Add pixel-format helper for linear framebuffersdrivers/video/screen_info_generic.c include/linux/screen_info.h+57 -00 replies
3/9drm/sysfb: Find screen_info format with helpersdrivers/gpu/drm/sysfb/drm_sysfb_screen_info.c+9 -120 replies
4/9drm/sysfb: Blit to CRTC destination formatdrivers/gpu/drm/sysfb/drm_sysfb_helper.h drivers/gpu/drm/sysfb/drm_sysfb_modeset.c+20 -112 replies
5/9drm/color-mgmt: Prepare for RGB332 palettesdrivers/gpu/drm/drm_color_mgmt.c include/drm/drm_color_mgmt.h+35 -00 replies
6/9drm/format-helper: Add XRGB8888-to-RGB332 to drm_fb_blit()drivers/gpu/drm/drm_format_helper.c+3 -00 replies
7/9drm/vesadrm: Rename vesadrm_set_gamma_lut() to vesadrm_set_color_lut()drivers/gpu/drm/sysfb/vesadrm.c+8 -80 replies
8/9drm/vesadrm: Prepare color management for palette-based framebuffersdrivers/gpu/drm/sysfb/vesadrm.c+15 -80 replies
9/9drm/vesadrm: Support DRM_FORMAT_C8drivers/gpu/drm/sysfb/vesadrm.c include/video/pixel_format.h+116 -10 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchJavier Martinez Canillas
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/9] drm/vesadrm: Support 8-bit palettes

VESA provides a wide range of 8-bit palette modes. Add support to vesadrm. For compatibility with common userspace the driver also provides XRGB8888 on top of the palettized output.

Patches 1 to 3 prepare screen_info and struct pixel_format for indexed formats. This cleans up the code for other sysfb drivers as well. The pixel-format compare functions will be helpful in various places.

Patches 4 to 6 prepare for using RGB332 as intermediate format between XRGB8888 and C8. This requires support for format conversion and RGB332 hardware palettes.

Patches 7 to 9 update vesadrm. Patches 7 and 8 prepare the driver without adding new functionality. Patch 9 adds support for the color formats C8 and XRGB888. It adjusts output color formats in the plane's atomic_check helper as needed. Palette setup happens in atomic_flush as usual.

Tested on VGA hardware. Besides supporting odd use cases, this feature can also help with testing support for low-end displays. Such displays often have similar limitations.

v2:
- improve commenting (Javier)

Thomas Zimmermann (9):
video: pixel_format: Add compare helpers
video: screen_info: Add pixel-format helper for linear framebuffers drm/sysfb: Find screen_info format with helpers
drm/sysfb: Blit to CRTC destination format
drm/color-mgmt: Prepare for RGB332 palettes drm/format-helper: Add XRGB8888-to-RGB332 to drm_fb_blit() drm/vesadrm: Rename vesadrm_set_gamma_lut() to vesadrm_set_color_lut() drm/vesadrm: Prepare color management for palette-based framebuffers drm/vesadrm: Support DRM_FORMAT_C8

 drivers/gpu/drm/drm_color_mgmt.c              |  34 ++++
 drivers/gpu/drm/drm_format_helper.c           |   3 +
 drivers/gpu/drm/sysfb/drm_sysfb_helper.h      |   2 +-
 drivers/gpu/drm/sysfb/drm_sysfb_modeset.c     |  29 ++--
 drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c |  21 ++-
 drivers/gpu/drm/sysfb/vesadrm.c               | 153 ++++++++++++++++--
 drivers/video/screen_info_generic.c           |  55 +++++++
 include/drm/drm_color_mgmt.h                  |   1 +
 include/linux/screen_info.h                   |   2 +
 include/video/pixel_format.h                  |  61 +++++++
 10 files changed, 321 insertions(+), 40 deletions(-)
Signature · 1 line
2.50.0