From 5b435132259323fa43b43c52dbc6f7ede286c4c6 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Tue, 21 Feb 2017 18:31:54 +0200 Subject: [PATCH] drm/i915/lspcon: Set short HPD signaling Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/intel_lspcon.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c index 71cbe9c..890c646 100644 --- a/drivers/gpu/drm/i915/intel_lspcon.c +++ b/drivers/gpu/drm/i915/intel_lspcon.c @@ -209,6 +209,8 @@ bool lspcon_init(struct intel_digital_port *intel_dig_port) struct intel_lspcon *lspcon = &intel_dig_port->lspcon; struct drm_device *dev = intel_dig_port->base.base.dev; struct drm_i915_private *dev_priv = to_i915(dev); + u8 branch_ctrl; + ssize_t ret; if (!IS_GEN9(dev_priv)) { DRM_ERROR("LSPCON is supported on GEN9 only\n"); @@ -242,6 +244,22 @@ bool lspcon_init(struct intel_digital_port *intel_dig_port) intel_dp_read_desc(dp); + ret = drm_dp_dpcd_readb(&dp->aux, DP_BRANCH_DEVICE_CTRL, &branch_ctrl); + if (ret != 1) { + DRM_DEBUG_KMS("Can't read branch device ctrl (%zd)\n", ret); + } else { + DRM_DEBUG_KMS("Original branch device ctrl: %02x\n", + branch_ctrl); + + branch_ctrl |= DP_BRANCH_DEVICE_IRQ_HPD; + + ret = drm_dp_dpcd_writeb(&dp->aux, DP_BRANCH_DEVICE_CTRL, + DP_BRANCH_DEVICE_IRQ_HPD); + if (ret != 1) + DRM_DEBUG_KMS("Can't enable short HPD signaling (%zd)\n", + ret); + } + DRM_DEBUG_KMS("Success: LSPCON init\n"); return true; } -- 2.5.0