summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWentao Liang <vulab@iscas.ac.cn>2025-04-22 10:13:45 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-09-02 14:29:16 +0200
commit71209954f1e8ff0f0ba944c8d3b64bbed83d400c (patch)
tree23ef3b2503b8feebe9b08042ea95e6c9996b7ec7
parentac65f76db9b2ff3fbc9e198c0e9aaf81b111b7d0 (diff)
downloadlinux-stable-71209954f1e8ff0f0ba944c8d3b64bbed83d400c.tar.gz
linux-stable-71209954f1e8ff0f0ba944c8d3b64bbed83d400c.zip
media: platform: exynos4-is: Add hardware sync wait to fimc_is_hw_change_mode()
[ Upstream commit bd9f6ce7d512fa21249415c16af801a4ed5d97b6 ] In fimc_is_hw_change_mode(), the function changes camera modes without waiting for hardware completion, risking corrupted data or system hangs if subsequent operations proceed before the hardware is ready. Add fimc_is_hw_wait_intmsr0_intmsd0() after mode configuration, ensuring hardware state synchronization and stable interrupt handling. Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/media/platform/samsung/exynos4-is/fimc-is-regs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is-regs.c b/drivers/media/platform/samsung/exynos4-is/fimc-is-regs.c
index 366e6393817d..5f9c44e825a5 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-is-regs.c
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-is-regs.c
@@ -164,6 +164,7 @@ int fimc_is_hw_change_mode(struct fimc_is *is)
if (WARN_ON(is->config_index >= ARRAY_SIZE(cmd)))
return -EINVAL;
+ fimc_is_hw_wait_intmsr0_intmsd0(is);
mcuctl_write(cmd[is->config_index], is, MCUCTL_REG_ISSR(0));
mcuctl_write(is->sensor_index, is, MCUCTL_REG_ISSR(1));
mcuctl_write(is->setfile.sub_index, is, MCUCTL_REG_ISSR(2));