Commit db9edaaf authored by Benjamin Marty's avatar Benjamin Marty Committed by Mauro Carvalho Chehab

media: i2c: adv7180: fix reserved bit in Video Selection 2

This bit is marked as reserved in the ADV Hardware Reference Manual.

Resetting this bit seems to cause increased video noise. Setting this
bit according to the Hardware Reference Manual reduces the video noise
immediately.
Signed-off-by: default avatarBenjamin Marty <info@benjaminmarty.ch>
Reviewed-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Tested-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 56280c64
......@@ -43,6 +43,7 @@
#define ADV7180_INPUT_CONTROL_INSEL_MASK 0x0f
#define ADV7182_REG_INPUT_VIDSEL 0x0002
#define ADV7182_REG_INPUT_RESERVED BIT(2)
#define ADV7180_REG_OUTPUT_CONTROL 0x0003
#define ADV7180_REG_EXTENDED_OUTPUT_CONTROL 0x0004
......@@ -1060,7 +1061,9 @@ static int adv7182_init(struct adv7180_state *state)
static int adv7182_set_std(struct adv7180_state *state, unsigned int std)
{
return adv7180_write(state, ADV7182_REG_INPUT_VIDSEL, std << 4);
/* Failing to set the reserved bit can result in increased video noise */
return adv7180_write(state, ADV7182_REG_INPUT_VIDSEL,
(std << 4) | ADV7182_REG_INPUT_RESERVED);
}
enum adv7182_input_type {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment