From: Martin Bugge Date: Thu, 5 Dec 2013 15:18:14 +0000 (-0300) Subject: [media] adv7842: composite sd-ram test, clear timings before setting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1961b7203ffaebe13fb463ffc5bc5da30bb7f8e3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] adv7842: composite sd-ram test, clear timings before setting Must clear timings before setting after test to recover. Signed-off-by: Martin Bugge Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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) 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; }