Skip to content

Commit

Permalink
panel: Chain in post-panel-on-command
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MarijnS95 committed Nov 19, 2023
1 parent 5c82e61 commit dee78f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def generate_commands(p: Panel, options: Options, cmd_name: str) -> str:
s += '\n'
block = '{' in c.generated

if cmd_name == 'on' and 'panel_power_on' in cmd.generated:
s += '/* FIXME: Call this in .enable() */\n'

s += c.generated + '\n'
if c.wait and c.wait > options.ignore_wait:
s += f'\t{msleep(c.wait)};\n'
Expand Down
4 changes: 4 additions & 0 deletions panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ def __init__(self, fdt: Fdt2, node: int, cmd: str) -> None:
if init:
itr = itertools.chain(init, itr)

on = fdt.getprop_or_none(node, 'qcom,mdss-dsi-post-panel-on-command')
if on:
itr = itertools.chain(itr, on)

on = fdt.getprop_or_none(node, 'lge,display-on-cmds')
if on:
itr = itertools.chain(itr, on)
Expand Down

0 comments on commit dee78f4

Please sign in to comment.