diff options
| author | Shigeaki Asai <y-asai.0816@docomonet.jp> | 2026-10-04 23:50:17 +0900 |
|---|---|---|
| committer | Neil Armstrong <neil.armstrong@linaro.org> | 2026-11-09 12:00:39 +0100 |
| commit | 0cb7f6d9e4b1d0a411b628ccf78695ad41c66570 (patch) | |
| tree | eac2313fb79158a0db0ce72d1ca01e7eb5ce42fd /tools/perf/scripts/python | |
| parent | 19e67d977d3d4d0c54f03906ef578578190db9e1 (diff) | |
drm/meson: encoder_dsi: load ENCL gamma table while ENCL is disabled
meson_encoder_dsi_atomic_enable() programmed the ENCL gamma LUT right
after meson_venc_mipi_dsi_mode_set(), i.e. while the ENCL timing
generator was already running (ENCL_VIDEO_EN=1). Writing the LUT
during active video stalls the hardware: L_GAMMA_CNTL_PORT
WR_RDY/ADR_RDY deassert and the ENCL line counter (ENCL_INFO_READ)
freezes, so every remaining write times out (~8s total at boot) and
the panel ends up with a corrupted gamma table (wrong colors).
Instrumented boots on the ODROID-GO Ultra (S922X) show:
failing: start: VIDEO_EN=1 INFO 0000001a->002d0000 GAMMA_CNTL=00000030
stall: INFO 002d0000->002d0000 GAMMA_CNTL=00000000
(VID_CLK_CNTL2 / VIID_CLK_CNTL / VIID_CLK_DIV unchanged,
i.e. the ENCL clock is still running)
fixed: start: VIDEO_EN=0 INFO 00000000->00000000 GAMMA_CNTL=00000030
no stall, no timeout
Whether it failed depended only on timing, which is why enabling
lock debugging (LOCKDEP etc.) appeared to "fix" it most of the time.
It happens regardless of the bootloader (mainline or Hardkernel vendor
U-Boot).
The function already writes ENCL_VIDEO_EN=0 right afterwards before
re-enabling the encoder, so simply move meson_encl_load_gamma() after
that write. This matches the order used by the vendor U-Boot's own LCD
driver, which never times out.
Tested on the ODROID-GO Ultra with mainline U-Boot: 5 cold boots +
3 warm reboots, no timeouts, correct colors, LOCKDEP disabled.
Fixes: 42dcf15f901c ("drm/meson: add DSI encoder")
Cc: stable@vger.kernel.org
Tested-by: John Williams <porschemad911@gmail.com>
Signed-off-by: Shigeaki Asai <y-asai.0816@docomonet.jp>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20261004-meson-gamma-v1-1-6347558e2bb3@docomonet.jp
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
