提交 9bdf63d7 编写于 作者: J Jammy Huang 提交者: Zheng Zengkai

media: aspeed: fix mode-detect always time out at 2nd run

stable inclusion
from stable-v5.10.94
commit b441d94287359c1aa5f67e3d2977f0a1713ae2fc
bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b441d94287359c1aa5f67e3d2977f0a1713ae2fc

--------------------------------

[ Upstream commit 62cea52a ]

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: d2b4387f ("media: platform: Add Aspeed Video Engine driver")
Signed-off-by: NJammy Huang <jammy_huang@aspeedtech.com>
Acked-by: NPaul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: NJoel Stanley <joel@jms.id.au>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 8d93fb27
......@@ -500,6 +500,10 @@ static void aspeed_video_enable_mode_detect(struct aspeed_video *video)
aspeed_video_update(video, VE_INTERRUPT_CTRL, 0,
VE_INTERRUPT_MODE_DETECT);
/* Disable mode detect in order to re-trigger */
aspeed_video_update(video, VE_SEQ_CTRL,
VE_SEQ_CTRL_TRIG_MODE_DET, 0);
/* Trigger mode detect */
aspeed_video_update(video, VE_SEQ_CTRL, 0, VE_SEQ_CTRL_TRIG_MODE_DET);
}
......@@ -786,10 +790,6 @@ static void aspeed_video_get_resolution(struct aspeed_video *video)
return;
}
/* Disable mode detect in order to re-trigger */
aspeed_video_update(video, VE_SEQ_CTRL,
VE_SEQ_CTRL_TRIG_MODE_DET, 0);
aspeed_video_check_and_set_polarity(video);
aspeed_video_enable_mode_detect(video);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册