From patchwork Thu Jul 24 06:52:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 23919 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0E73FBDCC1 for ; Thu, 24 Jul 2025 06:53:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 395DF69097; Thu, 24 Jul 2025 08:53:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BtFAsGJn"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D48126907F for ; Thu, 24 Jul 2025 08:53:14 +0200 (CEST) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E8CEA190D; Thu, 24 Jul 2025 08:52:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1753339956; bh=ZPQ+ZpDt9xQ1HfY5kYKlZDuS6l9xDcEmSc92qAz76LQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BtFAsGJnM8Wp1mGbqCbKyYeI04PiX2hN3y2Wx7angvvXkJCJZk69wQ1F1IetZWMJT 7fWrOG0eEo6afDOvZi3ndAGUl411OLRMpD1vIbNLXX/vhO+Suj5tFVlCrLAaTJFOZS dLEKOai5OgduDP/f1WNlk6sD8IPn4uibJupNnHEU= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally Subject: [PATCH 02/10] include: linux: Add RAWnn to drm_fourcc.h Date: Thu, 24 Jul 2025 07:52:48 +0100 Message-Id: <20250724065256.75175-3-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250724065256.75175-1-dan.scally@ideasonboard.com> References: <20250724065256.75175-1-dan.scally@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add entries to drm_fourcc.h for bayer order agnostic RAW formats at 10, 12, 14 and 20 bits. Add a modifier for the CRU format packing. These will need to be applied upstream, at which stage the script can maintain their presence here. Signed-off-by: Daniel Scally --- include/linux/drm_fourcc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h index db679877..7257f623 100644 --- a/include/linux/drm_fourcc.h +++ b/include/linux/drm_fourcc.h @@ -447,18 +447,21 @@ extern "C" { #define DRM_FORMAT_SGRBG10 fourcc_code('B', 'A', '1', '0') #define DRM_FORMAT_SGBRG10 fourcc_code('G', 'B', '1', '0') #define DRM_FORMAT_SBGGR10 fourcc_code('B', 'G', '1', '0') +#define DRM_FORMAT_RAW10 fourcc_code('R', 'W', '1', '0') /* 12-bit Bayer formats */ #define DRM_FORMAT_SRGGB12 fourcc_code('R', 'G', '1', '2') #define DRM_FORMAT_SGRBG12 fourcc_code('B', 'A', '1', '2') #define DRM_FORMAT_SGBRG12 fourcc_code('G', 'B', '1', '2') #define DRM_FORMAT_SBGGR12 fourcc_code('B', 'G', '1', '2') +#define DRM_FORMAT_RAW12 fourcc_code('R', 'W', '1', '2') /* 14-bit Bayer formats */ #define DRM_FORMAT_SRGGB14 fourcc_code('R', 'G', '1', '4') #define DRM_FORMAT_SGRBG14 fourcc_code('B', 'A', '1', '4') #define DRM_FORMAT_SGBRG14 fourcc_code('G', 'B', '1', '4') #define DRM_FORMAT_SBGGR14 fourcc_code('B', 'G', '1', '4') +#define DRM_FORMAT_RAW14 fourcc_code('R', 'W', '1', '4') /* 16-bit Bayer formats */ #define DRM_FORMAT_SRGGB16 fourcc_code('R', 'G', 'B', '6') @@ -466,6 +469,9 @@ extern "C" { #define DRM_FORMAT_SGBRG16 fourcc_code('G', 'B', '1', '6') #define DRM_FORMAT_SBGGR16 fourcc_code('B', 'Y', 'R', '2') +/* 20-bit Bayer formats */ +#define DRM_FORMAT_RAW20 fourcc_code('R', 'W', '2', '0') + /* * Format Modifiers: * @@ -491,6 +497,7 @@ extern "C" { #define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a #define DRM_FORMAT_MOD_VENDOR_MIPI 0x0b #define DRM_FORMAT_MOD_VENDOR_RPI 0x0c +#define DRM_FORMAT_MOD_VENDOR_RENESAS 0x0d /* add more to the end as needed */ @@ -1692,6 +1699,8 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) #define PISP_FORMAT_MOD_COMPRESS_MODE1 fourcc_mod_code(RPI, 1) #define PISP_FORMAT_MOD_COMPRESS_MODE2 fourcc_mod_code(RPI, 2) +#define RENESAS_CRU_FORMAT_MOD_PACKED fourcc_mod_code(RENESAS, 1) + #if defined(__cplusplus) } #endif