Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1961b720 authored by Martin Bugge's avatar Martin Bugge Committed by Mauro Carvalho Chehab
Browse files

[media] adv7842: composite sd-ram test, clear timings before setting



Must clear timings before setting after test to recover.

Signed-off-by: default avatarMartin Bugge <marbugge@cisco.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 019aa8be
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -2696,6 +2696,7 @@ static int adv7842_command_ram_test(struct v4l2_subdev *sd)
	struct i2c_client *client = v4l2_get_subdevdata(sd);
	struct i2c_client *client = v4l2_get_subdevdata(sd);
	struct adv7842_state *state = to_state(sd);
	struct adv7842_state *state = to_state(sd);
	struct adv7842_platform_data *pdata = client->dev.platform_data;
	struct adv7842_platform_data *pdata = client->dev.platform_data;
	struct v4l2_dv_timings timings;
	int ret = 0;
	int ret = 0;


	if (!pdata)
	if (!pdata)
@@ -2726,12 +2727,16 @@ static int adv7842_command_ram_test(struct v4l2_subdev *sd)


	enable_input(sd);
	enable_input(sd);


	adv7842_s_dv_timings(sd, &state->timings);

	edid_write_vga_segment(sd);
	edid_write_vga_segment(sd);
	edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A);
	edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_A);
	edid_write_hdmi_segment(sd, ADV7842_EDID_PORT_B);
	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;
	return ret;
}
}