]> git.hungrycats.org Git - linux/commit
media: intel/ipu6: do not handle interrupts when device is disabled
authorStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Thu, 31 Oct 2024 10:23:21 +0000 (11:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:22 +0000 (13:54 +0100)
commited4524c87249edc3104f6bb28ab11325bed3d536
treec1a0e049ecf0b2d6839aa2a4e9e8827e3d854388
parent2e63c908de357048180516b84740ed62dac0b269
media: intel/ipu6: do not handle interrupts when device is disabled

commit 1429826883bb18847092b2e04c6598ef34bae1d4 upstream.

Some IPU6 devices have shared interrupts. We need to handle properly
case when interrupt is triggered from other device on shared irq line
and IPU6 itself disabled. In such case we get 0xffffffff from
ISR_STATUS register and handle all irq's cases, for what we are not
not prepared and usually hang the whole system.

To avoid the issue use pm_runtime_get_if_active() to check if
the device is enabled and prevent suspending it when we handle irq
until the end of irq. Additionally use synchronize_irq() in suspend

Fixes: ab29a2478e70 ("media: intel/ipu6: add IPU6 buttress interface driver")
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/pci/intel/ipu6/ipu6-buttress.c
drivers/media/pci/intel/ipu6/ipu6.c