[PATCH 0/4] drm/panel: novatek-nt36536: mode additions and lifecycle fixes for CSOT PP8807HB1-1

From: Qianhui Xu

Date: Tue Dec 01 2026 - 04:15:47 EST


This series extends the in-tree novatek-nt36536 panel driver for the CSOT
PP8807HB1-1 panel used on the Lenovo TB322FC tablet (SM8750, dual DSI).

Patch 1 adds the 40Hz and 24Hz modes the panel supports in addition to the
six modes already listed; the totals are the datasheet values laid out the
same way as the existing entries.

Patches 2-4 are lifecycle fixes found while bringing the panel up:

- Attaching a DSI device can bind the DRM bridge and prepare the panel
right away, so both the backlight device and the DSI format/mode flags
of the secondary link have to be in place before the first attach.
Patch 2 resolves the backlight first and configures all DSI devices in
a separate loop.
- Patch 3 gives prepare() a single power_off exit, so a failure after
the init sequence does not leave the panel powered with a
half-programmed state, and checks dsi_ctx.accum_err after the batched
MIPI writes, since those helpers only record their error there.
- drm_panel_prepare() cannot report a failure to its caller, so the
enable part of the bridge chain still runs when prepare failed.
Patch 4 adds an enable() callback that refuses in that case instead
of marking the panel enabled and lighting the backlight on an
uninitialised panel.
This is a pattern I have not seen in other panel drivers; the two
alternatives I considered were dropping the panel from the chain on
failure (not possible from prepare()) and letting the first unprepare()
clean up (keeps a powered panel with a wrong state until then). I am
happy to rework patch 4 if the current shape is not wanted, the series
works without it.

The series is compiled and style-checked against v7.4-rc5 (fe6ff8d5d675c).
There is no binding or DTS change.

Changes since the 2026-10-13 internal version of this series (not posted
before):
- rebased from v7.3-rc7 onto v7.4-rc5; no source change was needed, the
touched hunks are identical in both trees (only line offsets moved);
- author/SoB spelling normalised to "Qianhui Xu" (same person, same
address) to match the rest of my submissions; the patch bodies are
otherwise unchanged;
- the panel mode data, the prepare()/enable() ordering and the error
handling are unchanged from that version, so the review questions
listed there (scope of patch 3, new pattern in patch 4) still apply.

*** AI-assistance disclosure ***
This patch was prepared with the help of an LLM coding assistant. The
author reviewed every line, checked every quoted claim against the tree,
and ran the gates quoted in the cover letter; the design decisions and
any errors are the author's.

Qianhui Xu (4):
drm/panel: novatek-nt36536: add 40Hz and 24Hz modes for CSOT
PP8807HB1-1
drm/panel: novatek-nt36536: finish setup before attaching DSI devices
drm/panel: novatek-nt36536: power off on any prepare failure
drm/panel: novatek-nt36536: reject enable when prepare failed

drivers/gpu/drm/panel/panel-novatek-nt36536.c | 74 +++++++++++++++----
1 file changed, 58 insertions(+), 16 deletions(-)

--
2.53.0