From patchwork Tue Nov 1 10:04:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsia-Jun Li X-Patchwork-Id: 13616 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2866431wru; Tue, 1 Nov 2022 03:22:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rmFktOmJwFsczNaix1yCiLgpcdT0ZgaNKuhFRgMKaQaEEUo65LDihyu2Pui6ykHgaXz3z X-Received: by 2002:a17:903:41cc:b0:186:b756:a5f0 with SMTP id u12-20020a17090341cc00b00186b756a5f0mr18794214ple.132.1667298145313; Tue, 01 Nov 2022 03:22:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667298145; cv=pass; d=google.com; s=arc-20160816; b=MDuTrN7gL0ZZZBbhDmNJwWnfw1582ph8SCvAbdsjROsAGgRpitvp1QYhQ/ruCx8D4e In9VOf9JtmKji2B5gzS2SV1xM+B/mcv1IGwlm/DN7CFpnrSHjiTf8ZAYQiVfTWRxwKrK Nn8Mj3fwC6aAtbjQTS9jFR/BIT52emSKkrtyp/XEojCsEx/UcZtfdmdRPkxvZNinRp9r npNfa7qbobB6dJAaYDxnJuO+co/UyTY+AlBb5KRZkzbZocQjLGuz/3GPmVjjx7PRU6tg fX4s08b9IJ3dUgL4RKwLNrJyTyf7VHEKHAgCRYKYI/o4AAhg8gKWdaEiaBMSMqwz+h+m S0Vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V9nxb7J9kIIeH/n/FLXw3QUOA6jjKpMU+gpq28t8f7c=; b=U880mRDE+uSLOJOfCMBJk77rCm6iSzIySQeD76mFFcbBJelSeuc2qMhTeSZVfixVgJ 0PoVZRXMQi0cNXotPtHx9iK9OXSh8avoby/fjPJj4TPG0sBHvrZED3mOXc+SvBwioBmH ME9amADJM/eVbiZ11IHYx4pJvrPV0r7yqCjalZx/jZbt1AE68Weefg8Qam4U0gaOnZLC CYED0p+uvf5nmlVqnHzSB6N3wyWRXYw2WWEbgnYAw9eAzutiSeOkqg45/dpGPcq6dpE8 kZddvN/AyTJva2GKjjywFSXhfEE1Syvj4bD/O1OorbhUpUHQfvH57ggm9NPGJjvvxghO g4FA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=AqLjKQPD; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020a63cf05000000b0043c2b08e6efsi11228091pgg.694.2022.11.01.03.22.12; Tue, 01 Nov 2022 03:22:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=AqLjKQPD; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229487AbiKAKFw (ORCPT + 99 others); Tue, 1 Nov 2022 06:05:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbiKAKFr (ORCPT ); Tue, 1 Nov 2022 06:05:47 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2050.outbound.protection.outlook.com [40.107.93.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DEE617AA5; Tue, 1 Nov 2022 03:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ai+qLJ418bBfK92tlE8ed3FlPxg/bT0RsBZi0/9EmAT25WUdRmBr2YqQ4BUNdbq9Wxq9ccWUYW38eAzCoxIAuKHLf2P0hx11fi1WBy0gGOCQnQJ4Ecmma+drjiKLB/tzj1zFZ2tr/fNOC6bq3mHpwZy5HHkTBV9EiF6/prGUpB1TZ5kOlx3dZrtVnmNDuwMeEKjj3EvQQdbvpLJDHiqX/0JXrkBrHSFSjgXmRQOB4ygUnaEEnnp3FcxROaYtoJX9CRTWMNoyenfQS4ugnNReM2xpX1oQm3QIBgUoPoZ08ETMt6rMIXI6RP186vOEmdSIchjvPazqXSuGxIxxg0ANJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V9nxb7J9kIIeH/n/FLXw3QUOA6jjKpMU+gpq28t8f7c=; b=RX4/m/EPHcDFfBzsD+/hDpMrs85s2tukbpQxgtOtzNdCd4NH3IxNksO89iQDrQysNduBbC57azv5Y/RHmA73/r7MmLYcF/FKp3qK2U5hu7WUnRQbx5le3wmNbGFsjGN/vN5NBlCR9a7nhHXRLfmnDg3hfhzmGo4ya7zRTtQmV1dWUdfjMHNx5jWY5pLnNGZxlf2k+DP56OGNZHd7dMHAutNSQKDWIVpob4mcKB0XUuqOAng8WjrmgDUrm75RzuaQOtAxT2RLty/GG/qPBE2F9dUTBJrQt7s5dROSyBraG0m8Pbr2Z5DLnaqaZ1fHGt+3nCvY1xWzZV8tELIHOSEaMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V9nxb7J9kIIeH/n/FLXw3QUOA6jjKpMU+gpq28t8f7c=; b=AqLjKQPDBAuLQjnMp101c/KvcD/0JgA9GbwaBj3oCzvK9lltmbmc2GVsqpXjIldBoV5iN1F4NF+s5X7/aqiCluzWlSjlpLcDy7EhdxpgS6TxoMtUA44iGewrql5luBEEev6SW24v9nOTuwm8GIf61KMA2a1C1hh/3cgEVFG6t7M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=synaptics.com; Received: from DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) by MW4PR03MB6362.namprd03.prod.outlook.com (2603:10b6:303:11d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.19; Tue, 1 Nov 2022 10:05:44 +0000 Received: from DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1]) by DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1%7]) with mapi id 15.20.5769.021; Tue, 1 Nov 2022 10:05:44 +0000 From: Hsia-Jun Li To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, daniel@ffwll.ch, ezequiel@vanguardiasur.com.ar, helen.koike@collabora.com, hverkuil-cisco@xs4all.nl, jszhang@kernel.org, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, maarten.lankhorst@linux.intel.com, mchehab@kernel.org, mripard@kernel.org, nicolas@ndufresne.ca, ribalda@chromium.org, sakari.ailus@linux.intel.com, sebastian.hesselbarth@gmail.com, tfiga@chromium.org, tzimmermann@suse.de, "Hsia-Jun(Randy) Li" Subject: [PATCH v3 1/4] drm/fourcc: Add Synaptics VideoSmart tiled modifiers Date: Tue, 1 Nov 2022 18:04:45 +0800 Message-Id: <20221101100448.66712-2-randy.li@synaptics.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221101100448.66712-1-randy.li@synaptics.com> References: <20221101100448.66712-1-randy.li@synaptics.com> X-ClientProxiedBy: PH0PR07CA0027.namprd07.prod.outlook.com (2603:10b6:510:5::32) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|MW4PR03MB6362:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d139671-500c-450a-ec53-08dabbf0a3ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jEj+7Y3Vj8+4t57P7erZ0emmcL10YaMQR81CEX6bjaXd/KUYrpD5QBU8H8VMgHOn2k2fwMk225EknA1BaNKxEBTDN48+mH/Vv3CIeV627kMz5g4eaQoehGYpeU00p/hVdqXZwl+jZiRKdnk0bLikZoht/0Fy6074Phz1JZOPvaQEjo3JaVkl8CbaA/jsm3Nv+XvnzqTkkexdCXUHxoovlvlMUy23X0Bxa2cfkvbaDsnWWpUEXzqRjh3Btfyxq0zBTDWaWBFAUFQwHtopaYutUAwSjWfiACZuIxZmd3YcSOmhnxj6POsSsKrsdDz6v6Apier1N4mjR2X+jcw9AKiir/yGE0ikO98CV6nZ620a6ORZ0ndZh4FZVAXvmofYpXabVjgPAS6Ew82RPSuNs+iy1i7OfBVNNcbLAB7LiSwKEcC2hlBvimpoWQ6UIPg4bCNTgW4JgCZoLAb6+fe1bC/IxjsY4iAIi9xZzwWj5wgDHH0LVp3dK8VOwJ9k+UWh50aejX3hdj0MAxJq9Fxn76JnaZH67Icx6kPb/38Zvb1WjH8VvRZmT5kY88RWvuwf6JzibGQYkwmKrKVnt0Q0j/NSk0bDZXtXr5hVqMZ/ij87aGNCgLiWPSFDMt38y2FqkhrJNilxOLH5w1UFjaetIRH7LFZv46947KdZPPTLRuxiicoaxun+0RHo00BvvAE+GSUC67g6uGGlkav6UZR/OBtOU3DRS7k4R3t0Gl6LRS6im5o7WH3jQxI0z8ry78cDmkekxgWeGhIihloBU31YtvN8HA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR03MB5196.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(346002)(39860400002)(396003)(136003)(366004)(451199015)(36756003)(478600001)(86362001)(6486002)(6506007)(66946007)(316002)(6916009)(66476007)(66556008)(107886003)(4326008)(8676002)(52116002)(6512007)(83380400001)(8936002)(5660300002)(26005)(41300700001)(1076003)(2906002)(186003)(7416002)(2616005)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZRA+wg+qNdfaCqGyrazCW4B+XW33eSqHkdnPDSoDWOyowMnvpY3JVw786DaX3zeec5rxBo5gNvIFomgxhW+WLR4afqJeleCHMggiPZsh5VbUV47+XSvvJjxn1gLHvGRGgWx0dc8Wqi2TNpteOsV9aoZhYBxKb47PqMD6NjMU9xLz6jkW95kJ3PjThxL4a8aC82krQevTKRth1fpfVnRnEPR3E7qlOLG07V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f0C+WnFZv+T4VRVNXY6Pmc+JRFrB8TWR14uD49+CkprXK5S1tOtSIxc936O9B47Pj3cTVGJLHwtuE5LQIS3TW9ma3++FNnNSULb5u+OZ4NSeicZtqrQlvzPBjN/0GW/ImC5ZBaICuQsVH8qkMidP7dymu3xnJgMg0tEPbFZ3pVr2PETOpu+1XOwNfjS7LN1epFhLSwFKRxgIffH2xXywUxZO7+tQ5ro8EZq17oDC/I/oVPTV82FrCgg1TF2qT5Y5ETQN2yYWLhm8JRlpXtref91uISbt X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d139671-500c-450a-ec53-08dabbf0a3ed X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2022 10:05:44.6762 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yx6kkHrimI0GAGaJG9yd98bomMimIRV+blXBKrtx1eZR0rnm5j70CsnWopbiLZZIg1GtXpStCU+3l+W+lhXJsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR03MB6362 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748288820292791514?= X-GMAIL-MSGID: =?utf-8?q?1748288820292791514?= From: "Hsia-Jun(Randy) Li" Memory Traffic Reduction(MTR) is a module in Synaptics VideoSmart platform could process lossless compression image and cache the tile memory line. Those modifiers only record the parameters would effort pixel layout or memory layout. Whether physical memory page mapping is used is not a part of format. We would allocate the same size of memory for uncompressed and compressed luma and chroma data, while the compressed buffer would request two extra planes holding the metadata for the decompression. Signed-off-by: Hsia-Jun(Randy) Li --- include/uapi/drm/drm_fourcc.h | 75 +++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index bc056f2d537d..ca0b4ca70b36 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -407,6 +407,7 @@ extern "C" { #define DRM_FORMAT_MOD_VENDOR_ARM 0x08 #define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 #define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a +#define DRM_FORMAT_MOD_VENDOR_SYNAPTICS 0x0b /* add more to the end as needed */ @@ -1507,6 +1508,80 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) #define AMD_FMT_MOD_CLEAR(field) \ (~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT)) +/* + * Synaptics VideoSmart modifiers + * + * Tiles could be arranged in Groups of Tiles (GOTs), it is a small tile + * within a tile. GOT size and layout varies based on platform and + * performance concern. When the compression is applied, it is possible + * that we would have two tile type in the GOT, these parameters can't + * tell the secondary tile type. + * + * Besides, an 8 size 4 bytes arrary (32 bytes) would be need to store + * some compression parameters for a compression meta data plane. + * + * Macro + * Bits Param Description + * ---- ----- ----------------------------------------------------------------- + * + * 7:0 f Scan direction description. + * + * 0 = Invalid + * 1 = V4, the scan would always start from vertical for 4 pixel + * then move back to the start pixel of the next horizontal + * direction. + * 2 = Reserved for future use. + * + * 15:8 m The times of pattern repeat in the right angle direction from + * the first scan direction. + * + * 19:16 p The padding bits after the whole scan, could be zero. + * + * 20:20 g GOT packing flag. + * + * 23:21 - Reserved for future use. Must be zero. + * + * 27:24 h log2(horizontal) of bytes, in GOTs. + * + * 31:28 v log2(vertical) of bytes, in GOTs. + * + * 35:32 - Reserved for future use. Must be zero. + * + * 36:36 c Compression flag. + * + * 55:37 - Reserved for future use. Must be zero. + * + */ + +#define DRM_FORMAT_MOD_SYNA_V4_TILED fourcc_mod_code(SYNAPTICS, 1) + +#define DRM_FORMAT_MOD_SYNA_MTR_LINEAR_2D(f, m, p, g, h, v, c) \ + fourcc_mod_code(SYNAPTICS, ((__u64)((f) & 0xff) | \ + ((__u64)((m) & 0xff) << 8) | \ + ((__u64)((p) & 0xf) << 16) | \ + ((__u64)((g) & 0x1) << 20) | \ + ((__u64)((h) & 0xf) << 24) | \ + ((__u64)((v) & 0xf) << 28) | \ + ((__u64)((c) & 0x1) << 36))) + +#define DRM_FORMAT_MOD_SYNA_V4H1 \ + DRM_FORMAT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 0, 0, 0, 0) + +#define DRM_FORMAT_MOD_SYNA_V4H3P8 \ + DRM_FORMAT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 0, 0, 0, 0) + +#define DRM_FORMAT_MOD_SYNA_V4H1_64L4_COMPRESSED \ + DRM_FORMAT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 1, 6, 2, 1) + +#define DRM_FORMAT_MOD_SYNA_V4H3P8_64L4_COMPRESSED \ + DRM_FORMAT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 1, 6, 2, 1) + +#define DRM_FORMAT_MOD_SYNA_V4H1_128L128_COMPRESSED \ + DRM_FORMAT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 1, 7, 7, 1) + +#define DRM_FORMAT_MOD_SYNA_V4H3P8_128L128_COMPRESSED \ + DRM_FORMAT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 1, 7, 7, 1) + #if defined(__cplusplus) } #endif From patchwork Tue Nov 1 10:04:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsia-Jun Li X-Patchwork-Id: 13614 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2865276wru; Tue, 1 Nov 2022 03:19:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jZVuQCW1Kyan8KXIVmFUlaiSYpvUabsMSQItGxYx9Ek9TihGGekFyMsDXCyS89KSbb3B0 X-Received: by 2002:a17:90b:152:b0:213:dfd6:3e5e with SMTP id em18-20020a17090b015200b00213dfd63e5emr10143704pjb.229.1667297983082; Tue, 01 Nov 2022 03:19:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667297983; cv=pass; d=google.com; s=arc-20160816; b=Tn+sjRMSxlydPKv6adKme6t9gbnBs/4PbJUMgU0rGkunWa6hiq5thraSOBljcdewsi SPjMepLyTovKbOlDnNPfT075O/iGJpNC0mD/LFVwlsERZG5Lm5aHsJCV2Oli7vP+SbGu sWYlb9s5w3pDDDpGyNc6FdFzCpPnYmcykPk6zlf/RqwRRvXANaDwM5t+5KOJOn0VHNj4 8UcIUspd7yYdrnJ6A+cIhOh+IvyMVc3zpeyo/OTiHnuSMj41veu6bbYSmQeOTDbadH6h EnJv+CGgO7aPBETA2X2EqpBKKvufmgzWwjgKrz1OmexYMLLvRfC2UbAWDtxFpRovROBb P12w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WLbFrOWEYWjaTOVaR/p2ZKNFdbel3IZbWaevVbsdCwo=; b=lhtD5lH31N6ksAXEdgPaOSdQkjOA1mJIyR9MEh7B1YCZb6MoaRWqGdgkZA5lFewOHp WyNOVK0cVVfSLRw5KpFC3cg7A2fI3as28bUT8uYuc0S0dGHsNrsJZfycxuk1jyv68cCV zOXImh4eGTB4zSsrAkT2wrInCQWuPEafZnF25w6bwxZlLRdHn0BgJ7vaSGezRF3xqCtE pDHOcEZvwWFfXQQaYig+Trdo9mR0foC+pAHlj0wNAG4Rs3SKol6pv0oVubatar6z9i76 Q0YyJdLQugOVe2+TVybyItEfEEgFJOpbhcQH4o4kU7qgiMSAsFaUoEWe+5H365tTijbO 7fgg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=A9114vFY; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a2-20020a1709027d8200b0018659ff71d2si9813090plm.62.2022.11.01.03.19.28; Tue, 01 Nov 2022 03:19:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=A9114vFY; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230518AbiKAKF5 (ORCPT + 99 others); Tue, 1 Nov 2022 06:05:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbiKAKFx (ORCPT ); Tue, 1 Nov 2022 06:05:53 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2083.outbound.protection.outlook.com [40.107.93.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA368193D2; Tue, 1 Nov 2022 03:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mC8GAPdebjQIiJATMq2NyKe6p6Z4qsfCSf5r3El064eLuPbsoTFZnw51xrNdKeEd6SVr86szTPTfFu1t+xYmXkB9yViWuPD9gu0rP1E5t+a3jXIJtbK+kjs95yKbTxgiigPdj8CImeS81YzfGIZ05KeBCKMNR1f3vUg3t5/vUSubvlVHmtxXcWr6pI2q//W9Gf8iADyUiGsceJXhieQooruTPTWf668Z38mi7fwwAnx6n68JgqjrOGorQ37UfCUBqAGJCEPHQlNbFrfauuLr0dnhGHI5zSLc0eJlCCIWzSmdCeZCdNQxyzYOrA+3T4ZlB9k5yEnWhlcvgsiEnNKbPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WLbFrOWEYWjaTOVaR/p2ZKNFdbel3IZbWaevVbsdCwo=; b=hArLA82YgyuW81kmIpk+Uvr/tGYkQmOBahAgL9YNEkwbqlELsLfzk4J54kmc/SNYOuqjT9V/7eKGLEhpvI9zW00GiP4lgRsaONOxW0y/uTGhWXMCIVTB/6aEjHQ5tbn7xHUQuI6aocyPyUO59zdkTx5qHK4cFHcxUwRboOLLQnexSFqr7/rjk1JtXdD7/9T5iNV/y9ndqy6FBLkM3nOMzb67Stj1RdAJ1OlireYoxo0UqgB3p97BPC90qJuJt3sOX0J5PM0MJYME+4JYo11uHyhJUeIHfXuXfbxKuNeUMFE6cH+fB03Slr8a9LkBDAENGypG4q/dY7c4g34XiU/C3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WLbFrOWEYWjaTOVaR/p2ZKNFdbel3IZbWaevVbsdCwo=; b=A9114vFYm6bklPo4oWG1goZjrgwrAQ/3Y2KHdzLdTFp09Nl8grejhqotjr6lnahDesNX10NMMb5LGFnAXIAiT9RVFv/YExoIxjltazLd3Olijn59auzrNYCYTfPdh3L/tdVj7qdXbG+GENpVui+fQybZlSOjMK6ByHO7+n6x19k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=synaptics.com; Received: from DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) by MW4PR03MB6362.namprd03.prod.outlook.com (2603:10b6:303:11d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.19; Tue, 1 Nov 2022 10:05:51 +0000 Received: from DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1]) by DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1%7]) with mapi id 15.20.5769.021; Tue, 1 Nov 2022 10:05:51 +0000 From: Hsia-Jun Li To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, daniel@ffwll.ch, ezequiel@vanguardiasur.com.ar, helen.koike@collabora.com, hverkuil-cisco@xs4all.nl, jszhang@kernel.org, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, maarten.lankhorst@linux.intel.com, mchehab@kernel.org, mripard@kernel.org, nicolas@ndufresne.ca, ribalda@chromium.org, sakari.ailus@linux.intel.com, sebastian.hesselbarth@gmail.com, tfiga@chromium.org, tzimmermann@suse.de, "Hsia-Jun(Randy) Li" Subject: [PATCH v3 2/4] media: videodev2.h: add pixel format modifiers Date: Tue, 1 Nov 2022 18:04:46 +0800 Message-Id: <20221101100448.66712-3-randy.li@synaptics.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221101100448.66712-1-randy.li@synaptics.com> References: <20221101100448.66712-1-randy.li@synaptics.com> X-ClientProxiedBy: PH0PR07CA0027.namprd07.prod.outlook.com (2603:10b6:510:5::32) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|MW4PR03MB6362:EE_ X-MS-Office365-Filtering-Correlation-Id: fbe8876a-776a-444b-52c3-08dabbf0a7d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H4SUqSfy3xre2VoMOqhxyjpdd9Yh3pk9dZQPsjBGLnj5Kosk5xq0ceuJCqSXpQzm5z7NTAoL8Npu9OqMYxB99v3ObJkA1Htgzb65ZLbrf1EeoXAqUnpP5qSFynHuRBCBjUh5JtDSLk1+gxkSftiuQXVOqCisKemG3DW+10uC5o9HoJiYNLY2jDxpDRHK24XhnB+6OM7FyRpapS9TYeb2DVGfG7C+erEDurRUsHd3hQ4Jl32syKPeYaSiWLKb3JDMb4OKcvRSmEflEuMYaSJqq7p3ueb5AqRdcyp7oTZ1seCe+v4aFVQyRp2vGcbFy4IniY96D0oBfe1wANogP4hriO2wGvEIjNWVik5sY3/EG6gCVsWSe8pUT+LHnSQQYHLAYy60ydA0FF/Lgdht8svTFLcgR76a7DSkR9bxVHv9C69ULVZ79Pg1ghJfMk9JAZ2CPvAvUZyjw7JudmEw+utOttOJ2VaNnnmNQwnbTPVogmMFZiWZ38f0F/VR53KMnHMdcErVMDtT1nJi+w/nbR+U2ErKWKXw1Km3OM4QF0Z6JSObwwGeRdvaYtcD46tfwaKqvXdj4cshQ3hiBJu/PVr42KIkUyF3FIpL29MgIfv/e8xFPdytyfFfYFpDxEfomn7irshqzDq917TJZ2luM6cpeOlxnxKQ4lHf8xvD1xaNP0hBwYn7Za1k8VXxb+fYRkVl0FW/xCy6gGb9Dk0yb72zFKrillggT2sWk6L9L0PQkLIdU26ZEh0YA/OhD4POu3jE X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR03MB5196.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(346002)(39860400002)(396003)(136003)(366004)(451199015)(36756003)(478600001)(86362001)(6486002)(6506007)(66946007)(316002)(6916009)(66476007)(66556008)(107886003)(4326008)(8676002)(6666004)(52116002)(6512007)(8936002)(5660300002)(26005)(41300700001)(1076003)(2906002)(186003)(7416002)(2616005)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HbxwtuiiREkKfFQd4tCbaTI3X9JCeNhumQYX1Jov0UhwvM7cSVlaOpKCK79q5qmHWMe1sEPSlTSAKAFoK/1DplrUNDqcIHtT6gwmiWigXJz24AxrRFOuEFDJBXhtjMvLF39Iqy/p1aRiL8vxU3I83ogFRLDH8/2k7mbcGUFWudsBdsMbN9rExANGKq3BDyxzBGnUGckmTM1oaWfcPmGRJfRUoB6Q4A/z3tFaUb5OSuR+cCDHI8aGDv6MjbXtGRqtHF27K/646HBMLztS8OZP8xh2+9hHzRfCLBSzdRvpul5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et+4lSa268GXCueZ8OOv8hF+NVIJ79q9zJeQb2KBX6uMRpCAoNri4avPyVXrggCykl9b8tImhEdNF9WUOvNyHpHniw2GR2t5M6w/sUHEqYiCDyjKFu8EGQmxKe6Uq6980Bae8i3ohS47vVU9tmfKWPUeQ+A/Z0eaItVJBMFSPz+cATzxiuIkEbgrn50InQ6lSYJDamikBDEkGRw/kgwA2 X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: fbe8876a-776a-444b-52c3-08dabbf0a7d5 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2022 10:05:51.1791 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nbV16mQ5ipMUr9n6weVeaN3UaUciPfTJSQqVK8nSP6366VvUQv4v3fYPUrwqR3c8DJfkOa0SEYusQU0x7A0YWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR03MB6362 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748288650270919642?= X-GMAIL-MSGID: =?utf-8?q?1748288650270919642?= From: "Hsia-Jun(Randy) Li" Signed-off-by: Hsia-Jun(Randy) Li --- include/uapi/linux/videodev2.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 29da1f4b4578..d00b2e9c0c54 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -816,6 +816,26 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001 #define V4L2_PIX_FMT_FLAG_SET_CSC 0x00000002 +/* + * F O R M A T M O D I F I E S + */ +/* Vendor Ids: */ +#define V4L2_PIX_FMT_RESERVED ((1ULL << 56) - 1) + +#define fourcc_mod_get_vendor(modifier) \ + (((modifier) >> 56) & 0xff) + +#define fourcc_mod_is_vendor(modifier, vendor) \ + (fourcc_mod_get_vendor(modifier) == V4L2_PIX_FMT_MOD_VENDOR_## vendor) + +#define fourcc_mod_code(vendor, val) \ + ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL)) + +/* Format Modifier tokens */ +#define V4L2_PIX_FMT_MOD_INVALID fourcc_mod_code(NONE, V4L2_PIX_FMT_RESERVED) +#define V4L2_PIX_FMT_MOD_LINEAR fourcc_mod_code(NONE, 0) + + /* * F O R M A T E N U M E R A T I O N */ From patchwork Tue Nov 1 10:04:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsia-Jun Li X-Patchwork-Id: 13615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2866168wru; Tue, 1 Nov 2022 03:21:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4S/fBE9Z9iyYcmST07HrljT1SWC+u6yt8i1JRo/KEN4uVDPcsbFJZlHg84BaCErWCVvR8t X-Received: by 2002:a17:90a:e7c5:b0:213:b7d8:1c4c with SMTP id kb5-20020a17090ae7c500b00213b7d81c4cmr16622191pjb.114.1667298110875; Tue, 01 Nov 2022 03:21:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667298110; cv=pass; d=google.com; s=arc-20160816; b=IBDHoCytkFgGJQND/HAc8AHBYeOS8SbFeO6tQuPoJrUcKMRHn+BO0iMybYu02A+gHN CfZRyPj+WBdpUszmmDpUG4sNv9i+4DBAcPPZjMt9iha/27VH3WHaC3aLhHty9rwX0h/4 IS6vO28S6te/zKBvNUr5ZwxCNE4+vr2iJOtzeUHgWHn6jpKbsE20YTlqD3G+NLZEhdsh KsyY/36MinfEuO//K3yJdBe8qwO6Nk4harItof6FKkfNu5PxjfsquYBCOw875dQOr8i8 zCvNTp1wm/Svyqm3dfDVEJDLeM1QrcbqKb7Q4LG4ESFqftA5HGN6vIecnkQlW2AXlHsl 7oVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bGWXHCfVmsuYLcSCyIMtnZMpsNorfEL3N5kqqbbCOvQ=; b=WNXNstfyVGq8JCy4sfPuReiy8oswYt7O9j0AUsW7UoT+PoBczCEui+BF4IWXTBmpxX +vx4TLOs7g4kuSyTz0EIGCGn8F0HgxwuIQ01eW0cFz3GVQrTbFDBopxsXsZgFkawgkCL 3pQporVAzkRn9pIUObJcBbrY/GMFuDSOx0sFW1mrY45xet7GHdHyMN43Qqw0Q1vcgF5V c8HV0TqC9O+qrDgqNbf5RJlibMi6myQnTkf3By9C4j4LAsCCljDAP2KeIAK3H3K8d15w hHhouZWxFX5A+WioIntamVbhgMbjb4vxWGMIQNbcH9gCLdEtaCSgGexAiogjUnivEWu3 hjbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b="cgoFC/ub"; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nh16-20020a17090b365000b0021414ac5cc2si1195475pjb.131.2022.11.01.03.21.36; Tue, 01 Nov 2022 03:21:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b="cgoFC/ub"; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231139AbiKAKGK (ORCPT + 99 others); Tue, 1 Nov 2022 06:06:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230516AbiKAKGG (ORCPT ); Tue, 1 Nov 2022 06:06:06 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2047.outbound.protection.outlook.com [40.107.93.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA5C1193EA; Tue, 1 Nov 2022 03:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l5AA6XkYDwGGJZ+WfxkU4zatLNTFhYI0aHpdoHKxRVMcgOAWHvOCUIsW0qG6aWQFa6/E1JKpZQTUYEGYIjbcSP3sehfbflu/l6np0X09e5f2bKGQ2NSfF9msE13Ci3M+ANPQmLhbk4woG4lseYPpyzAI5eT6WZFy2NtKNifOHNOONf0jZwN5A/0U3rYn0vI9JAltQ4taAMuA1o4rNlpsOkv6qKCy1GVNHV0XY40TkAoZ5wdJO5yaXujceN4T+2Q+xQULUoXLabOcRcRtMl7QOwsomVpaMe/1nbwCZckTH93GU0mI6YQdQuNZS9RFJKWEf0OUP+AoCf4dB2nx7eb56Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bGWXHCfVmsuYLcSCyIMtnZMpsNorfEL3N5kqqbbCOvQ=; b=ij2Oh8J6OUDoEYm9dVcZrtDWGmV6VcHSSBzOyvE2ycbE1MU1ybHijM2NqNbsbDf2SzgNnE8GgQImLMIE1xpU0OZXZqnS7aJvKAAXXueyYaKqvl4UAdFw7gjQ6qdL20S0nSIaUhLFqPcWe3FBakDGmThu2UFszZAfA+VXXOJq0bvodIey4TWmpsIm3iBvslVkb9BJROxAflLqzBJW8SclyDBqlKOc+9rIMMenLY8BDxiyflQvfiUhM5cl/9R91eCNxsoueRsVby5ci9/cYvPS1SBL/oDcpnLkElFnEcDMbJUJ8cr2XsetzT1bD5ShJlZ0JCAvf+67Ef8rkMKkYCjxcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bGWXHCfVmsuYLcSCyIMtnZMpsNorfEL3N5kqqbbCOvQ=; b=cgoFC/ub6td0TmyygbJYaYJGRVljjZvxdeFMbKyNvOssQNKHIBelRDdBU8u3LhwelYq1ZrL/AIG+kB/eSo0BrANDRrDs+fu034PqrpPVP8U401n9g3GcWM/y5nESuLssi31BoFHplJQmtn//IVF9c++bAAj/aJgVX0vITlHp+XA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=synaptics.com; Received: from DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) by MW4PR03MB6362.namprd03.prod.outlook.com (2603:10b6:303:11d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.19; Tue, 1 Nov 2022 10:05:58 +0000 Received: from DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1]) by DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1%7]) with mapi id 15.20.5769.021; Tue, 1 Nov 2022 10:05:58 +0000 From: Hsia-Jun Li To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, daniel@ffwll.ch, ezequiel@vanguardiasur.com.ar, helen.koike@collabora.com, hverkuil-cisco@xs4all.nl, jszhang@kernel.org, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, maarten.lankhorst@linux.intel.com, mchehab@kernel.org, mripard@kernel.org, nicolas@ndufresne.ca, ribalda@chromium.org, sakari.ailus@linux.intel.com, sebastian.hesselbarth@gmail.com, tfiga@chromium.org, tzimmermann@suse.de, "Hsia-Jun(Randy) Li" Subject: [PATCH v3 3/4] media: videodev2.h: add Synaptics tiled modifiers Date: Tue, 1 Nov 2022 18:04:47 +0800 Message-Id: <20221101100448.66712-4-randy.li@synaptics.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221101100448.66712-1-randy.li@synaptics.com> References: <20221101100448.66712-1-randy.li@synaptics.com> X-ClientProxiedBy: PH0PR07CA0027.namprd07.prod.outlook.com (2603:10b6:510:5::32) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|MW4PR03MB6362:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c1d07bb-cfb5-46fb-74e0-08dabbf0abe7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CbWjIm2kG5u02ZBzY587Ffy4BZ+0pnUE83e+JfrVIIeaC4UtMuDad75yvZK8Jxo9wA2u0d6/aIvuCuLBpWxbYaeLj8YxJkiUe90bXB8/7cyoS7MuUZyQQ7Flwr2pjHuJxXzBDdWW4CKetBSICFR4WQKHQPhZsirLi1rtJw3hKeddqQIcmmw8XcpNy90G1dlchjr2Ao4Iu6PUqJItqxHfk++ZqAj6H12xjrL8tiwlu/tEyclc+hFkhcK+kn7Z9tkdhQhy7r9FhSYAzN2QqnJEy3oUGAxYmVsGR+IRbCmY55CTeVfagG7RBZScRBvEAzVmsnB0mQtkPYzJ5kk0JQovF0uFaJ433okFXNkBLHEk/MT+IuI72GRMEg3MFaWVuARl1y7Bj7N5854YG6lsghRNlC6EmxZ+gspvQmv6rfMAJqnhIN0FLWw9mAmEtOhO7YbFh29FxrT2XcrDse0sX/btBbRqkL/vb+GKJwklhh/is6yJvW6Zu+yr8dLdMEkcHmuCzL25DCP91EZd1FC7mlyikCT4QySibDRlqaTouns0JkD90q9CKJ7ZuwvD0QGtRFsavT2WXueLnI25NPXjVlW92L/KiNpbFtjcquuKqTYSC5ptEoTbqECKPdoUdEUgo9YO6Y/8AiUkY+Wx0gMbxkS2F+1nX3iyHr9KYuhW5rkUfRl2Vc54NJ/BEuKjOY04zy0X+V0pS/h1Uandn4jR753C3vHFEB9JAT3XnuZx6KuAOJkyIEPD+B4yLVeuZH220gFD X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR03MB5196.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(346002)(39860400002)(396003)(136003)(366004)(451199015)(36756003)(478600001)(86362001)(6486002)(6506007)(66946007)(316002)(6916009)(66476007)(66556008)(107886003)(4326008)(8676002)(6666004)(52116002)(6512007)(8936002)(5660300002)(26005)(41300700001)(1076003)(2906002)(186003)(7416002)(2616005)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1/dIRCIBP8+GseE/iDXECzJqJ+p7tco7GjziOu7ZEbv/P7SKITQhhT3k09/aolVQ2UotKHJn/GPzAtXpYhTOukr6hBFxS1rT+XWbWhhjJynYXLGj5CChWXGjLMgDFGFWoZ4uNFwMuoOkULgeVYEify1SVSNy6P8PweBONYxteX6Wgj5J5Q/ISuL38q/dQ1uc2jSB7jiQspRoqEC35ECcdl0Ms0gH3vcLvH/SYoMQwIf/vz4Dw0cRV94R2ciQou5GYBUW+W5gm9zD8G1x3Y+nvmA/EvC1Lf2RgHNDp9JXLDBUYjv7EJDGTnYjbftNlHVotBdLC7U/f50NS/3n8kVp4Fzu6bkZLldwMB7QHv8gTohq034QsSzdfNZXviZuK9kGu9t5SrvKEjCvQX6oBpkvaooaaGgkH/bd9y7gUXv5/EhH7OVDC9+M7cMCM6L0vjJhWMsDbqCDbWSxHkx6qnHuGhqfXAbANbxaJoCIzq/sAavXPsvdAlcVL9vwZUFnv9vjBYCjRl6+uIMuEZtP54Es/HH0Aa9wsDbRBEM6pkiZ9AcJgBbUtdYjYWtBYdX4EjTlmS9uoNADoY1DSO43hperq/ea7JjOQcb+TqC4G/lGK4xc6nYiCkBbAX/XEovZwh+KFf1jTX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prd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2022 10:05:58.0413 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6liF0HVGxBIbKP3bF50EdsacFJqDYQVvr/C4ZymqDa3ZaM08kvIruwEli602sr9eilRtAHDLVaH6Gn6jBiRLqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR03MB6362 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748288783648454617?= X-GMAIL-MSGID: =?utf-8?q?1748288783648454617?= From: "Hsia-Jun(Randy) Li" These modifiers would have the same values as the one defined in drm_fourcc.h, they would just be named in v4l2 style. Signed-off-by: Hsia-Jun(Randy) Li --- include/uapi/linux/videodev2.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index d00b2e9c0c54..71136f29362e 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -820,6 +820,8 @@ struct v4l2_pix_format { * F O R M A T M O D I F I E S */ /* Vendor Ids: */ +#define V4L2_PIX_FMT_MOD_VENDOR_SYNAPTICS 0x0b + #define V4L2_PIX_FMT_RESERVED ((1ULL << 56) - 1) #define fourcc_mod_get_vendor(modifier) \ @@ -835,6 +837,34 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_MOD_INVALID fourcc_mod_code(NONE, V4L2_PIX_FMT_RESERVED) #define V4L2_PIX_FMT_MOD_LINEAR fourcc_mod_code(NONE, 0) +/* Synaptics VideoSmart modifiers */ +#define V4L2_PIX_FMT_MOD_SYNA_V4_TILED fourcc_mod_code(SYNAPTICS, 1) +#define V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(f, m, p, g, h, v, c) \ + fourcc_mod_code(SYNAPTICS, ((__u64)((f) & 0xff) | \ + ((__u64)((m) & 0xff) << 8) | \ + ((__u64)((p) & 0xf) << 16) | \ + ((__u64)((g) & 0x1) << 20) | \ + ((__u64)((h) & 0xf) << 24) | \ + ((__u64)((v) & 0xf) << 28) | \ + ((__u64)((c) & 0x1) << 36))) + +#define V4L2_PIX_FMT_MOD_SYNA_V4H1 \ + V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 0, 0, 0, 0) + +#define V4L2_PIX_FMT_MOD_SYNA_V4H3P8 \ + V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 0, 0, 0, 0) + +#define V4L2_PIX_FMT_MOD_SYNA_V4H1_64L4C \ + V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 1, 6, 2, 1) + +#define V4L2_PIX_FMT_MOD_SYNA_V4H3P8_64L4C \ + V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 1, 6, 2, 1) + +#define V4L2_PIX_FMT_MOD_SYNA_V4H1_128L128C \ + V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 1, 0, 1, 7, 7, 1) + +#define V4L2_PIX_FMT_MOD_SYNA_V4H3P8_128L128C \ + V4L2_PIX_FMT_MOD_SYNA_MTR_LINEAR_2D(1, 3, 8, 1, 7, 7, 1) /* * F O R M A T E N U M E R A T I O N From patchwork Tue Nov 1 10:04:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsia-Jun Li X-Patchwork-Id: 13613 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2864625wru; Tue, 1 Nov 2022 03:18:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6JtYQD1UUegvT7mtpMB0L+2p3cHOxHNjq5RBGNxVX5VxtJNUzf3/j14YTS3iJTFFXy7US3 X-Received: by 2002:a17:90a:2b47:b0:213:a42a:13e5 with SMTP id y7-20020a17090a2b4700b00213a42a13e5mr19902687pjc.31.1667297889286; Tue, 01 Nov 2022 03:18:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667297889; cv=pass; d=google.com; s=arc-20160816; b=etfYpVa+yqSsaF/L4OpYbhVhDz96/Rrb/GfdCLtmgeO4fZeDrv1srUbk5YTWzPa49D HK8G6aNJNjhHwpXNS8jDh+RpSE+MI/G5IyO+/wK8Di+mYoejOxSJ20Xa3OChi9jSjG8W FQ/XMbAB+8BRijsCD0hVMTDCPxHLdqCiwsm76RZqlBZKl3Rq7hrDHyr4GaCVD5+7b/sy OUg6KhMKHSofS7Zwa5mWmrLAsWXFjswtPWmwCXZQ4IXRryq3+1Gv29LgO2pLyqfvXPOf iTeuBR2xSPFnu2jKFPSemmlaxJIwtdkQHwW/y+wR+Z7FEcrpL9bHiBInHS3bVyQRq7PT vLdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Jj8X2JAuoVt7MYn/KTkonbBhmATOBWmno/dmYGJjTjI=; b=Ki14WoPF3wbu/4S6F4wjKH03l5QqZIpTQFbGgtGhN5rxyHBjlPwsaffsgsnvi0QWnH kTWtdCXH+J8sKrMABcwqNpkyM4K4jgWjs+1AmJJfLcUhvoFVgrMZ4pD3XGJE9U+a8MA7 pzpyTHy/GVaiGIW0ZtEyXDFHPLorvEO6/YrVVsi8u9YvFxQTB+Xm6hCgmOpovMiyv8Wv 0G4u3MDVxDRcEHwu7FiWD6wWG52uAr7U8f1whrhkXBPteNCESdAr8AJMtKAcYht7mwNA Ku2ADCCtsXyF8ROG6V+azyvmXa9NuMs1bMvjS6rfpRfAYq1CfkJWEcb2sQcVav6DMgMA Dxgw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=C81wPAyE; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x19-20020a170902ea9300b00186940d7eaasi11438866plb.31.2022.11.01.03.17.54; Tue, 01 Nov 2022 03:18:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=C81wPAyE; arc=pass (i=1 spf=pass spfdomain=synaptics.com dkim=pass dkdomain=synaptics.com dmarc=pass fromdomain=synaptics.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synaptics.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230526AbiKAKGS (ORCPT + 99 others); Tue, 1 Nov 2022 06:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231144AbiKAKGK (ORCPT ); Tue, 1 Nov 2022 06:06:10 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2041.outbound.protection.outlook.com [40.107.93.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4A79193D9; Tue, 1 Nov 2022 03:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ewhXSV95+nY18uxbHWOpbTxULpuKaEVYumMCkQ3ONp1jg9w6LlCbmlZVFyHcwoW2kaliSwo/QuX+JI/LfJhDfGxGa+mWB5NXFv5Ny2eqAfUTwqX5uNY6nAgjAu4JT2h3i4+fkCIoLZ1ucpNgCco1TEMliZmEYhTS1UK67qoGiIEvpFvf0+SD770Z17EahCezg+Ltxsm06srGMruJ91nuLabw0N3/y6xoalkUfZrY5IOHa7HhnPsP3klsPdHDff4yRG/gJwIPK3Jjhpz9nl4RGKMjyqTw2CWwJ9+PsUxk3cq6fAYFNG/oyYU0vuqxrmfnaP4sB36ajtFWADY6ydz0cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Jj8X2JAuoVt7MYn/KTkonbBhmATOBWmno/dmYGJjTjI=; b=Q4sxO2xHzy8Li6MxiiZ/PQjvs/InoEty6N4GNkECAaYC3mMeWXEJQr6LZZg9GdQ2gVlPlLEgK7aaCg8dbRNOtHWL2QURw//KZbm05kYa5qNYXCPPbEBVyf3DjV60wkxz0+bRY0W0QhSZy+oMog5Kz4qei5XdlYI/xTvBfZ5Gw5uOsFVF/YCyjfjMCNm5zVLdK4ZuaaEB7VWsGT2KWM+OCOgtze8hxFuXjLqWj56OhKZVm8zql4Px0EZ5t+Q9Zui03+oIMlVI2hdsQAJxuF0D/ZAbgTqW1I4mmZxBG52rlPDq6XMYNEiot2ZxI1awDcU6rMd35VC9PqHMjNhMdRJOPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jj8X2JAuoVt7MYn/KTkonbBhmATOBWmno/dmYGJjTjI=; b=C81wPAyEm2dN+i9BcxQPjZIIZrkyP1mtSlogl95mCfo2bS6fidVAh/1qjcr8gr/5ZwbdNEbC0/nrQ4cvHQAAyLtFV9pcUAPMQYxudJZWVgeq57l4QXBkNYJ5H5p9aS8Gquzk7u9JZlAryqpOp7jlmuvz+X4Burv/r0p4y6exfo0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=synaptics.com; Received: from DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) by MW4PR03MB6362.namprd03.prod.outlook.com (2603:10b6:303:11d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.19; Tue, 1 Nov 2022 10:06:05 +0000 Received: from DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1]) by DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1%7]) with mapi id 15.20.5769.021; Tue, 1 Nov 2022 10:06:04 +0000 From: Hsia-Jun Li To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, daniel@ffwll.ch, ezequiel@vanguardiasur.com.ar, helen.koike@collabora.com, hverkuil-cisco@xs4all.nl, jszhang@kernel.org, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, maarten.lankhorst@linux.intel.com, mchehab@kernel.org, mripard@kernel.org, nicolas@ndufresne.ca, ribalda@chromium.org, sakari.ailus@linux.intel.com, sebastian.hesselbarth@gmail.com, tfiga@chromium.org, tzimmermann@suse.de, Randy Li , Hsia-Jun Li Subject: [PATCH v3 4/4] media: docs: Add Synpatics tile modifiers Date: Tue, 1 Nov 2022 18:04:48 +0800 Message-Id: <20221101100448.66712-5-randy.li@synaptics.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221101100448.66712-1-randy.li@synaptics.com> References: <20221101100448.66712-1-randy.li@synaptics.com> X-ClientProxiedBy: PH0PR07CA0027.namprd07.prod.outlook.com (2603:10b6:510:5::32) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|MW4PR03MB6362:EE_ X-MS-Office365-Filtering-Correlation-Id: cd0cd50a-1852-4a7c-9024-08dabbf0aff9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PkdjGMztzOGVzQli/RLaPuR7/KfEZfWDFL1fWdPjghWEWT6goXtW3nx+DRSi6iLhWIlaE5e3peBtNDXz3H8KW3+TaC531/98F5d0ApkKBtv9d9fxwhQwkAKVpY5jxQCZhuA9t6ru19NgrDrx7tvXOr3frPvXTzBvaCV7pHt5ZnKmOR0/pqJihuSQoYOCunSl8pzvJGUzrzYo/jA1qBInxv3Q2CziYwiKKcRBMROgCUiKoIe3xl/0JRob97WHqXFU9X3f0KggsjkJPVLmNSIyPsW2V/0TTxjHj/QVJA2+h9TOA9D23y2+27A+LVzdztnFPYNwZczW/IF/sijxrgDxMq2jVJTreJPEypWKE7sDAgFxy98ka66MnppY935n6nOTWZwM/TCGTe2t37PkyzwVmholNSbMfHMCMkxHnqRKOe3tdj6dAoNhHgtJyhkd57X96CNhHN5iDmk+se5WaceuhVep78O6ao52X/aJZxIEvrcnYHbsw4Zj1I8iPan4GF/DEZs+ZGny58e0WkdW+4eda0xMR6fSfFeCPTVoiTx1Dno+AtELXDpBpVQQNNq1fuAp1lmUk9oHs9mS/R2SevlDGRLl/GmKai1kXEjmXn6rmJCOG9qF/e7p+GBrCaSxnCZBX6ZHy+T5Cb379O/4UJIRW+2Sq6Jq0hjTSaowvA4hyc1+v2SVOnAVakEr2PzrQz+TCsW8phXlE9zfmUkSRhmrJSEr5enPH5ubhEQ7JAnPT7ic2vz7Gyqjh0wI4VIr16Bn X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR03MB5196.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(346002)(39860400002)(396003)(136003)(366004)(451199015)(36756003)(478600001)(86362001)(6486002)(6506007)(66946007)(316002)(54906003)(6916009)(66476007)(66556008)(107886003)(4326008)(8676002)(6666004)(52116002)(6512007)(83380400001)(8936002)(5660300002)(26005)(41300700001)(1076003)(2906002)(186003)(7416002)(2616005)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xiEZ0dsLmpDHMJJi3776Mn1OmjCOWRZhpCy3CxEJHm2A3HffBl2b4JZmDlBVDWtxpoK9G7CjWSB8ivn3QrH8Z8FOTXXftzm+uZHiUTVjE2/VzN/8i2IJl40Rmx40O+p61j9q6G41LC2RxZbxeqEwbCERLxEPAWMARp08yHSaOxA2CXAJ8aENJUjE4oi4obhtv//NgLkC9j35/egVwPElYaobvQJBfnOXQN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fTMk0ki9ygSqAk7sxs63ufg4KJSJdjO78bMx6jGFoW3hXbZsQG7RrCtPyjJS7br6qYYJqAieIA34GLV4BNJwatt5rXv4NI7s8RBAiDCxRy1FZCtm9iZtwY+uaJooII6DbqWneaIByyoY4Pvg7nl4ujkNRvMke46NuFYVvgc8qiK/4Zzb1od2bywH0rHc+oBj3vlZ1tPhVpvQDP8ElgviO710lVD82QWJLL3Bho89xdO4dDV5Jb3Zqt6cpacK+S/A3j8FwzMr0bDkONADd2reykPzhC/uZglB9lH X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd0cd50a-1852-4a7c-9024-08dabbf0aff9 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2022 10:06:04.9009 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GIgqwqd9U/luus+kLaZdlRcZ6JQOlOCPKegv60VGsP47uI9GCRb6fc1rZoi8Ed3D01o1reWHoWsJQrgSlJDRfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR03MB6362 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748288551296495017?= X-GMAIL-MSGID: =?utf-8?q?1748288551296495017?= From: Randy Li The pixel formats used in Synpatics video smart platform are too many. It is impossible to store them in fourcc namespace. Signed-off-by: Randy Li Signed-off-by: Hsia-Jun(Randy) Li --- .../media/v4l/pixfmt-synaptics.rst | 86 +++++++++++++++++++ .../userspace-api/media/v4l/pixfmt.rst | 1 + 2 files changed, 87 insertions(+) create mode 100644 Documentation/userspace-api/media/v4l/pixfmt-synaptics.rst diff --git a/Documentation/userspace-api/media/v4l/pixfmt-synaptics.rst b/Documentation/userspace-api/media/v4l/pixfmt-synaptics.rst new file mode 100644 index 000000000000..edf6525a3ef4 --- /dev/null +++ b/Documentation/userspace-api/media/v4l/pixfmt-synaptics.rst @@ -0,0 +1,86 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later + +.. _pixfmt-synaptics: + +*************************** +Synaptics Pixel Format Modifiers +*************************** + +The tiled pixel formats in synpatics video smart platform have +many variants. Here just list the most widely pixel format modifiers +here. The value here should be the same as the one defined in the +``drm_fourcc.h`` file. + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm}| + +.. raw:: latex + + \small + +.. _reserved-formats: + +.. flat-table:: Synpatics Image Format Modifiers + :header-rows: 1 + :stub-columns: 0 + :widths: 3 1 4 + + * - Identifier + - Code + - Details + * .. _V4L2-PIX-FMT-MOD-SYNA-V4H1: + + - ``V4L2_PIX_FMT_MOD_SYNA_V4H1`` + - '0x0b00000000000101' + - The plain uncompressed 8bits tile format. It sounds similar to + Intel's Y-tile. but it won't take any pixel from the next X direction + in a tile group. The line stride and image height must be aligned to + a multiple of 16. The height of chrominance plane would plus 8. + This modifier current would be in conjunction with ``V4L2_PIX_FMT_NV12`` + or ``V4L2_PIX_FMT_NV12M``. + * .. _V4L2-PIX-FMT-MOD-SYNA-V4H3P8: + + - ``V4L2_PIX_FMT_MOD_SYNA_V4H3P8`` + - '0x0b00000000080301' + - The plain uncompressed 10bits tile format. It stores pixel in 2D + 3x4 tiles with a 8bits padding to each of tiles. Then tile is in a + 128 bytes cache line. This modifier would be in conjunction with + ``V4L2_PIX_FMT_NV15``. + * .. _V4L2-PIX-FMT-MOD-SYNA-V4H1-64L4C: + + - ``V4L2_PIX_FMT_MOD_SYNA_V4H1_64L4C`` + - '0x0b00000026100101' + - Compressed ``V4L2_PIX_FMT_MOD_SYNA_V4H1``. It stores 64x4 pixels + in 1x4 tiles. Each plane would request a meta plane (MTR plane) for + decompression. A MTR plane would have a 32 bytes parameters set. + * .. _V4L2-PIX-FMT-MOD-SYNA-V4H3P8-64L4C: + + - ``V4L2_PIX_FMT_MOD_SYNA_V4H3P8_64L4C`` + - '0x0b00000026180301' + - Compressed ``V4L2_PIX_FMT_MOD_SYNA_V4H3``. It stores 48x4 pixels + in 3x4 tiles, echo tile would have 8 bits padding. Then a group of tiles + would be 16 bytes(128 bits). + + Each plane would request a meta plane (MTR plane) for decompression. + A MTR plane would have a 32 bytes parameters set. + + * .. _V4L2-PIX-FMT-MOD-SYNA-V4H1-128L128C: + + - ``V4L2_PIX_FMT_MOD_SYNA_V4H1_128L128C`` + - '0x0b00000077100101' + - Compressed ``V4L2_PIX_FMT_MOD_SYNA_V4H1``. It stores 128x32 pixels + in 1x4 tiles. Each plane would request a meta plane (MTR plane) for + decompression. A MTR plane would have a 32 bytes parameters set. + * .. _V4L2-PIX-FMT-MOD-SYNA-V4H3P8-128L128C: + + - ``V4L2_PIX_FMT_MOD_SYNA_V4H3P8_128L128C`` + - '0x0b00000077180301' + - Compressed ``V4L2_PIX_FMT_MOD_SYNA_V4H3``. It stores 96x128 pixels + in 3x4 tiles, echo tile would have 8 bits padding. Then a group of tiles + would be 16 KiB. + + Each plane would request a meta plane (MTR plane) for + decompression. A MTR plane would have a 32 bytes parameters set. + +.. raw:: latex + + \normalsize diff --git a/Documentation/userspace-api/media/v4l/pixfmt.rst b/Documentation/userspace-api/media/v4l/pixfmt.rst index 11dab4a90630..738a160a4c41 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt.rst @@ -36,3 +36,4 @@ see also :ref:`VIDIOC_G_FBUF `.) colorspaces colorspaces-defs colorspaces-details + pixfmt-synaptics