summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHelen Koike <helen.koike@collabora.com>2019-07-30 16:10:07 -0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-08-09 01:02:57 +0300
commitc91d7bb98039e216ad2544e9052949f1466c5261 (patch)
tree712f5675c600eb15ac8484944019ee64cebe48a3 /src
parent9ecc60e10c96d1abd7d68899831e3ab143a16520 (diff)
libcamera: pipeline: RKISP1 configure isp output pad
ISP output pad should be set to YUYV8_2X8 for non-bayer output format. Bayer formats are not listed in RkISP1CameraConfiguration::validate(), only non-bayer are listed, so we can set YUYV8_2X8 directly. This will need to be changed if we add support for bayer output with libcamera. Signed-off-by: Helen Koike <helen.koike@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index efa9604b..de4ab523 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -286,6 +286,8 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
if (ret < 0)
return ret;
+ LOG(RkISP1, Debug) << "Configuring ISP input pad with " << format.toString();
+
ret = dphy_->getFormat(1, &format);
if (ret < 0)
return ret;
@@ -294,6 +296,18 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
if (ret < 0)
return ret;
+ LOG(RkISP1, Debug) << "ISP input pad configured with " << format.toString();
+
+ /* YUYV8_2X8 is required on the ISP source path pad for YUV output. */
+ format.mbus_code = MEDIA_BUS_FMT_YUYV8_2X8;
+ LOG(RkISP1, Debug) << "Configuring ISP output pad with " << format.toString();
+
+ ret = isp_->setFormat(2, &format);
+ if (ret < 0)
+ return ret;
+
+ LOG(RkISP1, Debug) << "ISP output pad configured with " << format.toString();
+
V4L2DeviceFormat outputFormat = {};
outputFormat.fourcc = cfg.pixelFormat;
outputFormat.size = cfg.size;