OSDN Git Service

media: aspeed: fix mode-detect always time out at 2nd run
authorJammy Huang <jammy_huang@aspeedtech.com>
Wed, 3 Nov 2021 08:23:54 +0000 (08:23 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:12:00 +0000 (08:12 +0000)
commit62cea52ad4bead0ae4be2cfe1142eb0aae0e9fbd
tree380bc8605f68b5f350403e0db564559eabdb3368
parent352ff3f3d449554f5259f75d77f65e638ea9d4a1
media: aspeed: fix mode-detect always time out at 2nd run

aspeed_video_get_resolution() will try to do res-detect again if the
timing got in last try is invalid. But it will always time out because
VE_SEQ_CTRL_TRIG_MODE_DET is only cleared after 1st mode-detect.

To fix the problem, just clear VE_SEQ_CTRL_TRIG_MODE_DET before setting
it in aspeed_video_enable_mode_detect().

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>
Reviewed-by: Joel Stanley <joel@jms.id.au>
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