Skip to content

icvs: don't request a non-threaded IRQ with IRQF_ONESHOT#41

Open
jibsta210 wants to merge 1 commit into
intel:mainfrom
jibsta210:fix-cvs-irqf-oneshot
Open

icvs: don't request a non-threaded IRQ with IRQF_ONESHOT#41
jibsta210 wants to merge 1 commit into
intel:mainfrom
jibsta210:fix-cvs-irqf-oneshot

Conversation

@jibsta210

Copy link
Copy Markdown

cvs_init() registers cvs_irq_handler() as a primary (hardirq) handler via devm_request_irq() but passes IRQF_ONESHOT.

IRQF_ONESHOT is intended for threaded interrupts — it keeps the line masked after the hardirq until the threaded handler runs. cvs_irq_handler() has no threaded component (it only sets hostwake_event_arg and wakes a waitqueue), so the flag is inappropriate. On the Synaptics SVP7500 (06cb:0701) CVS bridge it leaves the device interrupt masked after an event, so the bridge stops delivering interrupts after a brief idle and wedges. libcamera then can no longer drive the sensor and falls back to the simple pipeline with no frames — the ov08x40 … Unable to get rectangle N … Inappropriate ioctl for device + simple-pipeline-fallback signature reported in #33, #31 and #36.

Dropping IRQF_ONESHOT restores reliable IRQ delivery and streaming; IRQF_NO_SUSPEND is kept so the line stays armed across suspend.

Tested on a Dell XPS 16 (Panther Lake, SVP7500 + ov08x40): with the change the RGB camera streams (500 frames @ 28.57 fps via libcamera cam); without it the bridge wedges after a brief idle.

cvs_init() registers cvs_irq_handler() as a primary (hardirq) handler via
devm_request_irq(), but passes IRQF_ONESHOT. IRQF_ONESHOT is intended for
threaded interrupts, where it keeps the interrupt line masked after the
hardirq until the threaded handler has run. cvs_irq_handler() has no
threaded component -- it only sets hostwake_event_arg and wakes a
waitqueue -- so IRQF_ONESHOT is inappropriate here.

On the Synaptics SVP7500 (06cb:0701) CVS bridge this leaves the device
interrupt masked after an event; the bridge then stops delivering
interrupts after a brief idle and wedges, after which libcamera can no
longer drive the sensor and falls back to the "simple" pipeline with no
frames flowing. Dropping IRQF_ONESHOT restores reliable interrupt delivery
and streaming.

Keep IRQF_NO_SUSPEND so the interrupt remains armed across system suspend.

Fixes: 6a93817 ("gpio resources")
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant