-
Notifications
You must be signed in to change notification settings - Fork 104
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
It8951 1bpp mode, A2 refresh #111
Conversation
Thanks for the big PR - I can't check it out right now but will certainly take a look when I have some time, sounds good. |
It's only really relevant for terminal mode right now. There's no flag for vnc to run in black and white, and images are static so they don't benefit from faster refresh. Both should be possible to implement, but require further work to run well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the big effort here, I read through it but can't actually test it right now, but I think we can merge it anyway for the potential performance improvements and get some feedback on that.
Regarding VNC and 1bpp, when testing things a long time ago (#32 (comment)) I think the necessary steps for that was just a couple of lines. I might even have the branch somewhere but it would be nice to have the faster mode available for VNC too.
Thanks @joukos, I'll take a look at VNC and images at some stage. I'll also need to see if I can improve the banding at all. Currently it results in a few pixels being unavailable, like a margin at the end of the panel, because 1bpp requires images to be of a certain size. (Currently set to multiples of 32, but might be able to tweak that). |
This PR adds support for 1bpp mode and A2 display refresh mode for the IT8951 driver.
It also adds 2bpp mode, but doesn't currently utilize it.
2 new flags have been added: --disable_a2 and --disable_1bpp
I went with --disable instead of --enable because they're on by default, so you'd only specify the flag if you wanted to disable them.
1bpp mode also has certain requirements around where the x and y coordinates land, and what size the image is. So the "band" method has been updated to accommodate boundaries other than the default of 8 for the x axis.
Anyway, 1bpp mode means that black and white images can be displayed with a much smaller SPI write. It uses 75% less bytes than the previous default (4bpp), so writes should be 4x as fast. This isn't noticeable for small writes (eg. single line changes), but it is noticeable for bigger writes (eg. full screen changes), especially on devices which can't write data over the pins as quickly.
A2 refresh mode is a faster update mode for 1bpp images.
Per https://www.waveshare.com/w/upload/c/c4/E-paper-mode-declaration.pdf
DU mode has a typical update time of 260ms.
A2 mode has a typical update time of 120ms.
*Note that it is currently disabled for the 6" panel because that particular panel has extra requirements for A2 mode (four-byte alignment) per comments in the code, and I don't have one of those panels to test with.