Skip to content

Commit 08cf298

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 8322ff2 commit 08cf298

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
@@ -569,6 +569,15 @@ EXPORT_SYMBOL(dcp_start);
569569

570570
static int dcp_enable_dp2hdmi_hpd(struct apple_dcp *dcp)
571571
{
572+
// check HPD state before enabling the edge triggered IRQ
573+
if (dcp->hdmi_hpd) {
574+
bool connected = gpiod_get_value_cansleep(dcp->hdmi_hpd);
575+
dev_info(dcp->dev, "%s: DP2HDMI HPD connected:%d\n", __func__, connected);
576+
577+
if (connected)
578+
dcp_dptx_connect(dcp, 0);
579+
}
580+
572581
if (dcp->hdmi_hpd_irq)
573582
enable_irq(dcp->hdmi_hpd_irq);
574583

0 commit comments

Comments
 (0)