linux/drivers/media/platform/chips-media/wave5
Jackson Lee a52e6f7923 media: chips-media: wave5: Resume device before setting EOS flag
Setting the EOS flag talks to the firmware via send_firmware_command(),
which accesses VPU registers. Both the STREAMOFF path
(wave5_vpu_dec_job_abort()) and the V4L2_DEC_CMD_STOP path
(wave5_vpu_dec_stop()) can run while the device is runtime suspended, so
those register accesses hit powered-down hardware and the SoC raises an
asynchronous SError, panicking the kernel:

  SError Interrupt on CPU3, code 0x00000000bf000000 -- SError
   send_firmware_command+0x2c/0x160 [wave5]
   wave5_vpu_dec_set_bitstream_flag+0x6c/0x80 [wave5]
   wave5_vpu_dec_update_bitstream_buffer+0x80/0xec [wave5]
   wave5_vpu_dec_job_abort+0x44/0xa0 [wave5]
   v4l2_m2m_cancel_job+0x110/0x19c [v4l2_mem2mem]
   v4l2_m2m_streamoff+0x24/0x140 [v4l2_mem2mem]

Resume the device with pm_runtime_resume_and_get() around the EOS
firmware command and release it with pm_runtime_put_autosuspend(),
matching the runtime PM handling already done in
wave5_vpu_dec_device_run().

Fixes: 9707a6254a ("media: chips-media: wave5: Add the v4l2 layer")
Cc: stable@vger.kernel.org
Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-17 12:36:49 +02:00
..
Kconfig media: chips-media: wave5: Requires GENERIC_ALLOCATOR 2023-12-13 09:43:45 +01:00
Makefile
wave5-helper.c media: chips-media: wave5: Release m2m_ctx after Instance Removed from List 2026-05-04 09:31:04 +02:00
wave5-helper.h media: chips-media: wave5: Add Support for Packed YUV422 Formats 2026-05-04 08:35:14 +02:00
wave5-hw.c media: chips-media: wave5: Support CBP profile 2026-05-04 08:35:14 +02:00
wave5-regdefine.h media: chips-media: wave5: support Wave515 decoder 2024-06-21 10:15:21 +02:00
wave5-vdi.c media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init() 2026-03-23 11:18:33 +01:00
wave5-vdi.h
wave5-vpu-dec.c media: chips-media: wave5: Resume device before setting EOS flag 2026-07-17 12:36:49 +02:00
wave5-vpu-enc.c media: chips-media: wave5: Set inst->std during default format initialization 2026-07-17 12:36:48 +02:00
wave5-vpu.c media: chips-media: wave5: Fix Potential Probe Resource Leak 2026-01-05 15:56:32 +01:00
wave5-vpu.h media: chips-media: wave5: Improve performance of decoder 2026-01-05 15:56:31 +01:00
wave5-vpuapi.c media: chips-media: wave5: Add range checks for dec_output_info 2026-05-12 09:39:02 +02:00
wave5-vpuapi.h media: chips-media: wave5: Support CBP profile 2026-05-04 08:35:14 +02:00
wave5-vpuconfig.h media: chips-media: wave5: Add timeout while stop_streaming 2026-07-17 12:36:48 +02:00
wave5-vpuerror.h
wave5.h media: chips-media: wave5: Support runtime suspend/resume 2024-10-08 14:49:38 +02:00