summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/adv748x
diff options
context:
space:
mode:
authorKieran Bingham2018-01-08 19:14:04 +0100
committerMauro Carvalho Chehab2018-02-26 14:16:59 +0100
commit9f564184e6cc21a86c26bab920afac1bab7653ff (patch)
tree0fe506a39abcddb05f1f5d0b13a6550d4e7c3e9d /drivers/media/i2c/adv748x
parentmedia: v4l: doc: Clarify v4l2_mbus_fmt height definition (diff)
downloadkernel-qcow2-linux-9f564184e6cc21a86c26bab920afac1bab7653ff.tar.gz
kernel-qcow2-linux-9f564184e6cc21a86c26bab920afac1bab7653ff.tar.xz
kernel-qcow2-linux-9f564184e6cc21a86c26bab920afac1bab7653ff.zip
media: i2c: adv748x: fix HDMI field heights
The ADV748x handles interlaced media using V4L2_FIELD_ALTERNATE field types. The correct specification for the height on the mbus is the image height, in this instance, the field height. The AFE component already correctly adjusts the height on the mbus, but the HDMI component got left behind. Adjust the mbus height to correctly describe the image height of the fields when processing interlaced video for HDMI pipelines. Fixes: 3e89586a64df ("media: i2c: adv748x: add adv748x driver") Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/adv748x')
-rw-r--r--drivers/media/i2c/adv748x/adv748x-hdmi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c
index 4da4253553fc..10d229a4f088 100644
--- a/drivers/media/i2c/adv748x/adv748x-hdmi.c
+++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c
@@ -105,6 +105,9 @@ static void adv748x_hdmi_fill_format(struct adv748x_hdmi *hdmi,
fmt->width = hdmi->timings.bt.width;
fmt->height = hdmi->timings.bt.height;
+
+ if (fmt->field == V4L2_FIELD_ALTERNATE)
+ fmt->height /= 2;
}
static void adv748x_fill_optional_dv_timings(struct v4l2_dv_timings *timings)