All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] drm/bridge: trilinear: add the Sky1 DisplayPort transmitter
@ 2026-11-25  3:32 Luo Liu
  2026-11-25  3:32 ` [PATCH v4 1/5] dt-bindings: display: add CIX " Luo Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Luo Liu @ 2026-11-25  3:32 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, tzimmermann, andrzej.hajda,
	neil.armstrong, rfoss, robh, krzk+dt, conor+dt
  Cc: dri-devel, devicetree, laurent.pinchart, jonas, jernej.skrabec,
	luca.ceresoli, wuyi.shen, cix-kernel-upstream

Add the Trilinear DisplayPort transmitter as a DRM bridge, with the CIX
Sky1 platform glue behind a platform data structure.

The hardware layer, the DRM bridge and the core state machine live in
drivers/gpu/drm/bridge/trilinear/, so other SoCs using the same
transmitter can share them; the platform registers its own dptx_plat_data
through include/drm/bridge/trilinear_dp.h. The transmitter drives up to
four lanes at HBR3 and has two SST sources. MST is not implemented and
stays disabled.

The USB-C transmitters and the native DP/eDP transmitter use different
RCSU video-adapter register offsets and bit layouts, so the binding has
one compatible for each. The Sky1 devicetree nodes are not included in
this posting.

Scope: DPTX hardware, bridge and bindings only. Komeda (the Sky1 display
controller that feeds these bridges) and the board DTS are separate
series. Nothing in this posting wires a full display stack.

Tested on a Radxa Orion O6 board; the USB-C DisplayPort output works
with the connector created by drm_bridge_connector_init().

Connector handling in this driver:

  The bridge is meant to be attached with DRM_BRIDGE_ATTACH_NO_CONNECTOR
  and drm_bridge_connector_init() creates the connector from the bridge
  operations. The driver implements the bridge side only and never
  registers a connector of its own.

Changes in v4:
- Address the issues reported in the sashiko review of v3, most serious
  first:
  - dptx_detect() clears DPTX_STATE_CONNECTED when HPD is deasserted,
    and the hotplug worker updates dp->status in the same locked section
    as the state change, so an early userspace detect can neither keep
    stale sink capabilities nor suppress the hotplug notification.
  - dptx_pm_prepare() re-asserts DPTX_STATE_SUSPENDED and disables the
    interrupt again after cancelling the hotplug works, and dptx_detect()
    returns -EBUSY while suspended, so a concurrent detect or atomic
    enable cannot power the host back up during suspend.
  - dptx_irq_off() now requires dp->lock and is called with it held from
    dptx_pm_prepare() and dptx_deinit(), removing the unlocked
    dp->irq_suspended updates.
  - dptx_replay_deferred_hotplug() calls sink_present() under dp->lock
    and rechecks the pending state, so it cannot issue AUX transfers
    while dptx_host_deinit() gates the APB clock.
  - dptx_bridge_get_modes(), dptx_bridge_mode_valid() and
    dptx_bridge_atomic_check() read the link capabilities under
    dp->lock, so they cannot observe a half-refreshed DPCD capability
    set.
  - dptx_wait_phy_dp_mode() aborts on suspend, detach or HPD
    deassertion instead of polling for ten seconds, the hotplug worker
    skips detection when the PHY never entered DP mode, and it rechecks
    dptx_hpd_work_aborted() after detection before notifying, so no
    hotplug event is reported while suspended or detached.
  - dptx_get_irq() rejects the 0 returned by of_irq_get() when the
    interrupt cannot be mapped.
  - Mode validation matches what dptx_bridge_atomic_check() selects:
    dptx_bridge_mode_valid() accounts for the 4:2:0/4:2:2 minimum bpp
    and the adjusted clock, dptx_cal_bpc() rejects YCbCr below 8 bpc,
    and dptx_adjust_mode() clears both sync polarity flags.
  - The hardware layer writes DPTX_ENHANCED_FRAMING_ENABLE with the
    negotiated value and clears the cause bits that are masked in
    DPTX_INTERRUPT_MASK before testing them.
  - dptx_hpd_notify() keeps the reported state while suspended,
    dp->hpd_event_work is always queued on system_freezable_wq, and the
    bridge power management no longer toggles output polling for the
    whole DRM device.

Changes in v3:
- Move the driver out of drivers/gpu/drm/cix/dptx/ into the shared
  drivers/gpu/drm/bridge/trilinear/ bridge, leaving only the Sky1
  platform data under drivers/gpu/drm/cix/dptx/.
- Split the driver into the hardware layer, the DRM bridge, and the core
  state machine with the build glue.
- Switch to the connector-less bridge model: the bridge refuses an attach
  without DRM_BRIDGE_ATTACH_NO_CONNECTOR, and the connector is created by
  drm_bridge_connector_init() instead of by the driver from .attach().

Luo Liu (5):
  dt-bindings: display: add CIX Sky1 DisplayPort transmitter
  drm/bridge: trilinear: add the DPTX hardware layer
  drm/bridge: trilinear: add the DPTX DRM bridge
  drm/bridge: trilinear: add the DPTX core and build glue
  drm/cix: add the Sky1 DisplayPort platform glue

 .../bindings/display/cix,sky1-dp.yaml         |  102 ++
 MAINTAINERS                                   |   12 +
 drivers/gpu/drm/Kconfig                       |    1 +
 drivers/gpu/drm/Makefile                      |    1 +
 drivers/gpu/drm/bridge/Kconfig                |    2 +
 drivers/gpu/drm/bridge/Makefile               |    1 +
 drivers/gpu/drm/bridge/trilinear/Kconfig      |    9 +
 drivers/gpu/drm/bridge/trilinear/Makefile     |    4 +
 drivers/gpu/drm/bridge/trilinear/dptx.h       |  106 ++
 drivers/gpu/drm/bridge/trilinear/dptx_core.c  | 1101 +++++++++++++
 drivers/gpu/drm/bridge/trilinear/dptx_drm.c   |  664 ++++++++
 drivers/gpu/drm/bridge/trilinear/dptx_drm.h   |   17 +
 drivers/gpu/drm/bridge/trilinear/dptx_hw.c    | 1384 +++++++++++++++++
 drivers/gpu/drm/bridge/trilinear/dptx_hw.h    |  109 ++
 drivers/gpu/drm/cix/Kconfig                   |    3 +
 drivers/gpu/drm/cix/Makefile                  |    3 +
 drivers/gpu/drm/cix/dptx/Kconfig              |   15 +
 drivers/gpu/drm/cix/dptx/Makefile             |    4 +
 drivers/gpu/drm/cix/dptx/cix_dptx.c           |  163 ++
 include/drm/bridge/trilinear_dp.h             |   68 +
 20 files changed, 3769 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/cix,sky1-dp.yaml
 create mode 100644 drivers/gpu/drm/bridge/trilinear/Kconfig
 create mode 100644 drivers/gpu/drm/bridge/trilinear/Makefile
 create mode 100644 drivers/gpu/drm/bridge/trilinear/dptx.h
 create mode 100644 drivers/gpu/drm/bridge/trilinear/dptx_core.c
 create mode 100644 drivers/gpu/drm/bridge/trilinear/dptx_drm.c
 create mode 100644 drivers/gpu/drm/bridge/trilinear/dptx_drm.h
 create mode 100644 drivers/gpu/drm/bridge/trilinear/dptx_hw.c
 create mode 100644 drivers/gpu/drm/bridge/trilinear/dptx_hw.h
 create mode 100644 drivers/gpu/drm/cix/Kconfig
 create mode 100644 drivers/gpu/drm/cix/Makefile
 create mode 100644 drivers/gpu/drm/cix/dptx/Kconfig
 create mode 100644 drivers/gpu/drm/cix/dptx/Makefile
 create mode 100644 drivers/gpu/drm/cix/dptx/cix_dptx.c
 create mode 100644 include/drm/bridge/trilinear_dp.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-25  4:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  3:32 [PATCH v4 0/5] drm/bridge: trilinear: add the Sky1 DisplayPort transmitter Luo Liu
2026-11-25  3:32 ` [PATCH v4 1/5] dt-bindings: display: add CIX " Luo Liu
2026-11-25  3:52   ` sashiko-bot
2026-11-25  3:32 ` [PATCH v4 2/5] drm/bridge: trilinear: add the DPTX hardware layer Luo Liu
2026-11-25  3:32 ` [PATCH v4 3/5] drm/bridge: trilinear: add the DPTX DRM bridge Luo Liu
2026-11-25  3:58   ` sashiko-bot
2026-11-25  3:32 ` [PATCH v4 4/5] drm/bridge: trilinear: add the DPTX core and build glue Luo Liu
2026-11-25  4:00   ` sashiko-bot
2026-11-25  3:32 ` [PATCH v4 5/5] drm/cix: add the Sky1 DisplayPort platform glue Luo Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.