From patchwork Wed Jul 3 20:21:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helen Koike X-Patchwork-Id: 1598 Return-Path: Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4040D6101B for ; Wed, 3 Jul 2019 22:22:11 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id 9C90928AAFB From: Helen Koike To: libcamera-devel@lists.libcamera.org Cc: laurent.pinchart@ideasonboard.com, kernel@collabora.com, Helen Koike Date: Wed, 3 Jul 2019 17:21:54 -0300 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] libcamera: pipeline: RKISP1 configure isp output pad X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2019 20:22:11 -0000 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 need to be changed if we add support for bayer output with libcamera. Signed-off-by: Helen Koike --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 358e2c8..fc04cf8 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -279,13 +279,23 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) LOG(RkISP1, Debug) << "Sensor configured with " << format.toString(); - LOG(RkISP1, Debug) << "Configuring ISP with " << format.toString(); + LOG(RkISP1, Debug) << "Configuring ISP input pad with " << format.toString(); ret = isp_->setFormat(0, &format); if (ret < 0) return ret; - LOG(RkISP1, Debug) << "ISP configured with " << format.toString(); + LOG(RkISP1, Debug) << "ISP input pad configured with " << format.toString(); + + /* YUYV8_2X8 is required in ISP pad 1 for non-bayer 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;