From patchwork Fri Jun 30 14:40:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Anikiel?= X-Patchwork-Id: 698386 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C97DBEB64DC for ; Fri, 30 Jun 2023 14:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232691AbjF3Okd (ORCPT ); Fri, 30 Jun 2023 10:40:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232661AbjF3Ok3 (ORCPT ); Fri, 30 Jun 2023 10:40:29 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D4DE3AA4 for ; Fri, 30 Jun 2023 07:40:27 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fa48b5dc2eso3292460e87.1 for ; Fri, 30 Jun 2023 07:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; t=1688136025; x=1690728025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8v3MtXxbIi9CkWhq0qdzoruMHr5eKjgstWlIhBmdOPg=; b=Y+fs485ZRswLUAJU3sgZvDsMrlqFIlnbx4zfJCKttLjFDY1pqMFhpKFJwU4dqh1JRl QlfmSEN8KRL5GJyLcWBxyd1mD1Cy96k2RA7AnPoY0piwC6kSzZoJmgAR40gLSjy6z6DA k/rQgeY6DrBwu+QFx/NywdREEMUSeGQFqxf6tj3aJyguvyt9yqbtCa0TGTLQ+fz1nXk9 IMpDB/lRypHBpk6iPpyrXzA/N3DGovO9ov2c0K7DEl9u4eJemZxaIfDorp9dYS23U5iU TZmRqwf61HRXjqc4T5o3cPFVQRQ8Y7X3gvMyhRE7/TO7ut+VnhQEeHrN/FHrK1Cxx8Hz lOsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688136025; x=1690728025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8v3MtXxbIi9CkWhq0qdzoruMHr5eKjgstWlIhBmdOPg=; b=R5TwUpN0xr57ZwMPuCSxPbVoDuWf/vFJSG4PzsQv4l090cfYWM7EZJz4LW4DcDsGo5 CyCgss1lTVzNO/nvhE9AR432X/VxZhIEailVS6bdBBjUWSa3k1Eb8tFQGivMJk+125Ng xGKTnQg/8VYmcbTRaxGgocGAjHuV6OwQNchQ/TenahZoqzmHjWceNI1ssjJ58xDyfGre xEkhJSQGhlRXb3IO0eBCZTnr3gSPOLTySlHimhpp0HLrSJ9fyMDfU7Ode3p8O6dquDb+ 69ULSRjnFju/71yosY8pD8687+5ah0SpaEA1Biu4uRPHi0UsdJoJhT/1Wk6je8u3HWMc MPjQ== X-Gm-Message-State: ABy/qLYzTZoTNh9jsZfsTyWWIEyyKnlDU6VaQJrLST0NtqIVzvbCiMJA xuCYJRY9IHW0T5M9jeKDggjtTg== X-Google-Smtp-Source: APBJJlE4jASW+KjZ+d/WKrIUL9kQA541uUhAf+TfgyMfdxiroxUgVP9ET45dNgRcafBouHYVUK7Y0w== X-Received: by 2002:a05:6512:ea0:b0:4f8:6882:ae9d with SMTP id bi32-20020a0565120ea000b004f86882ae9dmr2984390lfb.69.1688136025539; Fri, 30 Jun 2023 07:40:25 -0700 (PDT) Received: from panikiel.roam.corp.google.com (staticline-31-182-201-26.toya.net.pl. [31.182.201.26]) by smtp.gmail.com with ESMTPSA id b7-20020a056512024700b004f85d80ca64sm2750402lfo.221.2023.06.30.07.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 07:40:25 -0700 (PDT) From: =?utf-8?q?Pawe=C5=82_Anikiel?= To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: dinguyen@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, mchehab@kernel.org, upstream@semihalf.com, amstan@chromium.org, ribalda@chromium.org, =?utf-8?q?Pawe=C5=82_Anikiel?= Subject: [RFC PATCH 1/3] media: Add 10, 12, and 16 bit RGB formats Date: Fri, 30 Jun 2023 16:40:04 +0200 Message-ID: <20230630144006.1513270-2-pan@semihalf.com> X-Mailer: git-send-email 2.41.0.255.g8b1d071c50-goog In-Reply-To: <20230630144006.1513270-1-pan@semihalf.com> References: <20230630144006.1513270-1-pan@semihalf.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add the RGB30U, RGB30L, RGB36U, RGB36L, and RGB48 pixel formats. Signed-off-by: Paweł Anikiel --- drivers/media/v4l2-core/v4l2-ioctl.c | 5 +++++ include/uapi/linux/videodev2.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index a858acea6547..5ee616704225 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1300,6 +1300,11 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_ARGB2101010: descr = "32-bit ARGB 2-10-10-10"; break; case V4L2_PIX_FMT_BGR48_12: descr = "12-bit Depth BGR"; break; case V4L2_PIX_FMT_ABGR64_12: descr = "12-bit Depth BGRA"; break; + case V4L2_PIX_FMT_RGB30U: descr = "30-bit RXGXBX-10-10-10"; break; + case V4L2_PIX_FMT_RGB30L: descr = "30-bit XRXGXB-10-10-10"; break; + case V4L2_PIX_FMT_RGB36U: descr = "36-bit RXGXBX-12-12-12"; break; + case V4L2_PIX_FMT_RGB36L: descr = "36-bit XRXGXB-12-12-12"; break; + case V4L2_PIX_FMT_RGB48: descr = "48-bit RGB-16-16-16"; break; case V4L2_PIX_FMT_GREY: descr = "8-bit Greyscale"; break; case V4L2_PIX_FMT_Y4: descr = "4-bit Greyscale"; break; case V4L2_PIX_FMT_Y6: descr = "6-bit Greyscale"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index aee75eb9e686..3568819eabeb 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -583,6 +583,11 @@ struct v4l2_pix_format { /* RGB formats (6 or 8 bytes per pixel) */ #define V4L2_PIX_FMT_BGR48_12 v4l2_fourcc('B', '3', '1', '2') /* 48 BGR 12-bit per component */ #define V4L2_PIX_FMT_ABGR64_12 v4l2_fourcc('B', '4', '1', '2') /* 64 BGRA 12-bit per component */ +#define V4L2_PIX_FMT_RGB30U v4l2_fourcc('R', '3', '0', 'U') /* 30 RXGXBX-10-10-10 */ +#define V4L2_PIX_FMT_RGB30L v4l2_fourcc('R', '3', '0', 'L') /* 30 XRXGXB-10-10-10 */ +#define V4L2_PIX_FMT_RGB36U v4l2_fourcc('R', '3', '6', 'U') /* 36 RXGXBX-12-12-12 */ +#define V4L2_PIX_FMT_RGB36L v4l2_fourcc('R', '3', '6', 'L') /* 36 XRXGXB-12-12-12 */ +#define V4L2_PIX_FMT_RGB48 v4l2_fourcc('R', 'G', 'B', '6') /* 48 RGB-16-16-16 */ /* Grey formats */ #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */