Skip to content

Commit 060477d

Browse files
committed
drm: apple: HDMI: Check HPD state before enabling the IRQ
The HPD IRQ is edge triggered so its state needs to queried explicitly to detect the current state. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 1396634 commit 060477d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • drivers/gpu/drm/apple

drivers/gpu/drm/apple/dcp.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,15 @@ EXPORT_SYMBOL(dcp_start);
565565

566566
static int dcp_enable_dp2hdmi_hpd(struct apple_dcp *dcp)
567567
{
568+
// check HPD state before enabling the edge triggered IRQ
569+
if (dcp->hdmi_hpd) {
570+
bool connected = gpiod_get_value_cansleep(dcp->hdmi_hpd);
571+
dev_info(dcp->dev, "%s: DP2HDMI HPD connected:%d\n", __func__, connected);
572+
573+
if (connected)
574+
dcp_dptx_connect(dcp, 0);
575+
}
576+
568577
if (dcp->hdmi_hpd_irq)
569578
enable_irq(dcp->hdmi_hpd_irq);
570579

0 commit comments

Comments
 (0)