Skip to content

Commit

Permalink
drm: apple: dptx: Debounce HPD by simple msleep()
Browse files Browse the repository at this point in the history
Not necessarily only a debounce but 500ms sleep in the HPD interrupt
handler seems to make the modeset more reliable on M2* desktop devices.

Signed-off-by: Janne Grunau <j@jannau.net>
  • Loading branch information
jannau committed Mar 26, 2024
1 parent 6cfe7ad commit 5ef7d92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/apple/dcp.c
Expand Up @@ -329,6 +329,12 @@ static irqreturn_t dcp_dp2hdmi_hpd(int irq, void *data)
*/
dev_info(dcp->dev, "DP2HDMI HPD irq, connected:%d\n", connected);

if (connected) {
msleep(500);
connected = gpiod_get_value_cansleep(dcp->hdmi_hpd);
dev_info(dcp->dev, "DP2HDMI HPD irq, 300ms deboune: connected:%d\n", connected);

This comment has been minimized.

Copy link
@aruediger

aruediger Mar 27, 2024

should this be

dev_info(dcp->dev, "DP2HDMI HPD irq, 500ms debounce, connected: %d\n", connected);

?

This comment has been minimized.

Copy link
@jannau

jannau Mar 27, 2024

Author Owner

already fixed in 5205c46

}

if (connected)
dcp_dptx_connect(dcp, 0);

Expand Down

0 comments on commit 5ef7d92

Please sign in to comment.