[PATCH v1] drm/bridge: ti-sn65dsi86: Use HPD in a DP use case
max.oss.09 at gmail.com
max.oss.09 at gmail.com
Thu May 1 07:48:02 UTC 2025
From: Max Krummenacher <max.krummenacher at toradex.com>
The bridge driver currently disables handling the hot plug input and
relies on a always connected eDP panel with fixed delays when the
panel is ready.
If one uses the bridge for a regular display port monitor this
assumption is no longer true.
If used with a display port monitor change to keep the hot plug
detection functionality enabled and change to have the bridge working
during runtime suspend to be able to detect the connection state.
Note that if HPD_DISABLE is set the HPD bit always returns connected
independent of the actual state of the hot plug pin. Thus
currently bridge->detect() always returns connected.
Signed-off-by: Max Krummenacher <max.krummenacher at toradex.com>
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 01d456b955ab..c7496bf142d1 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -333,9 +333,11 @@ static void ti_sn65dsi86_enable_comms(struct ti_sn65dsi86 *pdata)
* If HPD somehow makes sense on some future panel we'll have to
* change this to be conditional on someone specifying that HPD should
* be used.
+ * Only disable HDP if used for eDP.
*/
- regmap_update_bits(pdata->regmap, SN_HPD_DISABLE_REG, HPD_DISABLE,
- HPD_DISABLE);
+ if (pdata->bridge.type == DRM_MODE_CONNECTOR_eDP)
+ regmap_update_bits(pdata->regmap, SN_HPD_DISABLE_REG,
+ HPD_DISABLE, HPD_DISABLE);
pdata->comms_enabled = true;
@@ -357,6 +359,10 @@ static int __maybe_unused ti_sn65dsi86_resume(struct device *dev)
struct ti_sn65dsi86 *pdata = dev_get_drvdata(dev);
int ret;
+ if (pdata->bridge.type == DRM_MODE_CONNECTOR_DisplayPort &&
+ pdata->comms_enabled)
+ return 0;
+
ret = regulator_bulk_enable(SN_REGULATOR_SUPPLY_NUM, pdata->supplies);
if (ret) {
DRM_ERROR("failed to enable supplies %d\n", ret);
@@ -386,6 +392,9 @@ static int __maybe_unused ti_sn65dsi86_suspend(struct device *dev)
struct ti_sn65dsi86 *pdata = dev_get_drvdata(dev);
int ret;
+ if (pdata->bridge.type == DRM_MODE_CONNECTOR_DisplayPort)
+ return 0;
+
if (pdata->refclk)
ti_sn65dsi86_disable_comms(pdata);
--
2.42.0
More information about the dri-devel
mailing list