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

T3T1: use internal framebuffer #3474

Merged
merged 6 commits into from
Feb 29, 2024
Merged

Conversation

TychoVrahe
Copy link
Contributor

@TychoVrahe TychoVrahe commented Dec 29, 2023

Implements framebuffer in internal RAM for T3T1, using ST7789V display driver.

Two framebuffers are used so that one can be used for drawing while the other is being transferred to display with DMA.

For maximum efficiency interrupts are used for starting the DMA transfers after tearing effect line signal.

Note: while this PR allows seamless switching of layouts without fading out-in, this is not changed in this PR and is considered out of scope here.

Builds on previous U5/T3T1 pull requests: #3370 #3422 #3466

This also fixes a bug in signing (bitcoin-like) tx flow, where after confirming the TX with hold to confirm, "loading transaction" loader is briefly shown and then fade-in/fade-out into "signing transaction" loader. This is specific to TT and HW only, because of originally missing display_refresh call in the progress init (TT does not need it to show the loader on display, while emulator and TS3 do)

The ST7789V driver is getting quite complex with all the variations, maybe it would be better to split the implementation to F4 without framebuffer and U5 with framebuffer, the U5 variant wouldn't need to carry all the model T compatibility ifdefs so it would be somewhat cleaner

@TychoVrahe TychoVrahe self-assigned this Dec 29, 2023
@TychoVrahe TychoVrahe added T3T1 core Trezor Core firmware. Runs on Trezor Model T and T2B1. labels Dec 29, 2023
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_framebuffer branch 2 times, most recently from 08173f1 to a5afc16 Compare January 2, 2024 23:10
@TychoVrahe TychoVrahe marked this pull request as ready for review January 2, 2024 23:14
@TychoVrahe TychoVrahe requested review from cepetr and removed request for prusnak January 2, 2024 23:14
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_hash2 branch from 977d437 to 897665e Compare January 4, 2024 11:16
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_framebuffer branch from a5afc16 to 81a07c5 Compare January 4, 2024 11:19
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_hash2 branch from 897665e to fdb7265 Compare January 5, 2024 13:26
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_framebuffer branch from cdbce7f to 765696a Compare January 5, 2024 13:27
@Hannsek Hannsek added the blocked Blocked by external force. Third party inputs required. label Jan 25, 2024
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_hash2 branch from fdb7265 to fcd60c5 Compare February 5, 2024 12:39
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_framebuffer branch from e632bf5 to de41967 Compare February 5, 2024 12:46
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_hash2 branch from fcd60c5 to b4723ac Compare February 5, 2024 13:52
Base automatically changed from tychovrahe/T3T1/hw_support_hash2 to tychovrahe/u5/basic_support February 5, 2024 14:47
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_framebuffer branch 2 times, most recently from 374bf84 to 7ea36af Compare February 5, 2024 15:45
@TychoVrahe TychoVrahe removed the blocked Blocked by external force. Third party inputs required. label Feb 28, 2024
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_framebuffer branch from 7ea36af to 140bb5b Compare February 28, 2024 14:29
Copy link
Contributor

@cepetr cepetr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks ok and functional. But as we discussed, this will be refactored as soon as we integrate the new drawing library.

@TychoVrahe TychoVrahe force-pushed the tychovrahe/u5/basic_support branch 2 times, most recently from 0c0ba61 to 355caba Compare February 29, 2024 16:01
Base automatically changed from tychovrahe/u5/basic_support to main February 29, 2024 22:05
@TychoVrahe TychoVrahe force-pushed the tychovrahe/T3T1/hw_support_framebuffer branch from 140bb5b to f881277 Compare February 29, 2024 22:09
@TychoVrahe TychoVrahe merged commit d69750f into main Feb 29, 2024
62 of 63 checks passed
@TychoVrahe TychoVrahe deleted the tychovrahe/T3T1/hw_support_framebuffer branch February 29, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Trezor Core firmware. Runs on Trezor Model T and T2B1. T3T1
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

3 participants