From: Martin Bugge <[email protected]>
Signed-off-by: Martin Bugge <[email protected]>
Cc: Mats Randgaard <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
---
drivers/media/i2c/adv7842.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index 943e578..bff8314 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)
/* Disable I2C access to internal EDID ram from HDMI DDC ports */
rep_write_and_or(sd, 0x77, 0xf3, 0x00);
+ if (!state->hdmi_edid.present)
+ return 0;
+
/* edid segment pointer '0' for HDMI ports */
rep_write_and_or(sd, 0x77, 0xef, 0x00);
@@ -2636,8 +2639,8 @@ static int adv7842_command_ram_test(struct v4l2_subdev
*sd)
adv7842_s_dv_timings(sd, &state->timings);
edid_write_vga_segment(sd);
- edid_write_hdmi_segment(sd, 0);
- edid_write_hdmi_segment(sd, 1);
+ edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A);
+ edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_B);
return ret;
}
--
1.8.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html