From patchwork Sun Oct 27 23:43:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 2238 Return-Path: Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 58E266017C for ; Mon, 28 Oct 2019 00:41:25 +0100 (CET) X-Originating-IP: 93.2.121.143 Received: from uno.localdomain (143.121.2.93.rev.sfr.net [93.2.121.143]) (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 10A7620003; Sun, 27 Oct 2019 23:41:24 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Mon, 28 Oct 2019 00:43:02 +0100 Message-Id: <20191027234312.35284-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/10] libcamera: Use DRM_FORMAT_* fourcc codes 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: Sun, 27 Oct 2019 23:41:25 -0000 Hello, this series moves libcamera to use the DRM/KMS defined DRM_FORMAT_* fourcc codes towards applications. The series starts by updating the kernel headers to v5.2 and importing the DRM/KMS required headers. It then introduces a PixelFormat type that aliases an uint32_t, which is used in all application facing types. The numerical fourcc codes used for PixelFormat are the DRM/KMS defined DRM_FORMAT_* fourcc codes. Helpers for conversion to/from PixelFormat and V4L2_PIX_FMT_* are provided in the V4L2 video device and used in all pipeline handlers. Finally the test application and QCam are ported to use te DRM/KMS defined pixel codes. Thanks Laurent for having looked at the series and fixed the nasty DRM/V4L2 RBG format conversion issues. Thanks j Jacopo Mondi (9): include: linux: Update headers to Linux v5.2 include: linux: Import DRM/KMS headers from Linux v5.2 include: drm_fourcc: Add Motion-JPEG fourcc code libcamera: Define PixelFormat type libcamera: stream: Use the newly defined PixelFormat libcamera: v4l2_videodevice: Add PixelFormat conversion libcamera: pipeline: Use PixelFormat for application formats qcam: Convert to use DRM formats test: camera: buffer_import: Use DRM/KMS format Laurent Pinchart (1): libcamera: formats: Write libcamera in lowercase include/libcamera/meson.build | 1 + include/libcamera/pixelformats.h | 18 + include/libcamera/stream.h | 13 +- include/linux/drm.h | 1042 ++++++++++++++++++++++ include/linux/drm_fourcc.h | 765 ++++++++++++++++ include/linux/drm_mode.h | 1032 +++++++++++++++++++++ include/linux/media-bus-format.h | 4 +- include/linux/media.h | 27 +- include/linux/v4l2-controls.h | 29 + include/linux/videodev2.h | 31 +- src/libcamera/formats.cpp | 2 +- src/libcamera/include/formats.h | 2 +- src/libcamera/include/v4l2_videodevice.h | 5 + src/libcamera/meson.build | 1 + src/libcamera/pipeline/ipu3/ipu3.cpp | 7 +- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 25 +- src/libcamera/pipeline/uvcvideo.cpp | 4 +- src/libcamera/pipeline/vimc.cpp | 15 +- src/libcamera/pixelformats.cpp | 28 + src/libcamera/stream.cpp | 17 +- src/libcamera/v4l2_videodevice.cpp | 141 +++ src/qcam/format_converter.cpp | 30 +- test/camera/buffer_import.cpp | 4 +- 23 files changed, 3170 insertions(+), 73 deletions(-) create mode 100644 include/libcamera/pixelformats.h create mode 100644 include/linux/drm.h create mode 100644 include/linux/drm_fourcc.h create mode 100644 include/linux/drm_mode.h create mode 100644 src/libcamera/pixelformats.cpp Reviewed-by: Laurent Pinchart --- 2.23.0