summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Bugge <marbugge@cisco.com>2014-03-19 06:43:45 -0300
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:55:33 +0900
commite6c234d9ca05c1c2139ed362a86a6d926e9d029c (patch)
treed1aa65057f58445e59864e6208aa90f0b210c416
parentc27d418c18cf9d1bef514b4ca9feca60a705011a (diff)
downloadlinux-3.10-e6c234d9ca05c1c2139ed362a86a6d926e9d029c.tar.gz
linux-3.10-e6c234d9ca05c1c2139ed362a86a6d926e9d029c.tar.bz2
linux-3.10-e6c234d9ca05c1c2139ed362a86a6d926e9d029c.zip
upstream: [media] adv7842: Disable access to EDID DDC lines before chip power up
In core_init make sure access to EDID DDC lines are disabled before chip is powered up. Also DISABLE_AUTO_EDID before power up. The correct setting is applied later when setting the EDID. Some sources (MAC) kept on reading EDID even when Hotplug was low and in the short period in core_init before the DDC lines was enabled read a corrupt EDID. Signed-off-by: Martin Bugge <marbugge@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/i2c/adv7842.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index 168ecf545bf..4959e5bcc84 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -2611,6 +2611,12 @@ static int adv7842_core_init(struct v4l2_subdev *sd)
disable_input(sd);
+ /*
+ * Disable I2C access to internal EDID ram from HDMI DDC ports
+ * Disable auto edid enable when leaving powerdown mode
+ */
+ rep_write_and_or(sd, 0x77, 0xd3, 0x20);
+
/* power */
io_write(sd, 0x0c, 0x42); /* Power up part and power down VDP */
io_write(sd, 0x15, 0x80); /* Power up pads */
@@ -2691,9 +2697,6 @@ static int adv7842_core_init(struct v4l2_subdev *sd)
enable_input(sd);
- /* disable I2C access to internal EDID ram from HDMI DDC ports */
- rep_write_and_or(sd, 0x77, 0xf3, 0x00);
-
if (pdata->hpa_auto) {
/* HPA auto, HPA 0.5s after Edid set and Cable detect */
hdmi_write(sd, 0x69, 0x5c);