From patchwork Thu Dec 19 05:49:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jungo Lin X-Patchwork-Id: 11302673 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96E7013B6 for ; Thu, 19 Dec 2019 05:50:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67A4B21582 for ; Thu, 19 Dec 2019 05:50:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IHLXUm8S"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="tr/nwbGq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67A4B21582 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hQYCorMpkl1qkBTxqVRBUZj7O1SwXlcuBW+sN8IFrKw=; b=IHLXUm8SKyadUg YsMuvIjyKHFenaYCgsOHiJKW8LGEm9G3UGYiERPLX8IeGqYfHUPHkHT2UCZ7QyIb6ubRd4zTgL/CS SSTz8rbxrqkKt11xboCnh5USuHqtG7HTUmCnhNsUZb5B3X9Xqrj0HkKjjPykjudR/KZS4tzAhrb55 kim9MCB0Dph2r9vWBhvi4tUS9+jdnBkIS7EacRGqEiyCded7D48iClUTn5BP4/DOksZ2HGkQQJokU dEtzfQHl0Nm0P/tapILnvCcYOSTMn0DNUx5GW3BWBXw0CA28fkmUqvmLwNPzR72lsjX4qOqwk9HtG huf2vKvrTbpa+plNtZEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihohW-0007Pa-Ea; Thu, 19 Dec 2019 05:50:18 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihohS-0006V6-W8; Thu, 19 Dec 2019 05:50:16 +0000 X-UUID: 0d496d9b5cd54846aad32e14aff1cc6f-20191218 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Reply-To:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=u/vWTAbZlH4j2bhnD+Ag+oO8onBzT6jpu+qmICQf9Ow=; b=tr/nwbGqcaGoaE72kPiTaqCQU//ZnnqQGCiOssNfBUgW0Tyz6NFJkRL1M+BQrrzKOaYYJx4gm5waoYu+EPRnNhDVYpUwUsJl5jOmYKrOaKg4wQPkAoF9DI+VTbFvne4S0Zh+Z8ybOI3zWsJgIbDayqe1s49Iqx4ef4py+nbJxjU=; X-UUID: 0d496d9b5cd54846aad32e14aff1cc6f-20191218 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 943656058; Wed, 18 Dec 2019 21:50:08 -0800 Received: from MTKMBS01N2.mediatek.inc (172.21.101.79) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 18 Dec 2019 21:50:21 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 19 Dec 2019 13:49:31 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 19 Dec 2019 13:50:08 +0800 From: Jungo Lin To: , , , , Subject: [v6, 1/5] media: dt-bindings: mt8183: Added camera ISP Pass 1 Date: Thu, 19 Dec 2019 13:49:26 +0800 Message-ID: <20191219054930.29513-2-jungo.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191219054930.29513-1-jungo.lin@mediatek.com> References: <20191219054930.29513-1-jungo.lin@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 3424BFE6CB592FD6D869534D12E758F930287C42C4EAF56ABF1438AC5279C5E72000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191218_215015_054858_87F7FE97 X-CRM114-Status: GOOD ( 10.79 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jungo Lin Cc: shik@chromium.org, devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, suleiman@chromium.org, Rynn.Wu@mediatek.com, srv_heupstream@mediatek.com, robh@kernel.org, ryan.yu@mediatek.com, Jerry-ch.Chen@mediatek.com, frankie.chiu@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, ddavenport@chromium.org, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds DT binding document for the Pass 1 (P1) unit in Mediatek's camera ISP system. The Pass 1 unit grabs the sensor data out from the sensor interface, applies ISP image effects from tuning data and outputs the image data or statistics data to DRAM. Reviewed-by: Rob Herring Signed-off-by: Jungo Lin --- Changes from v6: - Add port node description in the dt-binding document. --- .../bindings/media/mediatek,camisp.txt | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek,camisp.txt diff --git a/Documentation/devicetree/bindings/media/mediatek,camisp.txt b/Documentation/devicetree/bindings/media/mediatek,camisp.txt new file mode 100644 index 000000000000..a85f37c0b87d --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,camisp.txt @@ -0,0 +1,83 @@ +* Mediatek Image Signal Processor Pass 1 (ISP P1) + +The Pass 1 unit of Mediatek's camera ISP system grabs the sensor data out +from the sensor interface, applies ISP effects from tuning data and outputs +the image data and statistics data to DRAM. Furthermore, Pass 1 unit has +the ability to output two different resolutions frames at the same time to +increase the performance of the camera application. + +Required properties: +- compatible: Must be "mediatek,mt8183-camisp" for MT8183. +- reg: Physical base address of the camera function block register and + length of memory mapped region. Must contain an entry for each entry + in reg-names. +- reg-names: Must include the following entries: + "cam_sys": Camera base function block + "cam_uni": Camera UNI function block + "cam_a": Camera ISP P1 hardware unit A + "cam_b": Camera ISP P1 hardware unit B + "cam_c": Camera ISP P1 hardware unit C +- interrupts: Must contain an entry for each entry in interrupt-names. +- interrupt-names : Must include the following entries: + "cam_uni": Camera UNI interrupt + "cam_a": Camera unit A interrupt + "cam_b": Camera unit B interrupt + "cam_c": Camera unit C interrupt +- iommus: Shall point to the respective IOMMU block with master port + as argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt + for details. +- clocks: A list of phandle and clock specifier pairs as listed + in clock-names property, see + Documentation/devicetree/bindings/clock/clock-bindings.txt for details. +- clock-names: Must be "camsys_cam_cgpdn" and "camsys_camtg_cgpdn". +- mediatek,larb: Must contain the local arbiters in the current SoCs, see + Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt + for details. +- power-domains: a phandle to the power domain, see + Documentation/devicetree/bindings/power/power_domain.txt for details. +- mediatek,scp: The node of system control processor (SCP), see + Documentation/devicetree/bindings/remoteproc/mtk,scp.txt for details. +- port: child port node corresponding to the data input, in accordance with + the video interface bindings defined in + Documentation/devicetree/bindings/media/video-interfaces.txt. The port + node must contain at least one endpoint. + +Example: +SoC specific DT entry: + + camisp: camisp@1a000000 { + compatible = "mediatek,mt8183-camisp"; + reg = <0 0x1a000000 0 0x1000>, + <0 0x1a003000 0 0x1000>, + <0 0x1a004000 0 0x2000>, + <0 0x1a006000 0 0x2000>, + <0 0x1a008000 0 0x2000>; + reg-names = "cam_sys", + "cam_uni", + "cam_a", + "cam_b", + "cam_c"; + interrupts = , + , + , + ; + interrupt-names = "cam_uni", + "cam_a", + "cam_b", + "cam_c"; + iommus = <&iommu M4U_PORT_CAM_IMGO>; + clocks = <&camsys CLK_CAM_CAM>, + <&camsys CLK_CAM_CAMTG>; + clock-names = "camsys_cam_cgpdn", + "camsys_camtg_cgpdn"; + mediatek,larb = <&larb3>, + <&larb6>; + power-domains = <&scpsys MT8183_POWER_DOMAIN_CAM>; + mediatek,scp = <&scp>; + + port { + camisp_endpoint: endpoint { + remote-endpoint = <&seninf_camisp_endpoint>; + }; + }; + }; From patchwork Thu Dec 19 05:49:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jungo Lin X-Patchwork-Id: 11302683 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 068F414E3 for ; Thu, 19 Dec 2019 06:00:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4520227BF for ; Thu, 19 Dec 2019 06:00:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k4P3KVJG"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="G+mRv7qv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4520227BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XQt/jyYPRuvBeYmi4DtNGlBmMZWSF7ttZdGr8/39YwM=; b=k4P3KVJGsKAWWI 37qxMaeF5TM5E6dCm2JAXk8bC7ityZofAPINJACaMcmTCxjUwvEvyuapBSeGamgpUM678w3hl0YI+ jBprEcPA5rVTDNrsqyV/2TIOZFibQO/Q6twJ/nGMuvWqMqO61R27kf35HNbfa8YRnQI8Ozb5iRYvq zth9vnaZTk9PUONy8McZ0+2Z3vaN3+ZlVIawuZp8JrqOF3RkKZqW+r1bQlWiS2VlMu2GQTYj0gmm4 DPBrKEvJRdbJ4QS3pDPBsISqT9ldrwMMXzEtQ9/jSi1mH78FiqTpro8sLge0l+3Bxl20ySPtp6N1J kb0iMPlrYJ2KyLpR9IFw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihorB-0002rV-6I; Thu, 19 Dec 2019 06:00:17 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihor7-0002pR-7O; Thu, 19 Dec 2019 06:00:14 +0000 X-UUID: ea218c33c6324934a78fefe4c0651258-20191218 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Reply-To:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=8+udwW9ydlC4KQTtYur2M+Ty/WRaWGdCUNJ2Tn5kvRU=; b=G+mRv7qvbKhffGUM7KF9OyC5kQODHjZzQeI+Vpb6BmvgBmLUR0NirDIpkYKLuyyJPHcUuBPllXCYEsu74SqTorq67P4Rhbu7rYA2ZV22QxY7LMu74aU4YIO3+cyTInJLaV0fFZBR9+S+Qb+tTgelWHfcuSfySplDald8tbsbqro=; X-UUID: ea218c33c6324934a78fefe4c0651258-20191218 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 762922666; Wed, 18 Dec 2019 22:00:12 -0800 Received: from mtkmbs05n1.mediatek.inc (172.21.101.15) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 18 Dec 2019 21:50:24 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 19 Dec 2019 13:49:49 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 19 Dec 2019 13:50:11 +0800 From: Jungo Lin To: , , , , Subject: [v6, 2/5] dts: arm64: mt8183: Add ISP Pass 1 nodes Date: Thu, 19 Dec 2019 13:49:27 +0800 Message-ID: <20191219054930.29513-3-jungo.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191219054930.29513-1-jungo.lin@mediatek.com> References: <20191219054930.29513-1-jungo.lin@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191218_220013_276395_B67F3BC2 X-CRM114-Status: UNSURE ( 6.78 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [216.200.240.184 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jungo Lin Cc: shik@chromium.org, devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, suleiman@chromium.org, Rynn.Wu@mediatek.com, srv_heupstream@mediatek.com, robh@kernel.org, ryan.yu@mediatek.com, Jerry-ch.Chen@mediatek.com, frankie.chiu@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, ddavenport@chromium.org, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add nodes for Pass 1 unit of Mediatek's camera ISP system. Pass 1 unit embedded in Mediatek SoCs, works with the co-processor to process image signal from the image sensor and output RAW image data. Signed-off-by: Jungo Lin Signed-off-by: Tomasz Figa --- Changes from v6: - Add port node description in the device tree by Tomasz Figa. --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 10b32471bc7b..7a5349371b9f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -641,5 +641,43 @@ reg = <0 0x1a000000 0 0x1000>; #clock-cells = <1>; }; + + camisp: camisp@1a000000 { + compatible = "mediatek,mt8183-camisp"; + reg = <0 0x1a000000 0 0x1000>, + <0 0x1a003000 0 0x1000>, + <0 0x1a004000 0 0x2000>, + <0 0x1a006000 0 0x2000>, + <0 0x1a008000 0 0x2000>; + reg-names = "cam_sys", + "cam_uni", + "cam_a", + "cam_b", + "cam_c"; + interrupts = , + , + , + ; + interrupt-names = "cam_uni", + "cam_a", + "cam_b", + "cam_c"; + iommus = <&iommu M4U_PORT_CAM_IMGO>; + clocks = <&camsys CLK_CAM_CAM>, + <&camsys CLK_CAM_CAMTG>; + clock-names = "camsys_cam_cgpdn", + "camsys_camtg_cgpdn"; + mediatek,larb = <&larb3>, + <&larb6>; + power-domains = <&scpsys MT8183_POWER_DOMAIN_CAM>; + mediatek,scp = <&scp>; + + port { + camisp_endpoint: endpoint { + remote-endpoint = <&seninf_camisp_endpoint>; + }; + }; + }; + }; }; }; From patchwork Thu Dec 19 05:49:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jungo Lin X-Patchwork-Id: 11302687 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7AD746C1 for ; Thu, 19 Dec 2019 06:00:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4747F2146E for ; Thu, 19 Dec 2019 06:00:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lWyAL3Sz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="NoQTv/Fj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4747F2146E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cW4tbz+Qe/vr0yPbCjYtsYxELMcRlzOAPVS+y3PA4F0=; b=lWyAL3SzGZ4oVe Cj9gfblYqGKHeLH4bmn4XRqqmXVADoCesYrQCidSlftVtA6K0vnUc9gKt//sHIl5hR4nTKUtILkZo GrghCbZi3Ub+FZaRSjXPup7MZeIoL+iLwBh3EpL/QOuGnwsJVa/v2sVXdsFUFSbzfvMUwHv7KSMqc NiBVL4JYzCyR7uId48gZtP8ldO9ivJKzsiljuy1XKX11WFhVsYtLcCLqwZ7oCCfG8pAKwxDGv/cRs XZ7DEWI71mHrrdRu2dJ04jJR4WT9dwx/SDbkIjTGyUpcdQEy+aR4atx+P+JPRmQ26a2wGxDboadnu G/JanjVcej9sqG0bnq4Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihorS-00036P-HV; Thu, 19 Dec 2019 06:00:34 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihor7-0002Df-Cv; Thu, 19 Dec 2019 06:00:14 +0000 X-UUID: 7b7d1793262b45c5b15ffc874cdd0f69-20191218 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Reply-To:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=7fCn/ztl4AlC39YFUcLA1Fd5PU/Oyw3txLJ3UdHhRJ8=; b=NoQTv/Fj9uM+eKVXU2ao/khA+tzVXC9AfhLOO8YqZTj9djH6MOrPHtiFabCbn8vvXL3+Bxb9BfpcX5twykeJ2qjY6Bu1x33ye4/SDJYJk4T8r+3e+RNx75nVQqoMnWSHIo1joAzhX60RsQ67qFw56DfDK8Uzx673i77sLc8UjsU=; X-UUID: 7b7d1793262b45c5b15ffc874cdd0f69-20191218 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1436894052; Wed, 18 Dec 2019 22:00:12 -0800 Received: from MTKMBS01N1.mediatek.inc (172.21.101.68) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 18 Dec 2019 21:50:25 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 19 Dec 2019 13:49:48 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 19 Dec 2019 13:50:12 +0800 From: Jungo Lin To: , , , , Subject: [v6, 3/5] media: videodev2.h: Add new boottime timestamp type Date: Thu, 19 Dec 2019 13:49:28 +0800 Message-ID: <20191219054930.29513-4-jungo.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191219054930.29513-1-jungo.lin@mediatek.com> References: <20191219054930.29513-1-jungo.lin@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191218_220013_451618_E4408C82 X-CRM114-Status: UNSURE ( 8.29 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [216.200.240.184 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jungo Lin Cc: shik@chromium.org, devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, suleiman@chromium.org, Rynn.Wu@mediatek.com, srv_heupstream@mediatek.com, robh@kernel.org, ryan.yu@mediatek.com, Jerry-ch.Chen@mediatek.com, frankie.chiu@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, ddavenport@chromium.org, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org For Camera AR(Augmented Reality) application requires camera timestamps to be reported with CLOCK_BOOTTIME to sync timestamp with other sensor sources. The boottime timestamp is identical to monotonic timestamp, except it also includes any time that the system is suspended. Signed-off-by: Jungo Lin --- Changes from v6: - No change. --- Documentation/media/uapi/v4l/buffer.rst | 11 ++++++++++- include/uapi/linux/videodev2.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/media/uapi/v4l/buffer.rst b/Documentation/media/uapi/v4l/buffer.rst index 9149b57728e5..f45bfce7fddd 100644 --- a/Documentation/media/uapi/v4l/buffer.rst +++ b/Documentation/media/uapi/v4l/buffer.rst @@ -662,13 +662,22 @@ Buffer Flags - 0x00002000 - The buffer timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2, use - :c:func:`clock_gettime`. + :c:func:`clock_gettime` using clock IDs ``CLOCK_MONOTONIC``. * .. _`V4L2-BUF-FLAG-TIMESTAMP-COPY`: - ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` - 0x00004000 - The CAPTURE buffer timestamp has been taken from the corresponding OUTPUT buffer. This flag applies only to mem2mem devices. + * .. _`V4L2_BUF_FLAG_TIMESTAMP_BOOTIME`: + + - ``V4L2_BUF_FLAG_TIMESTAMP_BOOTIME`` + - 0x00008000 + - The buffer timestamp has been taken from the ``CLOCK_BOOTTIME`` + clock. To access the same clock outside V4L2, use + :c:func:`clock_gettime` using clock IDs ``CLOCK_BOOTTIME``. + Identical to CLOCK_MONOTONIC, except it also includes any time that + the system is suspended. * .. _`V4L2-BUF-FLAG-TSTAMP-SRC-MASK`: - ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 04481c717fee..74ef9472e702 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1060,6 +1060,8 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv) #define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x00000000 #define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x00002000 #define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x00004000 +#define V4L2_BUF_FLAG_TIMESTAMP_BOOTIME 0x00008000 + /* Timestamp sources. */ #define V4L2_BUF_FLAG_TSTAMP_SRC_MASK 0x00070000 #define V4L2_BUF_FLAG_TSTAMP_SRC_EOF 0x00000000 From patchwork Thu Dec 19 05:49:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jungo Lin X-Patchwork-Id: 11302691 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33FCF14E3 for ; Thu, 19 Dec 2019 06:00:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08BA32146E for ; Thu, 19 Dec 2019 06:00:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YHWFfXWq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="hxMSJzWl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08BA32146E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6QVoTMcTRmiOtjoUlvSwzPSNNSMcYPI4b8sHnAkqNH8=; b=YHWFfXWq1peUX4 UcDv2g5FGtD9M0kx3g2tiCevSMFeIcbKUDTL9ZmKrtNJhU/Uf0NH0Z/sPJJsXGzaRpuIgnZdSjVuD 9RIS44JMI2Rgo/XqwL4/fMe+9UmuPHqsqkrHJW/xRFpUhrT5tdit3pLNO3r+o1+Euin7lc5K1JuK4 +/y8/ryHpA1vc1GgJEO8pK/jFrEXW3r30toW+I+qzt9RqYPbaH6qa3PlfZW9IHLQjxX3lCqfim5Zc gd81q/PAZij/ncyCeNwF1lQfrCeaOWrRCvL0FPZZjRwME3zB1lZOg8tqiMvTiH+ESzoOidLTbjDA+ Bn76BB/wXM/W0hFoOxQA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihorh-0003M7-9Q; Thu, 19 Dec 2019 06:00:49 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihor8-0002pR-P0; Thu, 19 Dec 2019 06:00:19 +0000 X-UUID: eab28f1e09e54a0880ecdcd6d96dc052-20191218 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Reply-To:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=qSnZZzV2cOI8u2Mnv4hu+OqIaN7CLtLte/wqSPyNyag=; b=hxMSJzWltwJ0FkyjAnjMvfqUNoBMmgBDE1lqZJY0VfWPAiyADGtbpX4iH8kv1JvCZMcfrS9ja9qCLjYwjhC9EX1PBDXa/0b7Vb1IoqZL5HbaD9dfKlmPF9woHzGXcD9aTLkZQh2ulVoVpL9K1ffnBJ5pJvE6xVt3/Guuw6CNiy8=; X-UUID: eab28f1e09e54a0880ecdcd6d96dc052-20191218 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 86545162; Wed, 18 Dec 2019 22:00:12 -0800 Received: from MTKMBS06N2.mediatek.inc (172.21.101.130) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 18 Dec 2019 21:50:28 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 19 Dec 2019 13:50:12 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 19 Dec 2019 13:50:15 +0800 From: Jungo Lin To: , , , , Subject: [v6, 4/5] media: platform: Add Mediatek ISP P1 image & meta formats Date: Thu, 19 Dec 2019 13:49:29 +0800 Message-ID: <20191219054930.29513-5-jungo.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191219054930.29513-1-jungo.lin@mediatek.com> References: <20191219054930.29513-1-jungo.lin@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 353B4CEDE7D430F04B9EB8853C9A19E031AE9C932D3A74BE122BE6D0C801C68A2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191218_220014_864465_87B13512 X-CRM114-Status: UNSURE ( 8.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [216.200.240.184 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jungo Lin Cc: shik@chromium.org, devicetree@vger.kernel.org, Sean.Cheng@mediatek.com, suleiman@chromium.org, Rynn.Wu@mediatek.com, srv_heupstream@mediatek.com, robh@kernel.org, ryan.yu@mediatek.com, Jerry-ch.Chen@mediatek.com, frankie.chiu@mediatek.com, jungo.lin@mediatek.com, sj.huang@mediatek.com, yuzhao@chromium.org, linux-mediatek@lists.infradead.org, zwisler@chromium.org, ddavenport@chromium.org, frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add packed/full-g bayer formats with 8/10/12/14 bit for image output. Add Pass 1 (P1) specific meta formats for parameter processing and 3A/other statistics. (The current metadata format used in meta input and partial meta nodes is only a temporary solution to kick off the driver development and is not ready to be reviewed yet.) Signed-off-by: Jungo Lin --- Changes from v6: - Remove RGB format definitions in pixfmt-rgb.rst for kernel v5.5-rc1 version. --- .../media/uapi/v4l/pixfmt-mtisp-sbggr10.rst | 65 +++++++++++ .../media/uapi/v4l/pixfmt-mtisp-sbggr10f.rst | 90 ++++++++++++++ .../media/uapi/v4l/pixfmt-mtisp-sbggr12.rst | 61 ++++++++++ .../media/uapi/v4l/pixfmt-mtisp-sbggr12f.rst | 110 ++++++++++++++++++ .../media/uapi/v4l/pixfmt-mtisp-sbggr14.rst | 73 ++++++++++++ .../media/uapi/v4l/pixfmt-mtisp-sbggr14f.rst | 110 ++++++++++++++++++ .../media/uapi/v4l/pixfmt-mtisp-sbggr8.rst | 51 ++++++++ .../media/uapi/v4l/pixfmt-mtisp-sbggr8f.rst | 78 +++++++++++++ 8 files changed, 638 insertions(+) create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10.rst create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10f.rst create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12.rst create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12f.rst create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14.rst create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14f.rst create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8.rst create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8f.rst diff --git a/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10.rst b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10.rst new file mode 100644 index 000000000000..534edb4f0fd4 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10.rst @@ -0,0 +1,65 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _v4l2-pix-fmt-mtisp-sbggr10: +.. _v4l2-pix-fmt-mtisp-sgbrg10: +.. _v4l2-pix-fmt-mtisp-sgrbg10: +.. _v4l2-pix-fmt-mtisp-srggb10: + +******************************* +V4L2_PIX_FMT_MTISP_SBGGR10 ('MBBA'), V4L2_PIX_FMT_MTISP_SGBRG10('MBGA'), V4L2_PIX_FMT_MTISP_SGRBG10('MBgA'), V4L2_PIX_FMT_MTISP_SRGGB10('MBRA') +******************************* + +10-bit Packed Bayer formats. + +Description +=========== + +These four pixel formats are used by Mediatek ISP P1. +This is a packed format, meaning all the data bits for a pixel lying +next to each other with no padding in memory, with a depth of 10 bits per pixel. +The least significant byte is stored at lower memory addresses (little-endian). +The RGB byte order follows raw sRGB / Bayer format from sensor. +They are conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. +Below is an example of conventional RGB byte order BGGR. + +**Byte Order.** +Each cell is one byte. + +pixels cross the byte boundary and have a ratio of 5 bytes for each 4 pixels. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - start + 0: + - B\ :sub:`00low bits 7--0` + - G\ :sub:`01low bits 5--0` (bits 7--2) B\ :sub:`00high bits 9--8`\ (bits 1--0) + * - start + 2: + - B\ :sub:`02low bits 3--0`\ (bits 7--4) G\ :sub:`01high bits 9--6`\ (bits 3--0) + - G\ :sub:`03low bits 1--0`\ (bits 7--6) B\ :sub:`02high bits 9--4`\ (bits 5--0) + * - start + 4: + - G\ :sub:`03high bits 9--2` + * - start + 6: + - G\ :sub:`10low bits 7--0` + - R\ :sub:`11low bits 5--0`\ (bits 7--2) G\ :sub:`10high bits 9--8`\ (bits 1--0) + * - start + 8: + - G\ :sub:`12low bits 3--0`\ (bits 7--4) R\ :sub:`11high bits 9--6`\ (bits 3--0) + - R\ :sub:`13low bits 1--0`\ (bits 7--6) G\ :sub:`12high bits 9--4`\ (bits 5--0) + * - start + 10: + - R\ :sub:`13high bits 9--2` + * - start + 12: + - B\ :sub:`20low bits 7--0` + - G\ :sub:`21low bits 5--0`\ (bits 7--2) B\ :sub:`20high bits 9--8`\ (bits 1--0) + * - start + 14: + - B\ :sub:`22low bits 3--0`\ (bits 7--4) G\ :sub:`21high bits 9--6`\ (bits 3--0) + - G\ :sub:`23low bits 1--0`\ (bits 7--6) B\ :sub:`22high bits 9--4`\ (bits 5--0) + * - start + 16: + - G\ :sub:`23high bits 9--2` + * - start + 18: + - G\ :sub:`30low bits 7--0` + - R\ :sub:`31low bits 5--0`\ (bits 7--2) G\ :sub:`30high bits 9--8`\ (bits 1--0) + * - start + 20: + - G\ :sub:`32low bits 3--0`\ (bits 7--4) R\ :sub:`31high bits 9--6`\ (bits 3--0) + - R\ :sub:`33low bits 1--0`\ (bits 7--6) G\ :sub:`32high bits 9--4`\ (bits 5--0) + * - start + 22: + - R\ :sub:`33high bits 9--2` (bits 7--0) \ No newline at end of file diff --git a/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10f.rst b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10f.rst new file mode 100644 index 000000000000..7be527711602 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10f.rst @@ -0,0 +1,90 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _v4l2-pix-fmt-mtisp-sbggr10f: +.. _v4l2-pix-fmt-mtisp-sgbrg10f: +.. _v4l2-pix-fmt-mtisp-sgrbg10f: +.. _v4l2-pix-fmt-mtisp-srggb10f: + +******************************* +V4L2_PIX_FMT_MTISP_SBGGR10F ('MFBA'), V4L2_PIX_FMT_MTISP_SGBRG10F('MFGA'), V4L2_PIX_FMT_MTISP_SGRBG10F('MFgA'), V4L2_PIX_FMT_MTISP_SRGGB10F('MFRA') +******************************* + +10-bit Packed Full-G Bayer formats. + +Description +=========== + +These four pixel formats are used by Mediatek ISP P1. +This is a packed format with a depth of 10 bits per sample with every 4 pixels. +Full-G means 1 more pixel for green channel every 2 pixels. +The least significant byte is stored at lower memory addresses (little-endian). +The RGB byte order follows raw sRGB / Bayer format from sensor. They are conventionally +described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of conventional +RGB byte order BGGR. + +**Bit-packed representation.** + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - B\ :sub:`00` + - FG\ :sub:`01` + - G\ :sub:`02` + - B\ :sub:`03` + - FG\ :sub:`04` + - G\ :sub:`05` + * - G\ :sub:`10` + - R\ :sub:`11` + - FG\ :sub:`12` + - G\ :sub:`13` + - R\ :sub:`14` + - FG\ :sub:`15` + +**Byte Order.** +Each cell is one byte. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - start + 0: + - B\ :sub:`00low bits 7--0` + - FG\ :sub:`01low bits 5--0`\ (bits 7--2) B\ :sub:`00high bits 9--8`\ (bits 1--0) + - G\ :sub:`02low bits 3--0`\ (bits 7--4) FG\ :sub:`01high bits 9--6`\ (bits 3--0) + - B\ :sub:`03low bits 1--0`\ (bits 7--6) G\ :sub:`02high bits 9--4`\ (bits 5--0) + * - start + 4: + - B\ :sub:`03high bits 9--2` + - FG\ :sub:`04low bits 7--0` + - G\ :sub:`05low bits 5--0`\ (bits 7--2) FG\ :sub:`04high bits 9--8`\ (bits 1--0) + - G\ :sub:`05high bits 3--0` + * - start + 8: + - G\ :sub:`10low bits 7--0` + - R\ :sub:`11low bits 5--0`\ (bits 7--2) G\ :sub:`10high bits 9--8`\ (bits 1--0) + - FG\ :sub:`12low bits 3--0`\ (bits 7--4) R\ :sub:`11high bits 9--6`\ (bits 3--0) + - G\ :sub:`13low bits 1--0`\ (bits 7--6) FG\ :sub:`12high bits 9--4`\ (bits 5--0) + * - start + 12: + - G\ :sub:`13high bits 9--2` + - R\ :sub:`14low bits 7--0` + - FG\ :sub:`15low bits 5--0`\ (bits 7--2) R\ :sub:`14high bits 9--8`\ (bits 1--0) + - FG\ :sub:`15high bits 3--0` + * - start + 16: + - B\ :sub:`20low bits 7--0` + - FG\ :sub:`21low bits 5--0`\ (bits 7--2) B\ :sub:`20high bits 9--8`\ (bits 1--0) + - G\ :sub:`22low bits 3--0`\ (bits 7--4) FG\ :sub:`21high bits 9--6`\ (bits 3--0) + - B\ :sub:`23low bits 1--0`\ (bits 7--6) G\ :sub:`22high bits 9--4`\ (bits 5--0) + * - start + 20: + - B\ :sub:`23high bits 9--2` + - FG\ :sub:`24low bits 7--0` + - G\ :sub:`25low bits 5--0`\ (bits 7--2) FG\ :sub:`24high bits 9--8`\ (bits 1--0) + - G\ :sub:`25high bits 3--0` + * - start + 24: + - G\ :sub:`30low bits 7--0` + - R\ :sub:`31low bits 5--0`\ (bits 7--2) G\ :sub:`30high bits 9--8`\ (bits 1--0) + - FG\ :sub:`32low bits 3--0`\ (bits 7--4) R\ :sub:`31high bits 9--6`\ (bits 3--0) + - G\ :sub:`33low bits 1--0`\ (bits 7--6) FG\ :sub:`32high bits 9--4`\ (bits 5--0) + * - start + 28: + - G\ :sub:`33high bits 9--2` + - R\ :sub:`34low bits 7--0` + - FG\ :sub:`35low bits 5--0`\ (bits 7--2) R\ :sub:`34high bits 9--8`\ (bits 1--0) + - FG\ :sub:`35high bits 3--0` \ No newline at end of file diff --git a/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12.rst b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12.rst new file mode 100644 index 000000000000..cc888aac42c2 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12.rst @@ -0,0 +1,61 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _v4l2-pix-fmt-mtisp-sbggr12: +.. _v4l2-pix-fmt-mtisp-sgbrg12: +.. _v4l2-pix-fmt-mtisp-sgrbg12: +.. _v4l2-pix-fmt-mtisp-srggb12: + +******************************* +V4L2_PIX_FMT_MTISP_SBGGR12 ('MBBC'), V4L2_PIX_FMT_MTISP_SGBRG12('MBGC'), V4L2_PIX_FMT_MTISP_SGRBG12('MBgC'), V4L2_PIX_FMT_MTISP_SRGGB12('MBRC') +******************************* + +12-bit Packed Bayer formats. + +Description +=========== + +These four pixel formats are used by Mediatek ISP P1. +This is a packed format, meaning all the data bits for a pixel lying +next to each other with no padding in memory, with a depth of 12 bits per pixel. +The least significant byte is stored at lower memory addresses (little-endian). +The RGB byte order follows raw sRGB / Bayer format from sensor. +They are conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. +Below is an example of conventional RGB byte order BGGR. + +**Byte Order.** +Each cell is one byte. + +pixels cross the byte boundary and have a ratio of 6 bytes for each 4 pixels. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - start + 0: + - B\ :sub:`00lowbits 7--0` + - G\ :sub:`01lowbits 3--0`\ (bits 7--4) B\ :sub:`00highbits 11--8`\ (bits 3--0) + - G\ :sub:`01highbits 7--0` + - B\ :sub:`02lowbits 7--0` + - G\ :sub:`03lowbits 3--0`\ (bits 7--4) B\ :sub:`02highbits 11--8`\ (bits 3--0) + - G\ :sub:`03highbits 7--0` + * - start + 6: + - G\ :sub:`10lowbits 7--0` + - R\ :sub:`11lowbits 3--0`\ (bits 7--4) G\ :sub:`10highbits 11--8`\ (bits 3--0) + - R\ :sub:`11highbits 7--0` + - G\ :sub:`12lowbits 7--0` + - R\ :sub:`13lowbits 3--0`\ (bits 7--4) G\ :sub:`12highbits 11--8`\ (bits 3--0) + - R\ :sub:`13highbits 7--0` + * - start + 12: + - B\ :sub:`20lowbits 7--0` + - G\ :sub:`21lowbits 3--0`\ (bits 7--4) B\ :sub:`20highbits 11--8`\ (bits 3--0) + - G\ :sub:`21highbits 7--0` + - B\ :sub:`22lowbits 7--0` + - G\ :sub:`23lowbits 3--0`\ (bits 7--4) B\ :sub:`22highbits 11--8`\ (bits 3--0) + - G\ :sub:`23highbits 7--0` + * - start + 18: + - G\ :sub:`30lowbits 7--0` + - R\ :sub:`31lowbits 3--0`\ (bits 7--4) G\ :sub:`30highbits 11--8`\ (bits 3--0) + - R\ :sub:`31highbits 7--0` + - G\ :sub:`32lowbits 7--0` + - R\ :sub:`33lowbits 3--0`\ (bits 7--4) G\ :sub:`32highbits 11--8`\ (bits 3--0) + - R\ :sub:`33highbits 7--0` diff --git a/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12f.rst b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12f.rst new file mode 100644 index 000000000000..c063de9f9ad8 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12f.rst @@ -0,0 +1,110 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _v4l2-pix-fmt-mtisp-sbggr12f: +.. _v4l2-pix-fmt-mtisp-sgbrg12f: +.. _v4l2-pix-fmt-mtisp-sgrbg12f: +.. _v4l2-pix-fmt-mtisp-srggb12f: + +******************************* +V4L2_PIX_FMT_MTISP_SBGGR12F ('MFBC'), V4L2_PIX_FMT_MTISP_SGBRG12F('MFGC'), V4L2_PIX_FMT_MTISP_SGRBG12F('MFgC'), V4L2_PIX_FMT_MTISP_SRGGB12F('MFRC') +******************************* + +12-bit Packed Full-G Bayer formats. + +Description +=========== + +These four pixel formats are used by Mediatek ISP P1. +This is a packed format with a depth of 12 bits per sample with every 4 pixels. +Full-G means 1 more pixel for green channel every 2 pixels. +The least significant byte is stored at lower memory addresses (little-endian). +The RGB byte order follows raw sRGB / Bayer format from sensor. They are conventionally +described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of conventional +RGB byte order BGGR. + +**Bit-packed representation.** + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - B\ :sub:`00` + - FG\ :sub:`01` + - G\ :sub:`02` + - B\ :sub:`03` + - FG\ :sub:`04` + - G\ :sub:`05` + * - G\ :sub:`10` + - R\ :sub:`11` + - FG\ :sub:`12` + - G\ :sub:`13` + - R\ :sub:`14` + - FG\ :sub:`15` + +**Byte Order.** +Each cell is one byte. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - start + 0: + - B\ :sub:`00low bits 7--0` + - FG\ :sub:`01low bits 3--0`\ (bits 7--4) B\ :sub:`00high bits 11--8`\ (bits 3--0) + * - start + 2: + - FG\ :sub:`01high bits 7--0` + - G\ :sub:`02low bits 7--0` + * - start + 4: + - B\ :sub:`03low bits 3--0`\ (bits 7--4) G\ :sub:`02high bits 11--8`\ (bits 3--0) + - B\ :sub:`03high bits 7--0` + * - start + 6: + - FG\ :sub:`04low bits 7--0` + - G\ :sub:`05low bits 3--0`\ (bits 7--4) FG\ :sub:`04high bits 11--8`\ (bits 3--0) + * - start + 8: + - G\ :sub:`05high bits 7--0` + - + * - start + 10: + - G\ :sub:`10low bits 7--0` + - R\ :sub:`11low bits 3--0`\ (bits 7--4) G\ :sub:`10high bits 11--8`\ (bits 3--0) + * - start + 12: + - R\ :sub:`11high bits 7--0` + - FG\ :sub:`12low bits 7--0` + * - start + 14: + - G\ :sub:`13low bits 3--0`\ (bits 7--4) FG\ :sub:`12high bits 11--8`\ (bits 3--0) + - G\ :sub:`13high bits 7--0` + * - start + 16: + - R\ :sub:`14low bits 7--0` + - FG\ :sub:`15low bits 3--0`\ (bits 7--4) R\ :sub:`14high bits 11--8`\ (bits 3--0) + * - start + 18: + - FG\ :sub:`15high bits 7--0` + - + * - start + 20: + - B\ :sub:`20low bits 7--0` + - FG\ :sub:`21low bits 3--0`\ (bits 7--4) B\ :sub:`20high bits 11--8`\ (bits 3--0) + * - start + 22: + - FG\ :sub:`21high bits 7--0` + - G\ :sub:`22low bits 7--0` + * - start + 24: + - B\ :sub:`23low bits 3--0`\ (bits 7--4) G\ :sub:`22high bits 11--8`\ (bits 3--0) + - B\ :sub:`23high bits 7--0` + * - start + 26: + - FG\ :sub:`24low bits 7--0` + - G\ :sub:`25low bits 3--0`\ (bits 7--4) FG\ :sub:`24high bits 11--8`\ (bits 3--0) + * - start + 28: + - G\ :sub:`25high bits 7--0` + - + * - start + 30: + - G\ :sub:`30low bits 7--0` + - R\ :sub:`31low bits 3--0`\ (bits 7--4) G\ :sub:`30high bits 11--8`\ (bits 3--0) + * - start + 32: + - R\ :sub:`31high bits 7--0` + - FG\ :sub:`32low bits 7--0` + * - start + 34: + - G\ :sub:`33low bits 3--0`\ (bits 7--4) FG\ :sub:`32high bits 11--8`\ (bits 3--0) + - G\ :sub:`33high bits 7--0` + * - start + 36: + - R\ :sub:`34low bits 7--0` + - FG\ :sub:`35low bits 3--0`\ (bits 7--4) R\ :sub:`34high bits 11--8`\ (bits 3--0) + * - start + 38: + - FG\ :sub:`35high bits 7--0` + - \ No newline at end of file diff --git a/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14.rst b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14.rst new file mode 100644 index 000000000000..39ea9882a792 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14.rst @@ -0,0 +1,73 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _v4l2-pix-fmt-mtisp-sbggr14: +.. _v4l2-pix-fmt-mtisp-sgbrg14: +.. _v4l2-pix-fmt-mtisp-sgrbg14: +.. _v4l2-pix-fmt-mtisp-srggb14: + +******************************* +V4L2_PIX_FMT_MTISP_SBGGR14 ('MBBE'), V4L2_PIX_FMT_MTISP_SGBRG14('MBGE'), V4L2_PIX_FMT_MTISP_SGRBG14('MBgE'), V4L2_PIX_FMT_MTISP_SRGGB14('MBRE') +******************************* + +14-bit Packed Bayer formats. + +Description +=========== + +These four pixel formats are used by Mediatek ISP P1. +This is a packed format, meaning all the data bits for a pixel lying +next to each other with no padding in memory, with a depth of 14 bits per pixel. +The least significant byte is stored at lower memory addresses (little-endian). +The RGB byte order follows raw sRGB / Bayer format from sensor. +They are conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. +Below is an example of conventional RGB byte order BGGR. + +**Byte Order.** +Each cell is one byte. + +pixels cross the byte boundary and have a ratio of 7 bytes for each 4 pixels. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - start + 0: + - B\ :sub:`00low bits 7--0` + - G\ :sub:`01low bits 1--0`\ (bits 7--6) B\ :sub:`00high bits 13--8`\ (bits 5--0) + - G\ :sub:`01low bits 9--2`\ + - B\ :sub:`02low bits 3--0`\ (bits 7--4) G\ :sub:`01high bits 13--10`\ (bits 3--0) + * - start + 4: + - B\ :sub:`02low bits 11--4`\ + - G\ :sub:`03low bits 5--0`\ (bits 7--2) B\ :sub:`02high bits 13--12`\ (bits 1--0) + - G\ :sub:`03high bits 13--6`\ + - + * - start + 8: + - G\ :sub:`10low bits 7--0` + - R\ :sub:`11low bits 1--0`\ (bits 7--6) G\ :sub:`10high bits 13--8`\ (bits 5--0) + - R\ :sub:`11low bits 9--2`\ + - G\ :sub:`12low bits 3--0`\ (bits 7--4) R\ :sub:`11high bits 13--10`\ (bits 3--0) + * - start + 12: + - G\ :sub:`12low bits 11--4`\ + - R\ :sub:`13low bits 5--0`\ (bits 7--2) G\ :sub:`12high bits 13--12`\ (bits 1--0) + - R\ :sub:`13high bits 13--6`\ + - + * - start + 16: + - B\ :sub:`20low bits 7--0` + - G\ :sub:`21low bits 1--0`\ (bits 7--6) B\ :sub:`20high bits 13--8`\ (bits 5--0) + - G\ :sub:`21low bits 9--2`\ + - B\ :sub:`22low bits 3--0`\ (bits 7--4) G\ :sub:`21high bits 13--10`\ (bits 3--0) + * - start + 20: + - B\ :sub:`22low bits 11--4`\ + - G\ :sub:`23low bits 5--0`\ (bits 7--2) B\ :sub:`22high bits 13--12`\ (bits 1--0) + - G\ :sub:`23high bits 13--6`\ + - + * - start + 24: + - G\ :sub:`30low bits 7--0` + - R\ :sub:`31low bits 1--0`\ (bits 7--6) G\ :sub:`30high bits 13--8`\ (bits 5--0) + - R\ :sub:`31low bits 9--2`\ + - G\ :sub:`32low bits 3--0`\ (bits 7--4) R\ :sub:`31high bits 13--10`\ (bits 3--0) + * - start + 28: + - G\ :sub:`32low bits 11--4`\ + - R\ :sub:`33low bits 5--0`\ (bits 7--2) G\ :sub:`32high bits 13--12`\ (bits 1--0) + - R\ :sub:`33high bits 13--6`\ + - \ No newline at end of file diff --git a/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14f.rst b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14f.rst new file mode 100644 index 000000000000..010b1c190c60 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14f.rst @@ -0,0 +1,110 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _v4l2-pix-fmt-mtisp-sbggr14f: +.. _v4l2-pix-fmt-mtisp-sgbrg14f: +.. _v4l2-pix-fmt-mtisp-sgrbg14f: +.. _v4l2-pix-fmt-mtisp-srggb14f: + +******************************* +V4L2_PIX_FMT_MTISP_SBGGR14F ('MFBE'), V4L2_PIX_FMT_MTISP_SGBRG14F('MFGE'), V4L2_PIX_FMT_MTISP_SGRBG14F('MFgE'), V4L2_PIX_FMT_MTISP_SRGGB14F('MFRE') +******************************* + +14-bit Packed Full-G Bayer formats. + +Description +=========== + +These four pixel formats are used by Mediatek ISP P1. +This is a packed format with a depth of 14 bits per sample with every 4 pixels. +Full-G means 1 more pixel for green channel every 2 pixels. +The least significant byte is stored at lower memory addresses (little-endian). +The RGB byte order follows raw sRGB / Bayer format from sensor. They are conventionally +described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of conventional +RGB byte order BGGR. + +**Bit-packed representation.** + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - B\ :sub:`00` + - FG\ :sub:`01` + - G\ :sub:`02` + - B\ :sub:`03` + - FG\ :sub:`04` + - G\ :sub:`05` + * - G\ :sub:`10` + - R\ :sub:`11` + - FG\ :sub:`12` + - G\ :sub:`13` + - R\ :sub:`14` + - FG\ :sub:`15` + +**Byte Order.** +Each cell is one byte. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - start + 0: + - B\ :sub:`00low bits 7--0` + - FG\ :sub:`01low bits 1--0`\ (bits 7--6) B\ :sub:`00high bits 13--8`\ (bits 5--0) + - FG\ :sub:`01low bits 9--2` + - G\ :sub:`02low bits 3--0`\ (bits 7--4) FG\ :sub:`01high bits 13--10`\ (bits 3--0) + * - start + 4: + - G\ :sub:`02low bits 11--4` + - B\ :sub:`03low bits 5--0`\ (bits 7--2) G\ :sub:`02high bits 13--12`\ (bits 1--0) + - B\ :sub:`03high bits 13--6` + - FG\ :sub:`04low bits 7--0` + * - start + 8: + - G\ :sub:`05low bits 1--0`\ (bits 7--6) FG\ :sub:`04high bits 13--8`\ (bits 5--0) + - G\ :sub:`05high bits 9--2` + - G\ :sub:`05high bits 13--10` + - + * - start + 12: + - G\ :sub:`10low bits 7--0` + - R\ :sub:`11low bits 1--0`\ (bits 7--6) G\ :sub:`10high bits 13--8`\ (bits 5--0) + - R\ :sub:`11low bits 9--2` + - FG\ :sub:`12low bits 3--0`\ (bits 7--4) R\ :sub:`11high bits 13--10`\ (bits 3--0) + * - start + 16: + - FG\ :sub:`12low bits 11--4` + - G\ :sub:`13low bits 5--0`\ (bits 7--2) FG\ :sub:`12high bits 13--12`\ (bits 1--0) + - G\ :sub:`13high bits 13--6` + - R\ :sub:`14low bits 7--0` + * - start + 20: + - FG\ :sub:`15low bits 1--0`\ (bits 7--6) R\ :sub:`14high bits 13--8`\ (bits 5--0) + - FG\ :sub:`15high bits 9--2` + - FG\ :sub:`15high bits 13--10` + - + * - start + 24: + - B\ :sub:`20low bits 7--0` + - FG\ :sub:`21low bits 1--0`\ (bits 7--6) B\ :sub:`20high bits 13--8`\ (bits 5--0) + - FG\ :sub:`21low bits 9--2` + - G\ :sub:`22low bits 3--0`\ (bits 7--4) FG\ :sub:`21high bits 13--10`\ (bits 3--0) + * - start + 28: + - G\ :sub:`22low bits 11--4` + - B\ :sub:`23low bits 5--0`\ (bits 7--2) G\ :sub:`22high bits 13--12`\ (bits 1--0) + - B\ :sub:`23high bits 13--6` + - FG\ :sub:`24low bits 7--0` + * - start + 32: + - G\ :sub:`25low bits 1--0`\ (bits 7--6) FG\ :sub:`24high bits 13--8`\ (bits 5--0) + - G\ :sub:`25high bits 9--2` + - G\ :sub:`25high bits 13--10` + - + * - start + 36: + - G\ :sub:`30low bits 7--0` + - R\ :sub:`31low bits 1--0`\ (bits 7--6) G\ :sub:`30high bits 13--8`\ (bits 5--0) + - R\ :sub:`31low bits 9--2` + - FG\ :sub:`32low bits 3--0`\ (bits 7--4) R\ :sub:`31high bits 13--10`\ (bits 3--0) + * - start + 40: + - FG\ :sub:`32low bits 11--4` + - G\ :sub:`33low bits 5--0`\ (bits 7--2) FG\ :sub:`32high bits 13--12`\ (bits 1--0) + - G\ :sub:`33high bits 13--6` + - R\ :sub:`34low bits 7--0` + * - start + 44: + - FG\ :sub:`35low bits 1--0`\ (bits 7--6) R\ :sub:`34high bits 13--8`\ (bits 5--0) + - FG\ :sub:`35high bits 9--2` + - FG\ :sub:`35high bits 13--10` + - \ No newline at end of file diff --git a/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8.rst b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8.rst new file mode 100644 index 000000000000..86cadbf38175 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8.rst @@ -0,0 +1,51 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _v4l2-pix-fmt-mtisp-sbggr8: +.. _v4l2-pix-fmt-mtisp-sgbrg8: +.. _v4l2-pix-fmt-mtisp-sgrbg8: +.. _v4l2-pix-fmt-mtisp-srggb8: + +******************************* +V4L2_PIX_FMT_MTISP_SBGGR8 ('MBB8'), V4L2_PIX_FMT_MTISP_SGBRG8('MBG8'), V4L2_PIX_FMT_MTISP_SGRBG8('MBg8'), V4L2_PIX_FMT_MTISP_SRGGB8('MBR8') +******************************* + +8-bit Packed Bayer formats. + +Description +=========== + +These four pixel formats are used by Mediatek ISP P1. +This is a packed format, meaning all the data bits for a pixel lying +next to each other with no padding in memory, with a depth of 8 bits per pixel. +The least significant byte is stored at lower memory addresses (little-endian). +The RGB byte order follows raw sRGB / Bayer format from sensor. +They are conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. +Below is an example of conventional RGB byte order BGGR. + +**Byte Order.** +Each cell is one byte. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - start + 0: + - B\ :sub:`00` + - G\ :sub:`01` + - B\ :sub:`02` + - G\ :sub:`03` + * - start + 4: + - G\ :sub:`10` + - R\ :sub:`11` + - G\ :sub:`12` + - R\ :sub:`13` + * - start + 8: + - B\ :sub:`20` + - G\ :sub:`21` + - B\ :sub:`22` + - G\ :sub:`23` + * - start + 12: + - G\ :sub:`30` + - R\ :sub:`31` + - G\ :sub:`32` + - R\ :sub:`33` \ No newline at end of file diff --git a/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8f.rst b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8f.rst new file mode 100644 index 000000000000..ca5151312bca --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8f.rst @@ -0,0 +1,78 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _v4l2-pix-fmt-mtisp-sbggr8f: +.. _v4l2-pix-fmt-mtisp-sgbrg8f: +.. _v4l2-pix-fmt-mtisp-sgrbg8f: +.. _v4l2-pix-fmt-mtisp-srggb8f: + +******************************* +V4L2_PIX_FMT_MTISP_SBGGR8F ('MFB8'), V4L2_PIX_FMT_MTISP_SGBRG8F('MFG8'), V4L2_PIX_FMT_MTISP_SGRBG8F('MFg8'), V4L2_PIX_FMT_MTISP_SRGGB8F('MFR8') +******************************* + +8-bit Packed Full-G Bayer formats. + +Description +=========== + +These four pixel formats are used by Mediatek ISP P1. +This is a packed format with a depth of 8 bits per sample with every 4 pixels. +Full-G means 1 more pixel for green channel every 2 pixels. +The least significant byte is stored at lower memory addresses (little-endian). +The RGB byte order follows raw sRGB / Bayer format from sensor. They are conventionally +described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of conventional +RGB byte order BGGR. + +**Bit-packed representation.** + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - B\ :sub:`00` + - FG\ :sub:`01` + - G\ :sub:`02` + - B\ :sub:`03` + - FG\ :sub:`04` + - G\ :sub:`05` + * - G\ :sub:`10` + - R\ :sub:`11` + - FG\ :sub:`12` + - G\ :sub:`13` + - R\ :sub:`14` + - FG\ :sub:`15` + +**Byte Order.** +Each cell is one byte. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - start + 0: + - B\ :sub:`00` + - FG\ :sub:`01` + - G\ :sub:`02` + - B\ :sub:`03` + - FG\ :sub:`04` + - G\ :sub:`05` + * - start + 6: + - G\ :sub:`10` + - R\ :sub:`11` + - FG\ :sub:`12` + - G\ :sub:`13` + - R\ :sub:`14` + - FG\ :sub:`15` + * - start + 12: + - B\ :sub:`20` + - FG\ :sub:`21` + - G\ :sub:`22` + - B\ :sub:`23` + - FG\ :sub:`24` + - G\ :sub:`25` + * - start + 18: + - G\ :sub:`30` + - R\ :sub:`31` + - FG\ :sub:`32` + - G\ :sub:`33` + - R\ :sub:`34` + - FG\ :sub:`35` \ No newline at end of file