]> git.baikalelectronics.ru Git - kernel.git/commit
media: aspeed: Update signal status immediately to ensure sane hw state
authorJammy Huang <jammy_huang@aspeedtech.com>
Tue, 9 Nov 2021 03:12:27 +0000 (03:12 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:12:05 +0000 (08:12 +0000)
commit05b3aa147216bf491d77a253a3986b79e7dc92b6
treeed2f6541ff65913968241773c96a777155c57607
parent04136852e542b401cbc5e2319ad5ccd9015912f0
media: aspeed: Update signal status immediately to ensure sane hw state

If res-chg, VE_INTERRUPT_MODE_DETECT_WD irq will be raised. But
v4l2_input_status won't be updated to no-signal immediately until
aspeed_video_get_resolution() in aspeed_video_resolution_work().

During the period of time, aspeed_video_start_frame() could be called
because it doesn't know signal becomes unstable now. If it goes with
aspeed_video_init_regs() of aspeed_video_irq_res_change()
simultaneously, it will mess up hw state.

To fix this problem, v4l2_input_status is updated to no-signal
immediately for VE_INTERRUPT_MODE_DETECT_WD irq.

Fixes: 7c5d8db1fc4c ("media: platform: Add Aspeed Video Engine driver")
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
Acked-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/aspeed-video.c