summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Bugge <marbugge@cisco.com>2013-12-05 12:18:14 -0300
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:55:30 +0900
commit76fd7d99a5a4c175507f3f5a5b58e5d753249371 (patch)
tree802375c4e949fb3325f5063924776ee0d37a96c4
parent8629a50ec2fc01bb931969cb78a03dbb8d1ed1a5 (diff)
downloadlinux-3.10-76fd7d99a5a4c175507f3f5a5b58e5d753249371.tar.gz
linux-3.10-76fd7d99a5a4c175507f3f5a5b58e5d753249371.tar.bz2
linux-3.10-76fd7d99a5a4c175507f3f5a5b58e5d753249371.zip
upstream: [media] adv7842: composite sd-ram test, clear timings before setting
Must clear timings before setting after test to recover. 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, 7 insertions, 2 deletions
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index ed22dd15e21..890095b389a 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -2696,6 +2696,7 @@ static int adv7842_command_ram_test(struct v4l2_subdev *sd)
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct adv7842_state *state = to_state(sd);
struct adv7842_platform_data *pdata = client->dev.platform_data;
+ struct v4l2_dv_timings timings;
int ret = 0;
if (!pdata)
@@ -2726,12 +2727,16 @@ static int adv7842_command_ram_test(struct v4l2_subdev *sd)
enable_input(sd);
- adv7842_s_dv_timings(sd, &state->timings);
-
edid_write_vga_segment(sd);
edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A);
edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_B);
+ timings = state->timings;
+
+ memset(&state->timings, 0, sizeof(struct v4l2_dv_timings));
+
+ adv7842_s_dv_timings(sd, &timings);
+
return ret;
}