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

Support for 1bpp framebuffer #396

Open
machdyne opened this issue Jun 19, 2024 · 2 comments
Open

Support for 1bpp framebuffer #396

machdyne opened this issue Jun 19, 2024 · 2 comments

Comments

@machdyne
Copy link

I'm interested in getting a 1bpp black and white framebuffer working in order to improve video performance where color isn't needed.

My understanding is that this would require some changes to LiteX and simplefb in the Linux kernel:

https://stackoverflow.com/questions/67397306/monochromatic-1bpp-simple-framebuffer-simplefb-c-format-depth

Am I right in thinking that this could significantly speed up the text console and possibly X11 also? Does anyone else think this is a good idea?

@enjoy-digital
Copy link
Member

Hi @machdyne,

this could be interesting yes. We would first need to add 1bpp support to LiteX's framebuffer and test it. Then we could see to add Linux support and enable it for the project.

@machdyne
Copy link
Author

Thanks @enjoy-digital,

I was able to get this working, and the console appears to be drawing faster with 1bpp mono, but I wonder if it could be improved further.

https://github.com/machdyne/litex-linux/tree/litex-monochrome

I had to manually update the DTS file:

            framebuffer0: framebuffer@40c00000 {
                compatible = "simple-framebuffer";
                reg = <0x40c00000 0x9600>;
                width = <640>;
                height = <480>;
                stride = <80>;
                format = "mono1";
            };

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

No branches or pull requests

2 participants