Skip to contentSkip to conversation

gpu: ipu-cpmem: add 16-bit grayscale support to ipu_cpmem_set_image

PATCH New Philipp Zabel 1 participant 2 messages Feb 19, 2018

Subsystems (2)
lore
Share & tools
lore

Philipp Zabel

author maintainer
#0 lore raw

PATCH 1/2 gpu: ipu-cpmem: add 16-bit grayscale support to ipu_cpmem_set_image

Add the missing offset calculation for 16-bit grayscale images. Since the IPU only supports capturing greyscale in raw passthrough mode, it is the same as 16-bit bayer formats.

---
 drivers/gpu/ipu-v3/ipu-cpmem.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/ipu-v3/ipu-cpmem.c +1 -0
index ef32377b91c0..9f2d9ec42add 100644
@@ -795,6 +795,7 @@ int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image)
 	case V4L2_PIX_FMT_SGBRG16:
 	case V4L2_PIX_FMT_SGRBG16:
 	case V4L2_PIX_FMT_SRGGB16:
+	case V4L2_PIX_FMT_Y16:
 		offset = image->rect.left * 2 +
 			 image->rect.top * pix->bytesperline;
 		break;
Signature · 6 lines
2.16.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#1 lore raw

PATCH 2/2 gpu: ipu-csi: add 10/12-bit grayscale support to mbus_code_to_bus_cfg

From: Jan Luebbe <[email protected]>

The 10/12-bit config used for bayer formats is used for grayscale as well.

---
 drivers/gpu/ipu-v3/ipu-csi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/ipu-v3/ipu-csi.c +2 -0
index 24e12b87a0cb..caa05b0702e1 100644
@@ -288,6 +288,7 @@ static int mbus_code_to_bus_cfg(struct ipu_csi_bus_config *cfg, u32 mbus_code)
 	case MEDIA_BUS_FMT_SGBRG10_1X10:
 	case MEDIA_BUS_FMT_SGRBG10_1X10:
 	case MEDIA_BUS_FMT_SRGGB10_1X10:
+	case MEDIA_BUS_FMT_Y10_1X10:
 		cfg->data_fmt = CSI_SENS_CONF_DATA_FMT_BAYER;
 		cfg->mipi_dt = MIPI_DT_RAW10;
 		cfg->data_width = IPU_CSI_DATA_WIDTH_10;
@@ -296,6 +297,7 @@ static int mbus_code_to_bus_cfg(struct ipu_csi_bus_config *cfg, u32 mbus_code)
 	case MEDIA_BUS_FMT_SGBRG12_1X12:
 	case MEDIA_BUS_FMT_SGRBG12_1X12:
 	case MEDIA_BUS_FMT_SRGGB12_1X12:
+	case MEDIA_BUS_FMT_Y12_1X12:
 		cfg->data_fmt = CSI_SENS_CONF_DATA_FMT_BAYER;
 		cfg->mipi_dt = MIPI_DT_RAW12;
 		cfg->data_width = IPU_CSI_DATA_WIDTH_12;
Signature · 6 lines
2.16.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel