notro / tinydrm

Discontinued. Out of tree tinydrm modules
https://github.com/notro/tinydrm/wiki
99 stars 27 forks source link

18bit and 24bit #6

Closed rogueturnip closed 3 years ago

rogueturnip commented 6 years ago

Hi! I"m jumping this question over here from the fbtft issues.

I'm working on the ili9488 driver in SPI mode but it only works in 3bit or 18bit in this mode (parallel works in 16bit and 18bit). My attempts to stuff the 16bit up to 24bit in fbtft didn't work, it kept kernel dumping cause I assume it wont' support greater.

If I turn attention to doing this in tinydrm would I be able to run this at 18bit mode with little extra work? Basically does tinydrm support 18bit natively?

Thanks for all the work on the great wikis it's helped a lot in learning this!

notro commented 6 years ago

The only difference in this respect is that fbtft is more or less locked to RGB565 as source format, whereas tinydrm can support many source formats. In tinydrm you could use DRM_FORMAT_RGB888 directly for the 4-line SPI mode, but not the 3-line because it embeds the DC signal in the MSB bit of each byte. But I don't know how well RGB888 is supported in userspace. DRM_FORMAT_XRGB8888 however which is RGB888 stored in 4 bytes is probably the best choice since it's well supported. So you could just convert this to 18bpp and send it to the controller.

A tinydrm driver would probably resemble this driver that was just posted: https://lists.freedesktop.org/archives/dri-devel/2017-November/156993.html