Skip to content

Commit 19f4e84

Browse files
committed
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.
1 parent 5c82e61 commit 19f4e84

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

driver.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import simple
88
import wrap
99
from generator import Options, GpioFlag
10-
from panel import Panel, BacklightControl, CommandSequence, CompressionMode
10+
from panel import Panel, BacklightControl, CommandSequence, CompressionMode, Mode
1111

1212

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

143+
if cmd_name == 'on' and p.mode == Mode.CMD_MODE:
144+
s += '''
145+
ret = mipi_dsi_dcs_set_tear_on(ctx->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
146+
if (ret < 0) {
147+
dev_err(dev, "Failed to set tear on: %d\\n", ret);
148+
return ret;
149+
}
150+
'''
151+
143152
s += '''
144153
return 0;
145154
}

0 commit comments

Comments
 (0)