[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250601232937.3510379-67-sashal@kernel.org>
Date: Sun, 1 Jun 2025 19:28:59 -0400
From: Sasha Levin <sashal@...nel.org>
To: patches@...ts.linux.dev,
stable@...r.kernel.org
Cc: Shravan Chippa <shravan.chippa@...rochip.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Hans Verkuil <hverkuil@...all.nl>,
Sasha Levin <sashal@...nel.org>,
mchehab@...nel.org,
linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH AUTOSEL 6.14 067/102] media: i2c: imx334: update mode_3840x2160_regs array
From: Shravan Chippa <shravan.chippa@...rochip.com>
[ Upstream commit 35132d039c566b0e9d8e53f76f512b22607c2405 ]
The 3840x2160 mode operates with the imx334 reset values.
If we switch to other modes and then return to the 3840x2160 mode,
it should function correctly. so updated the mode_3840x2160_regs
array with the imx334 reset values.
Signed-off-by: Shravan Chippa <shravan.chippa@...rochip.com>
Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@...all.nl>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
**YES** This commit should be backported to stable kernel trees. Here's
my analysis: ## Backport Analysis ### **This is a Clear Functional Bug
Fix** The commit addresses a real functional issue where the IMX334
camera sensor fails to work correctly when switching between camera
modes. Specifically: 1. **Root Problem**: The 3840x2160 mode register
array was missing critical reset values (registers 0x3074, 0x3075,
0x308e, 0x308f, 0x30d8, 0x30d9) 2. **User Impact**: When users switch
from other camera modes (like 1920x1080@30) back to 3840x2160@60, the
sensor retains previous register values causing: - Incorrect output
resolution - Wrong video format output - Application failures expecting
3840x2160 resolution 3. **Why It Previously "Worked"**: The 3840x2160
mode appeared to work on initial startup because the hardware reset
values were correct, but dynamic mode switching exposed the missing
register configurations. ### **Low Risk, High Value Fix** **Risk
Assessment: MINIMAL** - **Code Changes**: Only adds 6 register value
pairs to a static array - no algorithmic changes - **Register Values**:
These are official Sony IMX334 reset values, not arbitrary
configurations - **Scope**: Self-contained fix within the mode register
array - **No Dependencies**: Doesn't modify driver logic or control flow
**High User Value**: - Fixes broken functionality for dynamic mode
switching - Common use case in camera applications - Prevents incorrect
resolution output that breaks user applications ### **Meets All Stable
Tree Criteria** ✅ **Fixes important user-facing bug**: Mode switching is
fundamental camera functionality ✅ **Small, contained change**: Only 6
register additions to existing array ✅ **Low regression risk**: Adding
missing reset values cannot break existing functionality ✅ **Well-
understood problem**: Clear cause (missing registers) and solution (add
them) ✅ **No architectural changes**: Pure data fix in register
configuration ### **Comparison to Similar Commits** This commit follows
the same pattern as the provided examples of camera sensor fixes -
adding missing register values to ensure correct operation. The
difference is that this actually fixes a functional bug (mode switching
failure) rather than just adding features or optimizations.
**Recommendation**: Backport to all stable kernels that include IMX334
driver support, as this resolves a legitimate functional regression
affecting real-world camera applications.
drivers/media/i2c/imx334.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
index 63d812a41542f..b47cb3b8f3689 100644
--- a/drivers/media/i2c/imx334.c
+++ b/drivers/media/i2c/imx334.c
@@ -352,6 +352,12 @@ static const struct imx334_reg mode_3840x2160_regs[] = {
{0x302d, 0x00},
{0x302e, 0x00},
{0x302f, 0x0f},
+ {0x3074, 0xb0},
+ {0x3075, 0x00},
+ {0x308e, 0xb1},
+ {0x308f, 0x00},
+ {0x30d8, 0x20},
+ {0x30d9, 0x12},
{0x3076, 0x70},
{0x3077, 0x08},
{0x3090, 0x70},
--
2.39.5
Powered by blists - more mailing lists