From patchwork Tue Jun 23 02:11:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 4138 Return-Path: Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3492A603BD for ; Tue, 23 Jun 2020 04:11:39 +0200 (CEST) X-Halon-ID: dae86c4a-b4f6-11ea-933e-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p4fca2eca.dip0.t-ipconnect.de [79.202.46.202]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id dae86c4a-b4f6-11ea-933e-005056917a89; Tue, 23 Jun 2020 04:11:38 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Tue, 23 Jun 2020 04:11:30 +0200 Message-Id: <20200623021130.1782426-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: formats: Add formats for IPU3 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 02:11:39 -0000 When replacing DRM FourCCs with libcamera formats IPU3 format descriptors where missing resulting in RAW capture not being possible. Fix this by adding the missing descriptors. Fixes: 56c99424edd64c5a ("libcamera: pipeline: Replace explicit DRM FourCCs with libcamera formats") Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/libcamera/formats.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 97e986786cc810b8..1272de29c802c539 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -421,6 +421,34 @@ const std::map pixelFormatInfo{ .colourEncoding = PixelFormatInfo::ColourEncodingRAW, .packed = true, } }, + { formats::SBGGR10_IPU3, { + .format = formats::SBGGR10_IPU3, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SBGGR10), + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = true, + } }, + { formats::SGBRG10_IPU3, { + .format = formats::SGBRG10_IPU3, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGBRG10), + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = true, + } }, + { formats::SGRBG10_IPU3, { + .format = formats::SGRBG10_IPU3, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGRBG10), + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = true, + } }, + { formats::SRGGB10_IPU3, { + .format = formats::SRGGB10_IPU3, + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SRGGB10), + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = true, + } }, /* Compressed formats. */ { formats::MJPEG, {