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

driver: Always call set_tear_on on CMD mode panels #37

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
driver: Always call set_tear_on on CMD mode panels
The downstream msm-4.9 driver is unconditinally calling
mdss_dsi_set_tear_on with command mode panels, replicate the same in the
driver generator.

When this doesn't get enabled then the panel doesn't generate any
Tearing Effect output signal which is used by MDSS.
z3ntu committed Oct 14, 2023
commit 19f4e8477a7a7af4421f456ef19d9436ccefde92
11 changes: 10 additions & 1 deletion driver.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
import simple
import wrap
from generator import Options, GpioFlag
from panel import Panel, BacklightControl, CommandSequence, CompressionMode
from panel import Panel, BacklightControl, CommandSequence, CompressionMode, Mode


def generate_includes(p: Panel, options: Options) -> str:
@@ -140,6 +140,15 @@ def generate_commands(p: Panel, options: Options, cmd_name: str) -> str:
if c.wait and c.wait > options.ignore_wait:
s += f'\t{msleep(c.wait)};\n'

if cmd_name == 'on' and p.mode == Mode.CMD_MODE:
s += '''
ret = mipi_dsi_dcs_set_tear_on(ctx->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
if (ret < 0) {
dev_err(dev, "Failed to set tear on: %d\\n", ret);
return ret;
}
'''

s += '''
return 0;
}