diff options
author | Martin Bugge <marbugge@cisco.com> | 2013-12-05 10:18:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-07 03:42:50 -0500 |
commit | 1961b7203ffaebe13fb463ffc5bc5da30bb7f8e3 (patch) | |
tree | 48009980b02ed66fa5e327dc61408a72f58d982f | |
parent | 019aa8be84bf543677146e2586412a2905ba99c0 (diff) |
[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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index e6932f46bf98..ecbe3f29c1ab 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) | |||
2696 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 2696 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
2697 | struct adv7842_state *state = to_state(sd); | 2697 | struct adv7842_state *state = to_state(sd); |
2698 | struct adv7842_platform_data *pdata = client->dev.platform_data; | 2698 | struct adv7842_platform_data *pdata = client->dev.platform_data; |
2699 | struct v4l2_dv_timings timings; | ||
2699 | int ret = 0; | 2700 | int ret = 0; |
2700 | 2701 | ||
2701 | if (!pdata) | 2702 | if (!pdata) |
@@ -2726,12 +2727,16 @@ static int adv7842_command_ram_test(struct v4l2_subdev *sd) | |||
2726 | 2727 | ||
2727 | enable_input(sd); | 2728 | enable_input(sd); |
2728 | 2729 | ||
2729 | adv7842_s_dv_timings(sd, &state->timings); | ||
2730 | |||
2731 | edid_write_vga_segment(sd); | 2730 | edid_write_vga_segment(sd); |
2732 | edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A); | 2731 | edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A); |
2733 | edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_B); | 2732 | edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_B); |
2734 | 2733 | ||
2734 | timings = state->timings; | ||
2735 | |||
2736 | memset(&state->timings, 0, sizeof(struct v4l2_dv_timings)); | ||
2737 | |||
2738 | adv7842_s_dv_timings(sd, &timings); | ||
2739 | |||
2735 | return ret; | 2740 | return ret; |
2736 | } | 2741 | } |
2737 | 2742 | ||