aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Bugge <marbugge@cisco.com>2013-12-05 10:09:51 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 03:35:06 -0500
commitfc2e991e86382abb5cd32010b92a63b15bd76f30 (patch)
treeb8fbdd696ac12bf2039a153f275bf0f31ad1d1ae
parent5b64b205392fcf3bbbc0cedddeb0aa33cd769801 (diff)
[media] adv7842: clear edid, if no edid just disable Edid-DDC access
Signed-off-by: Martin Bugge <marbugge@cisco.com> Cc: Mats Randgaard <matrandg@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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index bbd80acbabfe..eab9a1b8b54b 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -700,6 +700,9 @@ static int edid_write_hdmi_segment(struct v4l2_subdev *sd, u8 port)
700 /* Disable I2C access to internal EDID ram from HDMI DDC ports */ 700 /* Disable I2C access to internal EDID ram from HDMI DDC ports */
701 rep_write_and_or(sd, 0x77, 0xf3, 0x00); 701 rep_write_and_or(sd, 0x77, 0xf3, 0x00);
702 702
703 if (!state->hdmi_edid.present)
704 return 0;
705
703 /* edid segment pointer '0' for HDMI ports */ 706 /* edid segment pointer '0' for HDMI ports */
704 rep_write_and_or(sd, 0x77, 0xef, 0x00); 707 rep_write_and_or(sd, 0x77, 0xef, 0x00);
705 708
@@ -2638,8 +2641,8 @@ static int adv7842_command_ram_test(struct v4l2_subdev *sd)
2638 adv7842_s_dv_timings(sd, &state->timings); 2641 adv7842_s_dv_timings(sd, &state->timings);
2639 2642
2640 edid_write_vga_segment(sd); 2643 edid_write_vga_segment(sd);
2641 edid_write_hdmi_segment(sd, 0); 2644 edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A);
2642 edid_write_hdmi_segment(sd, 1); 2645 edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_B);
2643 2646
2644 return ret; 2647 return ret;
2645} 2648}