-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
RFC: Change/deprecation in display API #17508
Comments
The intention of the API is to only blank the display panel and not to control the power state of the display controller. To control the power states the power management API should be used, see comment on PR #7833 (comment) . Note that in the initial API proposal the function where called
The ssd16xx implementation is incorrect and should be swapped, the same issue occurred for the ssd1306 driver (#13609). I will raise an issue for this and fix it.
The dummy API was introduced to be able to run valgrind with the native posix target as the SDL implementation doesn't clean up its memory allocation as such the blanking API just returns "no error".
Can you clarify why it is not justified to use the power management framework?
I would have picked |
Mostly because if "display off" was acceptable there would be no obvious need for other power management infrastructure. The current API does not explain what "blanking" means, and the only use of the term I can find that is relevant to displays refers to the intervals when the electron flow is turned off during horizontal and vertical scanning in CRTs. I don't understand why it's being used here, other than it was required for approval (referencing #7833 (comment)). If the preferred understanding is that "blanking on" means the display shows nothing but can be immediately restored to its pre-blanking state through "blanking off" with no other operations, rather like screen save, that should be documented, along with the expected effect of blanking on any driver-controlled backlighting. But that functionality makes little sense for e-paper displays, so I'll make those operations Stepping back, I raised this issue because the display API does not describe behavior in sufficient detail for me to implement a driver for it, so I guessed (wrongly). Explaining what blanking is, documenting the required effect of other operations (such as writing new data) while blanking is on, and specifying the blanking state of a newly initialized driver, would go some ways towards fixing that gap. |
@pabigot thx for the info I will update the API documentation. |
Created PR #17521 to correct ssd16xx driver |
I propose that the display API functions named
display_blanking_{on,off}
be deprecated and replaced with these functions and clarified semantics:There are several motivations for this, the primary one being that the existing names are counter-intuitive:
display_blanking_on()
is implemented in three drivers as turning the display off (ili9340, sdl, ssd1306). In one it is implemented to turn the display on (ssd16xx).display_blanking_off()
is implemented in three drivers as turning the display on. In one it is implemented to turn the display off.A second is that some displays, particularly e-paper ones, should be powered down when not in use. The existing API does not address how that could be accomplished. Porting the whole power management API to display drivers is a bigger step that IMO is not yet justified, so the proposed documentation ties power control to display state.
The existing drivers are inconsistent whether the display is turned on or off by driver initialization. I am ambivalent on the desired behavior, but feel strongly that it must be specified. I'm leaning toward display is on (i.e. applications that care should turn it off or write to it ASAP), because that is the most convenient approach for e-paper displays and should be consistent with existing drivers except perhaps
sdl
which turns it off (sorta). Preferences?Please provide design feedback here. Based on that I will prepare a PR that updates the API to go along with the IL03xx e-paper driver I'm working on now.
The text was updated successfully, but these errors were encountered: