summaryrefslogtreecommitdiff
path: root/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
diff options
context:
space:
mode:
authorMartin Dørum <dorum@noisolation.com>2023-04-13 13:54:36 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-09-27 10:39:54 +0300
commit89936bfbdf11f8758b852e7225a02e5fee57a1cd (patch)
tree45a8a722c0ac34ee97eddec36247e6bc3dd5191e /drivers/media/platform/qcom/camss/camss-vfe-4-1.c
parentef876db6a2bf412b550fd3cbdfdcc73ca9959420 (diff)
downloadlinux-89936bfbdf11f8758b852e7225a02e5fee57a1cd.tar.xz
media: qcom/camss: use 1X16 formats instead of 2X8
Platforms with qcom-camss use CSI-2, which means 1X16 is more correct than 2X8. The fact that qcom-camss supported only 2X8 meant it was incompatible with camera sensors it should have been compatible with. For example, the ov5645 driver (correctly) reports that its format is UYVY8_1X16 (after ba449bb56203aedc4530a82b0f3f83358808b7f2). Since qcom-camss only supports 2X8, the qcom-camss system is incompatible with the ov5645 driver, even though they should be compatible. This patch replaces all uses of UYVY8_2X8/VYUY8_2X8/YUYV8_2X8/YVYU8_2X8 with the equivalent 1X16 formats. Signed-off-by: Martin Dørum <dorum@noisolation.com> Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/qcom/camss/camss-vfe-4-1.c')
-rw-r--r--drivers/media/platform/qcom/camss/camss-vfe-4-1.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
index 42047b11ba52..bc309f326f51 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c
@@ -614,20 +614,20 @@ static void vfe_set_demux_cfg(struct vfe_device *vfe, struct vfe_line *line)
writel_relaxed(val, vfe->base + VFE_0_DEMUX_GAIN_1);
switch (line->fmt[MSM_VFE_PAD_SINK].code) {
- case MEDIA_BUS_FMT_YUYV8_2X8:
+ case MEDIA_BUS_FMT_YUYV8_1X16:
even_cfg = VFE_0_DEMUX_EVEN_CFG_PATTERN_YUYV;
odd_cfg = VFE_0_DEMUX_ODD_CFG_PATTERN_YUYV;
break;
- case MEDIA_BUS_FMT_YVYU8_2X8:
+ case MEDIA_BUS_FMT_YVYU8_1X16:
even_cfg = VFE_0_DEMUX_EVEN_CFG_PATTERN_YVYU;
odd_cfg = VFE_0_DEMUX_ODD_CFG_PATTERN_YVYU;
break;
- case MEDIA_BUS_FMT_UYVY8_2X8:
+ case MEDIA_BUS_FMT_UYVY8_1X16:
default:
even_cfg = VFE_0_DEMUX_EVEN_CFG_PATTERN_UYVY;
odd_cfg = VFE_0_DEMUX_ODD_CFG_PATTERN_UYVY;
break;
- case MEDIA_BUS_FMT_VYUY8_2X8:
+ case MEDIA_BUS_FMT_VYUY8_1X16:
even_cfg = VFE_0_DEMUX_EVEN_CFG_PATTERN_VYUY;
odd_cfg = VFE_0_DEMUX_ODD_CFG_PATTERN_VYUY;
break;
@@ -775,17 +775,17 @@ static void vfe_set_camif_cfg(struct vfe_device *vfe, struct vfe_line *line)
u32 val;
switch (line->fmt[MSM_VFE_PAD_SINK].code) {
- case MEDIA_BUS_FMT_YUYV8_2X8:
+ case MEDIA_BUS_FMT_YUYV8_1X16:
val = VFE_0_CORE_CFG_PIXEL_PATTERN_YCBYCR;
break;
- case MEDIA_BUS_FMT_YVYU8_2X8:
+ case MEDIA_BUS_FMT_YVYU8_1X16:
val = VFE_0_CORE_CFG_PIXEL_PATTERN_YCRYCB;
break;
- case MEDIA_BUS_FMT_UYVY8_2X8:
+ case MEDIA_BUS_FMT_UYVY8_1X16:
default:
val = VFE_0_CORE_CFG_PIXEL_PATTERN_CBYCRY;
break;
- case MEDIA_BUS_FMT_VYUY8_2X8:
+ case MEDIA_BUS_FMT_VYUY8_1X16:
val = VFE_0_CORE_CFG_PIXEL_PATTERN_CRYCBY;
break;
}