icvs: don't request a non-threaded IRQ with IRQF_ONESHOT#41
Open
jibsta210 wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cvs_init()registerscvs_irq_handler()as a primary (hardirq) handler viadevm_request_irq()but passesIRQF_ONESHOT.IRQF_ONESHOTis 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 setshostwake_event_argand 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 thesimplepipeline with no frames — theov08x40 … Unable to get rectangle N … Inappropriate ioctl for device+ simple-pipeline-fallback signature reported in #33, #31 and #36.Dropping
IRQF_ONESHOTrestores reliable IRQ delivery and streaming;IRQF_NO_SUSPENDis 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.