Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBcmFrameBuffer can't set 32 bit color on RPI5 #511

Open
andreas-jonsson opened this issue Nov 22, 2024 · 7 comments
Open

CBcmFrameBuffer can't set 32 bit color on RPI5 #511

andreas-jonsson opened this issue Nov 22, 2024 · 7 comments

Comments

@andreas-jonsson
Copy link

Hi!

Using the CBcmFrameBuffer object and setting the color depth (and resolution?) to 32 bit on RPI5. It seems to quietly, without errors fall back to 16 bit.

Initialize do not return any error and the object reports back that bit depth is 32 bit when it clearly still is 16 bit.

I'm a bit new to Circle so I don't know if I'm missing something here? But the code works just as expected on RPI3&4 so I assume something is different with the RPI5?

I found this post. Not sure if it is relevant to this: raspberrypi/firmware#1904

@rsta2
Copy link
Owner

rsta2 commented Nov 22, 2024

The frame buffer support in the firmware of the RPi 5 is unfortunately not as comfortable as for earlier models. This is a problem, which is caused by a non-functioning property mailbox function in the RPi 5, which Circle uses to set the display depth. Unfortunately I don't know an other programmatic way to realize this. I guess it does not exist.

Could you please try the option framebuffer_width=32 in the file config.txt? I think I read somewhere, that it may work to set the depth. I have an other RPi model currently on my desk and cannot change this quickly, so I cannot test this by myself at the moment.

@andreas-jonsson
Copy link
Author

Thanks for the quick response. I'll have a look as soon as I have some spare time.

@rsta2
Copy link
Owner

rsta2 commented Nov 22, 2024

You are welcome. Sorry, I mean framebuffer_depth=32 of course, not the width. ;)

https://www.raspberrypi.com/documentation/computers/legacy_config_txt.html#framebuffer_depth

@rsta2
Copy link
Owner

rsta2 commented Nov 22, 2024

Unfortunately framebuffer_depth=32 does not work on the RPi 5. The display image is not clean. So there is currently no way to use this depth with Circle on the RPi 5. :(

@andreas-jonsson
Copy link
Author

I'm sorry. I have been pulled in to another project and I don't have a easy to test environment setup atm. But I will follow up on this.

May I suggest that setting bit depth to anything else then 16bit on RPI5 will result in an error while calling Initialize or at the very least the CBcmFrameBuffer object don't falsely report 32bit?

@rsta2
Copy link
Owner

rsta2 commented Nov 27, 2024

No problem.

Yes, I will implement this.

rsta2 added a commit that referenced this issue Nov 28, 2024
The Raspberry Pi 5 supports only depth 16 in the firmware.

Issue #511
@rsta2
Copy link
Owner

rsta2 commented Nov 28, 2024

Added a test for depth 16 on the develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants