linux
linux copied to clipboard
vc4: Use GPIO interrupts to detect HDMI HPD state transitions.
Right now the DRM core is helping us out by polling the HPD periodically, but we should be able to just register for an interrupt, saving CPU wakeups.
This will get us the interrupts:
ret = devm_request_irq(dev,
gpio_to_irq(hdmi->hpd_gpio),
vc4_hdmi_hpd_irq_handler,
IRQF_TRIGGER_RISING |
IRQF_TRIGGER_FALLING,
"HDMI HPD",
vc4);
but we'd need a delayed work to go off and lock the mode config mutex so that we can do the poll.