提交 092e321a 编写于 作者: N Niklas Söderlund 提交者: Hans Verkuil

media: i2c: adv748x: Report correct DV timings for pattern generator

If the pattern generator is enabled the device shall not be queried for
timings. Instead the timings programmed shall be reported as they are
the ones being used to generate the pattern.

Before this change an external HDMI source needed to be connected for
the pattern generator to work. The driver would query this external
HDMI source for timings and program the pattern generator using those.

With this change the user can control the timings and have the pattern
generator work without the need of an external HDMI source being
connected.
Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
上级 8a7bc891
......@@ -283,6 +283,16 @@ static int adv748x_hdmi_query_dv_timings(struct v4l2_subdev *sd,
memset(timings, 0, sizeof(struct v4l2_dv_timings));
/*
* If the pattern generator is enabled the device shall not be queried
* for timings. Instead the timings programmed shall be reported as they
* are the ones being used to generate the pattern.
*/
if (cp_read(state, ADV748X_CP_PAT_GEN) & ADV748X_CP_PAT_GEN_EN) {
*timings = hdmi->timings;
return 0;
}
if (!adv748x_hdmi_has_signal(state))
return -ENOLINK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册