summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/adv7180.c
diff options
context:
space:
mode:
authorNiklas Söderlund2016-09-02 17:37:06 +0200
committerMauro Carvalho Chehab2016-09-19 21:30:20 +0200
commit6de690dd4e78b1bfd8e6777905203e55649d4d52 (patch)
tree3cec7f8e28b8e683eaef9780f6159ef5f52cf5a5 /drivers/media/i2c/adv7180.c
parent[media] soc-camera/rcar-vin: remove obsolete driver (diff)
downloadkernel-qcow2-linux-6de690dd4e78b1bfd8e6777905203e55649d4d52.tar.gz
kernel-qcow2-linux-6de690dd4e78b1bfd8e6777905203e55649d4d52.tar.xz
kernel-qcow2-linux-6de690dd4e78b1bfd8e6777905203e55649d4d52.zip
[media] adv7180: rcar-vin: change mbus format to UYVY
The media bus format reported by the adv7180 is wrong. Steve Longerbeam posted a patch which changed the format to UYVY8_2X8 with the commit message: Change the media bus format from YUYV8_2X8 to UYVY8_2X8. Colors now look correct when capturing with the i.mx6 backend. The other option is to set the SWPC bit in register 0x27 to swap the Cr and Cb output samples. The rcar-vin driver was developed and tested with the adv7180 and therefor suffers from the same issue, looking for the wrong media bus format. The two errors corrected each other. This patch takes Steve's patch and merge it with a fix for rcar-vin driver. The rcar-vin driver is used used in together with the adv7180 och Koelsch and this ensures it will not break while fixing the adv7180 issue. I checked wit Steve and he was fine with me merging the patches. ADV7180 parts: Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Suggested-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Tim Harvey <tharvey@gateworks.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/adv7180.c')
-rw-r--r--drivers/media/i2c/adv7180.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 515ea6ae41d7..a6ac78bef4f6 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -633,7 +633,7 @@ static int adv7180_enum_mbus_code(struct v4l2_subdev *sd,
if (code->index != 0)
return -EINVAL;
- code->code = MEDIA_BUS_FMT_YUYV8_2X8;
+ code->code = MEDIA_BUS_FMT_UYVY8_2X8;
return 0;
}
@@ -643,7 +643,7 @@ static int adv7180_mbus_fmt(struct v4l2_subdev *sd,
{
struct adv7180_state *state = to_state(sd);
- fmt->code = MEDIA_BUS_FMT_YUYV8_2X8;
+ fmt->code = MEDIA_BUS_FMT_UYVY8_2X8;
fmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
fmt->width = 720;
fmt->height = state->curr_norm & V4L2_STD_525_60 ? 480 : 576;