mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 01:52:03 +02:00
media: i2c: vd55g1: Fix manual digital gain on color variant
Apply digital gain to all channels, each channel representing a color.
Cc: stable@vger.kernel.org
Fixes: e138e7f000 ("media: i2c: vd55g1: Add support for vd65g4 RGB variant")
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
This commit is contained in:
parent
3e275097e2
commit
113a84d6ba
|
|
@ -60,7 +60,10 @@
|
|||
#define VD55G1_PATGEN_ENABLE BIT(0)
|
||||
#define VD55G1_REG_MANUAL_ANALOG_GAIN CCI_REG8(0x0501)
|
||||
#define VD55G1_REG_MANUAL_COARSE_EXPOSURE CCI_REG16_LE(0x0502)
|
||||
#define VD55G1_REG_MANUAL_DIGITAL_GAIN CCI_REG16_LE(0x0504)
|
||||
#define VD55G1_REG_MANUAL_DIGITAL_GAIN_CH0 CCI_REG16_LE(0x0504)
|
||||
#define VD55G1_REG_MANUAL_DIGITAL_GAIN_CH1 CCI_REG16_LE(0x0506)
|
||||
#define VD55G1_REG_MANUAL_DIGITAL_GAIN_CH2 CCI_REG16_LE(0x0508)
|
||||
#define VD55G1_REG_MANUAL_DIGITAL_GAIN_CH3 CCI_REG16_LE(0x050a)
|
||||
#define VD55G1_REG_APPLIED_COARSE_EXPOSURE CCI_REG16_LE(0x00e8)
|
||||
#define VD55G1_REG_APPLIED_ANALOG_GAIN CCI_REG16_LE(0x00ea)
|
||||
#define VD55G1_REG_APPLIED_DIGITAL_GAIN CCI_REG16_LE(0x00ec)
|
||||
|
|
@ -849,9 +852,16 @@ static int vd55g1_update_expo_cluster(struct vd55g1 *sensor, bool is_auto)
|
|||
vd55g1_write(sensor, VD55G1_REG_MANUAL_ANALOG_GAIN,
|
||||
sensor->again_ctrl->val, &ret);
|
||||
|
||||
if (!is_auto && sensor->dgain_ctrl->is_new)
|
||||
vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN,
|
||||
if (!is_auto && sensor->dgain_ctrl->is_new) {
|
||||
vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN_CH0,
|
||||
sensor->dgain_ctrl->val, &ret);
|
||||
vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN_CH1,
|
||||
sensor->dgain_ctrl->val, &ret);
|
||||
vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN_CH2,
|
||||
sensor->dgain_ctrl->val, &ret);
|
||||
vd55g1_write(sensor, VD55G1_REG_MANUAL_DIGITAL_GAIN_CH3,
|
||||
sensor->dgain_ctrl->val, &ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user