This series adds 'no-hpd' device tree property support to the Cadence
MHDP8546 bridge driver for boards where the HPD line cannot be used for
hotplug detection.

On TI J721S2 EVMs, the HPD signal is routed to SoC pin AA24
(MCASP1_ACLKX/DP0_HPD). This pin is muxed with the McASP1 audio bit
clock; selecting DP0_HPD breaks audio. There is no alternative pin
carrying the HPD signal which makes it impossible to use HPD
without loosing the audio capabilities.

When 'no-hpd' is set, DRM_BRIDGE_OP_HPD is omitted so the framework
falls back to polling .detect() every ~10 seconds. Monitor presence is
determined via AUX DPCD reads instead of firmware HPD status registers.
The .detect() callback drives cdns_mhdp_update_link_status() on each
poll to keep mhdp->plugged current. At attach time, the driver waits
for firmware to be ready before performing the initial AUX poll since
no interrupt will trigger it.

Changes since v3:
  - DPCD read log level is now dev_dbg only in no-hpd path; HPD path
    keeps dev_err 
  - Added blank line and code comment in cdns_mhdp_attach()
  - Property name changed to 'no-hpd' without vendor prefix
  - Cleaned up the manual polling in detect since the framework
    already does it when OP_HPD is disabled
  - HPD detection and notification to userspace and drm clients 
    now happen through the framework callbacks

Link to v3: 
https://lore.kernel.org/all/[email protected]/

Rahul T R (2):
  dt-bindings: display/bridge: cdns-mhdp8546: Add no-hpd property to the
    cadence bridge
  drm: bridge: cdns-mhdp8546: Add no-hpd property

 .../display/bridge/cdns,mhdp8546.yaml         | 11 ++++
 .../drm/bridge/cadence/cdns-mhdp8546-core.c   | 58 ++++++++++++++++---
 .../drm/bridge/cadence/cdns-mhdp8546-core.h   |  1 +
 3 files changed, 63 insertions(+), 7 deletions(-)

-- 
2.34.1

Reply via email to