I successfully used simple frambuffer driver (https://github.com/torvalds/linux/blob/fcadab740480e0e0e9fa9bd272acd409884d431a/drivers/video/fbdev/simplefb.c) with 16bits per pixel encoding (r5g6b5) settings. Now, I would like to use a similar approach for a smaller monochromatic display using 1bit-per-pixel depth. According to the source code, the simple framebuffer doesn't seem to support this mode of operation. Is it possible to add this mode ("y1") into SIMPLEFB_FORMATS define (https://github.com/torvalds/linux/blob/fcadab740480e0e0e9fa9bd272acd409884d431a/include/linux/platform_data/simplefb.h) in the way proposed below? And then use this mode in devicetree?
#define SIMPLEFB_FORMATS \{ \
{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0}, DRM_FORMAT_RGB565 }, \
....
{ "y1", 1, {0, 1}, {0, 0}, {0, 0}, {0, 0}, DRM_FORMAT_MONO }, \
}
Is there any generic solution to this issue? I need to allocate a frame buffer on a given physical address with 1bit-per-pixel depth...
Thanks in advance, Mike
I implemented the 1bpp in simple framebuffer in tihs way:
The device tree record then looks in this way for 256x128 monochrome display: