Hi,
On Tue, Apr 08, 2025 at 03:57:22PM +0200, Thomas Zimmermann wrote:
HiStill no penguin (same error as above).
Am 08.04.25 um 15:20 schrieb Marcus Folkesson:
[...]
For testing purposes, you can add the _R formats to the switch case atI see.+static int st7571_set_pixel_format(struct st7571_device *st7571,These should be DRM_FORMAT_R1 and DRM_FORMAT_R2 and not C{1,2}. The former
+ u32 pixel_format)
+{
+ switch (pixel_format) {
+ case DRM_FORMAT_C1:
+ return st7571_set_color_mode(st7571, ST7571_COLOR_MODE_BLACKWHITE);
+ case DRM_FORMAT_C2:
+ return st7571_set_color_mode(st7571, ST7571_COLOR_MODE_GRAY);
+ default:
+ return -EINVAL;
+ }
is for displays have a single color (i.e: grey) while the latter is when a
pixel can have different color, whose values are defined by a CLUT table.
Does fbdev only works with CLUT formats? I get this error when I switch
to DRM_FORMAT_R{1,2}:
[drm] Initialized st7571 1.0.0 for 0-003f on minor 0
st7571 0-003f: [drm] format C1 little-endian (0x20203143) not supported
st7571 0-003f: [drm] No compatible format found
st7571 0-003f: [drm] *ERROR* fbdev: Failed to setup emulation (ret=-22)
https://elixir.bootlin.com/linux/v6.13.7/source/drivers/gpu/drm/drm_fb_helper.c#L1246
and see how it goes.
The problem is that drm_mode_legacy_fb_format(), which is called from
drm_fbdev_shmem_driver_fbdev_probe -> drm_driver_legacy_fb_format -> drm_mode_legacy_fb_format
Sets the pixel format DRM_FORMAT_C{1,2} when bpp is 1 or 2.
So I don't think it is possible to use the _R formats with fbdev.
But I'm not sure?
Best regardsBest regards,
Thomas
Marcus Folkesson