mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
media: i2c: adv7180: Use MEDIA_BUS_FMT_UYVY8_1X16 for CSI2 output
CSI2 devices are meant to use the 1Xnn formats rather than 2Xnn such as MEDIA_BUS_FMT_UYVY8_2X8. For devices with ADV7180_FLAG_MIPI_CSI2 set, use MEDIA_BUS_FMT_UYVY8_1X16. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
478d1cbda9
commit
ac27e92230
@@ -707,9 +707,14 @@ static int adv7180_enum_mbus_code(struct v4l2_subdev *sd,
|
|||||||
struct v4l2_subdev_state *sd_state,
|
struct v4l2_subdev_state *sd_state,
|
||||||
struct v4l2_subdev_mbus_code_enum *code)
|
struct v4l2_subdev_mbus_code_enum *code)
|
||||||
{
|
{
|
||||||
|
struct adv7180_state *state = to_state(sd);
|
||||||
|
|
||||||
if (code->index != 0)
|
if (code->index != 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2)
|
||||||
|
code->code = MEDIA_BUS_FMT_UYVY8_1X16;
|
||||||
|
else
|
||||||
code->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
code->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -720,6 +725,9 @@ static int adv7180_mbus_fmt(struct v4l2_subdev *sd,
|
|||||||
{
|
{
|
||||||
struct adv7180_state *state = to_state(sd);
|
struct adv7180_state *state = to_state(sd);
|
||||||
|
|
||||||
|
if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2)
|
||||||
|
fmt->code = MEDIA_BUS_FMT_UYVY8_1X16;
|
||||||
|
else
|
||||||
fmt->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
fmt->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
||||||
fmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
|
fmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
|
||||||
fmt->width = 720;
|
fmt->width = 720;
|
||||||
|
|||||||
Reference in New Issue
Block a user