Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A way to get a 16 bit framebuffer - RGB565

Featured Replies

Hi,

I realize that V3s is not H2 or H3, but I hope the question is generic.  Is it possible to make the FB 16 bit? In mainline Linux? I'm working with a Lichee Pi board. The depth is 18 bits but the fb in Linux is 32 bit. I'd love to get it down to 16 bits to save 1/2 of the video memory and just 2 color bits are a small price to pay. I understand that Linux inherits the FB from u-boot.

Edited by alexfreed58

7 hours ago, alexfreed58 said:

I understand that Linux inherits the FB from u-boot.

That may or may not be true. Linux has proper V3s display driver for a long time. However, U-Boot may still hand over its FB to Linux. In that case U-Boot FB is used for a very short time and it's replaced with Linux FB during boot. Now, I'm not sure if U-Boot FB memory is actually released or just stays reserved. Best way to check would be to disable display driver in U-Boot (via U-Boot config and rebuild) and compare free memory.

 

I don't know how to force 16-bit buffer. There is probably some kind of kernel parameter for that.

  • Author

I have built u-boot with different parameters in the .config file for several LCD panels: 800x480 and 800x600. That becomes the size of the reported uboot screen  and also the Linux kernel inherits the same size. But always 32 bit, even if I put the depth=16 rather than the standard depth=18 into the configuration.

My problem is not with the memory allocated internally for the FB: it's the application in the user space that needs many off the screen windows (pixel buffers, really) that have to match the ARGB FB format. 

 

Anybody?

 

Ah, you didn't add panel description to DT for Linux. So yes, Linux uses U-Boot FB. 32-bit colours are hardcoded in U-Boot here: https://source.denx.de/u-boot/u-boot/-/blob/master/drivers/video/sunxi/sunxi_de2.c#L255 Fortunately for you, I added handling 16-bit colours (if you change constant), but I can't guarantee it will work. I only tested it in U-Boot for H3 and not in Linux.

 

EDIT: Apparently you have to change also this line: https://source.denx.de/u-boot/u-boot/-/blob/master/drivers/video/sunxi/sunxi_de2.c#L405

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.