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

panel: Chain in post-panel-on-command #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MarijnS95
Copy link
Contributor

@MarijnS95 MarijnS95 commented Aug 30, 2023

This is a perfect contender for the .prepare() -> .enable() split; on Sony panels the unblank command is typically in post-panel-on to make it happen after the panel is prepared, the bridge is on, and pixel data is flowing.

Without this pretty much all our panels are generated with a driver that never unblanks the panel.

@stephan-gh
Copy link
Member

Hm, but the way you added this here it's sent as part of the prepare() callback and not as part of enable(). Should we generate an enable() callback in the generator somehow to make it match the equivalent downstream behavior?

@MarijnS95
Copy link
Contributor Author

@stephan-gh with "for the .prepare() -> .enable() split" I meant the future possibility for doing so; I don't think that's really in the works yet though?

In part because we currently have prepare_prev_first which only applies to enable/prepare, but not to disable/prepare giving "unbalanced" functions.

@MarijnS95
Copy link
Contributor Author

@stephan-gh 👀

@stephan-gh
Copy link
Member

I think we should at least add a FIXME comment in the code that these are generally not meant to be chained to the prepare() sequence. It sounds more like they belong into .enable() (which we don't generate at all at the moment).

The qcom,mdss-dsi-post-on-backlight is probably even more difficult since the name suggests it should run after the backlight has been already enabled. Currently there is no easy way to do this on mainline because backlight_enable() runs even after ->enable() is called: https://elixir.bootlin.com/linux/v6.6-rc5/source/drivers/gpu/drm/drm_panel.c#L203

@MarijnS95
Copy link
Contributor Author

MarijnS95 commented Nov 19, 2023

@stephan-gh sure, I'm just not seeing how we could do that with the way the code is currently set up. Maybe add a self.comment to CommandSequence Command for this?

This is a perfect contended for the `.prepare()` -> `.enable()` split;
on Sony panels the unblank command is typically in `post-panel-on` to
make it happen after the panel is prepared, the bridge is on, and pixel
data is flowing.

Without this pretty much all our panels are generated with a driver that
never unblanks the panel.
@MarijnS95
Copy link
Contributor Author

Started hacking in something ugly that doesn't really work, above idea is still more likable since only the parser in panel.py knows where this sequence came from.

@stephan-gh
Copy link
Member

Hm, I wonder if we could parse that kind of stuff in a separate CommandSequence (next to on and off) and then just emit it immediately next to on in the driver generator for now.

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

Successfully merging this pull request may close these issues.

2 participants