Skip to contentSkip to conversation

adv7511: the h/vsync polarities were always positive

PATCH New Hans Verkuil 1 participant 1 message Jul 5, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 adv7511: the h/vsync polarities were always positive

Correctly set the h/vsync polarities instead of keeping to the default (positive).

---
 drivers/media/i2c/adv7511.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/media/i2c/adv7511.c +5 -0
index 161cbdb..f062694 100644
@@ -763,6 +763,11 @@ static int adv7511_s_dv_timings(struct v4l2_subdev *sd,
 	/* save timings */
 	state->dv_timings = *timings;
 
+	/* set h/vsync polarities */
+	adv7511_wr_and_or(sd, 0x17, 0x9f,
+		((timings->bt.polarities & V4L2_DV_VSYNC_POS_POL) ? 0 : 0x40) |
+		((timings->bt.polarities & V4L2_DV_HSYNC_POS_POL) ? 0 : 0x20));
+
 	/* update quantization range based on new dv_timings */
 	adv7511_set_rgb_quantization_mode(sd, state->rgb_quantization_range_ctrl);
 
Signature · 1 line
2.8.1