]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 7 Mar 2022 15:35:30 +0000 (16:35 +0100)
commit33642c00b014905603b23c1fd2d7939284458c76
treee9dfe8929ccb6dc9484cec3c06b2e18803f2cde9
parent74a435cd764574481a42a2025fbd42c0aefe8741
media: aspeed: Update signal status immediately to ensure sane hw state

BugLink: https://bugs.launchpad.net/bugs/1960566
[ Upstream commit af6d1bde395cac174ee71adcd3fa43f6435c7206 ]

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: d2b4387f3bdf ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/media/platform/aspeed-video.c