From patchwork Wed Nov 30 09:21: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: 27701 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp821531wrr; Wed, 30 Nov 2022 01:32:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf6rPDLMzjZIUH8YGeKnf9C0QimE3awxwfpE1+54STnIgGpn20Uh5OooYrQJfnBIM2Umeac+ X-Received: by 2002:aa7:dc0c:0:b0:461:6f87:20bb with SMTP id b12-20020aa7dc0c000000b004616f8720bbmr55056012edu.300.1669800774877; Wed, 30 Nov 2022 01:32:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669800774; cv=pass; d=google.com; s=arc-20160816; b=ihEeErZL5uKKSbg6lE0JV8lFBZtFHndann8L14otcUkkOmSnP3hjIve7VetCXLZ9cl qYTaQaUG8ZKCK7cqh4Gjp8FBL7fqMv8YvLUlwyy1taG2rywfcauGxOuSm4qohxli2bNd W0J8DEaqSSaw4ZyXPa6SB9c3nfqu+AyLvf4blv35yYGtTShqqNsYShz3ox+rQCoQTtns IdlqGHUtjLQINJfWpDVvWJu2RhOQfSLx1Ju4ejykVz9qmS0oTSoBzMRBnh+QfZ1O7Nld UCUky8ssNug8jYw9X5blHdw2Hj+p87vrWWEDcE88J2vVuvd+Y8C1h6F7GiPoh1j+YwUY mVHw== 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=IDe+Khwrk0Mx0SyEH631hwKJYvjz0f0UJCYJIIXhaUE=; b=w5PtwK5hFiaoxUh3pBEgSDXME9gy0B4bgHlEDtUNSg+JAzeMHDifBQ1JiRxLO/dPRl rJ8TPCgXxl3nQiDOKxuKZ6sxVTV5VPJmeLOmUXZdzd9SqcsRQ5g4uTch5zR9dsNnBlDP gz+rQtEc8AIq6Jk7aqynOHxSZEEyHW9klU3COTPkb5qFQEqnyOrddVKwAGwZbEaXb7Xk YwmgkHMcxPjNyYsA2HWdvfj343H1+/wah93r68CEM2MbYmDjjOuRjsBVGihpW0ZL6BxH rpAr+8SiOqo7lJO1oSonMDJcNPZ9M8m16WJ9iJ2vY3+79eCHXGqvVj6kfDy1sIi013KT AeFQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=PhYMlYg6; 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 gn12-20020a1709070d0c00b0078dcf11ccf7si875810ejc.802.2022.11.30.01.32.30; Wed, 30 Nov 2022 01:32:54 -0800 (PST) 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=PhYMlYg6; 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 S232868AbiK3JWm (ORCPT + 99 others); Wed, 30 Nov 2022 04:22:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232519AbiK3JWh (ORCPT ); Wed, 30 Nov 2022 04:22:37 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8C3465C7; Wed, 30 Nov 2022 01:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bu4t/AfmT1Ef3Q2eWyd5Jrp+EyPFQNIU9tRPc2RNvYoj+cjkGzBsp9FY8kaBi9A8V+59vluEPeIC+OBSDkdHXL/9NZEyqBlnCPsSOCeg8Nb0bdCAGEDVMJy0K1XvDv0+G5qvWkC1OqJQ7raoi1VF53hjeWSF+oPLMo/QTPk15ojrQhDPkE3wd/IBn/Eh6KuhoURhbadsflQveISpXXJ27QlIcB5nEpY9LcqfBH0OyUAzodycWw1nNFjL64a5XG4Uyua05a3Vgr+CUDEVw2h02+w7tr66+e1uIOXBqSnGDoo1pJww7yTa18TKsYX6e+qAFCI6C6YoUqte9JZx+Q9aFg== 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=IDe+Khwrk0Mx0SyEH631hwKJYvjz0f0UJCYJIIXhaUE=; b=YMEo+hOAwUC8375RFZC9dFGM8Rw880erWueAp5ew3bRYhy26glkXM/1x/T8EA2a2RESnRSyYAjLHc/XPmxGLJAjQSR+roQ80ptb8Q4VjWWMbk+nIPxgu76JiuT5QA9TvNH+ArbfMosbgonLVSrf/YhruGxu9UHc1wls72vE0Sg/S65LYiN6S/FWWEdXccqxcm8WInqhM+R61RqyoViHGIBPQ7f7Bq+GL5xOvX3aKlOUNv1TyRrrsVEmadG73Fj4Z+YlMc6ytwQfZFyTUGw3uFOKKcW0qBbRzXjfhS1LjpfJ9WkGaJEx3vM86O5KGTfjsntTGR7xk+xGkWlmuViLC6g== 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=IDe+Khwrk0Mx0SyEH631hwKJYvjz0f0UJCYJIIXhaUE=; b=PhYMlYg69obJDzcyUGwmaz/XcvsCCB0n+uHD2dnn+I0+yPDqVdjfqZQDzAsd3qhStZ3KsBLh3sLx2WuUHyXPviPXPtjIh3ztBsxCZzSEZdCO8FCdfYUp/dTFq3AaPnc0hzoPWC6Zj3yyhxjK4URh1DYihlFptjjWqb0fzgF2lw0= 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 SJ0PR03MB5422.namprd03.prod.outlook.com (2603:10b6:a03:27b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Wed, 30 Nov 2022 09:22:32 +0000 Received: from DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1]) by DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1%5]) with mapi id 15.20.5857.023; Wed, 30 Nov 2022 09:22:31 +0000 From: Hsia-Jun Li To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, ayaka@soulik.info, sakari.ailus@linux.intel.com, ezequiel@vanguardiasur.com.ar, tzimmermann@suse.de, linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, mchehab@kernel.org, tfiga@chromium.org, mripard@kernel.org, ribalda@chromium.org, maarten.lankhorst@linux.intel.com, linux-media@vger.kernel.org, sebastian.hesselbarth@gmail.com, helen.koike@collabora.com, nicolas@ndufresne.ca, linux-arm-kernel@lists.infradead.org, "Hsia-Jun(Randy) Li" Subject: [PATCH v5 1/2] drm/fourcc: Add Synaptics VideoSmart tiled modifiers Date: Wed, 30 Nov 2022 17:21:48 +0800 Message-Id: <20221130092149.102788-2-randy.li@synaptics.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221130092149.102788-1-randy.li@synaptics.com> References: <20221130092149.102788-1-randy.li@synaptics.com> X-ClientProxiedBy: SJ0PR05CA0142.namprd05.prod.outlook.com (2603:10b6:a03:33d::27) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|SJ0PR03MB5422:EE_ X-MS-Office365-Filtering-Correlation-Id: 394b1775-15f4-4219-2e59-08dad2b4686c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CXpzwpamuqMgI0SWw9LIsTvqc0jTC9Q/ECWDpC12FXg+nW5rf3XhIEZMTsTrv97qrP3d3y9O0Rlt0oQtxIvPPDvZqFtc+Dlcx01UZzgzwxlpaNVVstYPhWaTEHQf4wkI9UAmUNrxFYy009r/udoPijdA7MgSkRh/vesJtHLb+iYyD98qHl6qcMsULr30UyrWc1OxrwA4gFb4UHRv7wQ14/GkIOYPe0PC2VlakVGcmgHEdZJBYWeWrXLmQZhRtDvWiqQjMm0Wq3bhp2few9Pv4ZCw9OM7gUfi8RgP2wULw9qRnxytc3GZYn2xottEmWOACV44aQwqB03XJufvgNj4zi+ZRQCEczNfPZkR0wnBJTceswxAsOFYUZiamzSMWPXF1DvxuYUR3cXdtLm39Ezk7r9LYnSlVUCZ8nPyatPOh+Y4eHWZgrZO56n4wg7T4MQ9NplNc15fBXkdkgM1Czk9H34Dksjb7CZKUB0Z2kl4R4ud1vEvvCZF2kfD4Zo2uCy3IPUyuc3AbQHo38DZVFo+SWcbUudOJSOp5MZI5D/SJmjKh/JddxVr9su9E1da91q+lCKTOSUc9NKlvXLqm50QoEW1Dz5r+lruov48qWDRUZce1veWSTyxLVMBdTO2ceiGgG5tzyobEDX5xRvJckwQSvwRz2pAn6rHr7emVZ1HGmbxL5fI/Xh04+ZM7HofyKgA 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)(39860400002)(346002)(376002)(366004)(396003)(136003)(451199015)(8936002)(52116002)(6506007)(4326008)(8676002)(66556008)(36756003)(66476007)(2616005)(41300700001)(2906002)(6916009)(66946007)(186003)(478600001)(1076003)(26005)(316002)(6512007)(86362001)(6486002)(5660300002)(7416002)(38350700002)(38100700002)(6666004)(107886003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vRX7TxGufvaPMrXFyO2ItvfJpBL4oCjLBrVhGh3U3Jhm1udLcjLMtiUXAyVgsRVtg4BMEk3BM703nPS+n5AzlTCPakGRrVD+OwMJ7Hzy0C/DjG0pRo3z/mUQGRcddBs+q12SQpWNac+ZEigkpltjlyhyGdxjsPTJyYMeF+GN5VUY0pbqRPGD3Z1+pCJqXIa0xd0R5q282MJ15zUXFpY6WsqWHHmNg7qBee36Bn0GeubdjqLOw3ueNhtqcVuYBc1QYlwDk3YuLmytodZNPV5HXQx/wVis2Rzviy5xlD6K0UKFbLi1WOkXV/sMtKW1xzCBVoc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0md3Q6ogBqfoHXeYpw4nf5xfZ24qPSd1XVtE6qVkWtmfEQSclYJn8xxNIrn7EwE2SOZos+q7efvZGyZE7P49nyTRvDyAvPVFqqxERdSPRjUsS6Wn1j9vox7e2OX5Fqq04z4xipBu68pOEjd04dorJyc1+enmFuQB0N3mvmEtF4H55fa5aJD1aY24j7crUxxx87Xzc X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 394b1775-15f4-4219-2e59-08dad2b4686c X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 09:22:31.7193 (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: ug4CMYPpChM8FSTGvr0C4bOvMT4Q89cV9V6jH+w0bhDSiS5/4YjM/8prc8eiOmrH5n0Q0cSpuXkc3bxzCuhM2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR03MB5422 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?1750913017378115606?= X-GMAIL-MSGID: =?utf-8?q?1750913017378115606?= From: "Hsia-Jun(Randy) Li" 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. Signed-off-by: Hsia-Jun(Randy) Li --- include/uapi/drm/drm_fourcc.h | 76 +++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index bc056f2d537d..e0905f573f43 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,81 @@ 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. + * + * Besides, an 8 length 4 bytes arrary (32 bytes) would be need to store + * some compression parameters for a compression metadata plane. + * + * Further information can be found in + * Documentation/gpu/synaptics.rst + * + * 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 pixels, in GOTs. + * + * 31:28 v log2(vertical) of pixels, 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 Wed Nov 30 09:21:49 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: 27702 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp821532wrr; Wed, 30 Nov 2022 01:32:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf4bcvaWkBAyjeYbgiqAg11I6+wz3Od8iyifsNfnMSm4Nie8VBYZZXuKrjBXqzZppDQ3XI50 X-Received: by 2002:a17:906:7f92:b0:783:7020:53a7 with SMTP id f18-20020a1709067f9200b00783702053a7mr50410844ejr.736.1669800774937; Wed, 30 Nov 2022 01:32:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669800774; cv=pass; d=google.com; s=arc-20160816; b=ntRYjexKx2H1zMdV1sYvcyvaGLcE2H+W1ZtM/WvhehppZPTGj/D5QY+Nvag9lCHWiE tL0CvfiUM4nhiPjdlR+jiAk0wb+tnvv87itEOoYt8853gbIIdZL05Y0yIZtFy77k82A4 +/d54OSnB7Ga9gsJAbAgrK6T5EdAxiPBtle7poOq8zvqRm88LQ4ZMuGEGURrIj/DFRzQ QHwiz83u0MebCGG74ICh56S+HQ2Jh/tmHonzE9R7nitcX6yt+pVcF478IyJMsSqmBUlM UlA5Up3TNlzb8XuhP1/wB8uyyY0sj1wpqJdTE00g7W7ik8iyLcE01wmJBzY8/vZJuBg3 +QFQ== 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=ABCaPfmdnyZ1OMYQv+zcc5c0UsHTzNbNlbXcyCmW+58=; b=tdXtWri2VC3yf6TbbHY43hTXwOXqGJDEnhqZRS+9ej7o9sKm9gA4fOC9D74ldweoqV 8pokvgn0SBn9nXfSpHytrBm4InfP8CRgEiUGga6ocok6GXfmT7v7H2Br8JBvec/ZYxtx /HmqFM6/NSio4BRrsT9Mb5Q2aR9ImASsgjUWkfwVRuQveLkhtC2Mr4LiYnfcp2oTsZwv XtAiZOgWYH3e5Y8OGgt3u9cW85Fp08WS0JKh28pZ/arYpVp8+GkJrZeiCBYGt2/TwDPg M37KQ+okq0Ldh5vdCgYzno9ogXMTbrFcq9H6T0Ah3pMyWTHdcVDLlXhM4PmcElG/W9+v I5Jw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b="hJyBtI/5"; 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 o20-20020a1709064f9400b0078d99e20b68si688702eju.715.2022.11.30.01.32.31; Wed, 30 Nov 2022 01:32:54 -0800 (PST) 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="hJyBtI/5"; 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 S232900AbiK3JWr (ORCPT + 99 others); Wed, 30 Nov 2022 04:22:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232664AbiK3JWk (ORCPT ); Wed, 30 Nov 2022 04:22:40 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2049.outbound.protection.outlook.com [40.107.223.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83D7910FC9; Wed, 30 Nov 2022 01:22:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YdqhfquldSbNZUu4OAR3cTi/N2js1TaAWys8MEQLPiqHsU+wCXbIQB7XQnLrXjQ6tN71h/7wl1pgCpvAY+J3W1VapTBCN+j8yQGvby8csWCSzQtVYjL8sj9FlsRROmGDgSoupEfkUscB0RlHnLFHqvHSWGH/46GgnNsToQejM7g8lfWBBh8suplwMBfjmC163oZ0/onYxj6qifSxjVU1ByRp+AFcYdkn/QIqx8dJohFcUlM2e3jvJmg7yez5lFAvWTN6x9gMbbvUR4P9xv8ve48bZDRE8N1hM8/vy26oOSSYe4mr90dm2Zhzan1Qf9h3I0GXFh7FBtZWK73LczMgXA== 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=ABCaPfmdnyZ1OMYQv+zcc5c0UsHTzNbNlbXcyCmW+58=; b=S3iOtVThTO3wWNTywqk9tfz46Jq6quzERBdeaGV8+SJEfwj+s8wVuwOpFQLVo7PcArek0u5QrSiVqDkiD9reX1dCczkmjKWllfriiTGDU0BDa/cA5Hr2obfLTZXESSCvPxc07NupGYw4AQ4CDCen73jno0MBSllnxAny/o6MCzK/ORWO0S2Ob4hpHCvpFI//hsKaOufFO851dqcAuc4YpEsaRW4Jhg57SnxlzRqGSHRt9BsR92T+svjivPywpDkx7X2gLSWlGUqY1CWfdzRdNizJrfr+ua1EtKUjrba8Y8ZVYmAr7aB/QeQr2Ynbd7Ukwu14cMbng26DD9kIJK1tvw== 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=ABCaPfmdnyZ1OMYQv+zcc5c0UsHTzNbNlbXcyCmW+58=; b=hJyBtI/5HKIspYdPdtQZ7OzkRCtNDaR5dPOCw8lZsufTtsUwKhFQXGeSenmXNLu1e+kh3FSU2GAUgxCJbRUPK+2hSFF7Jh/8pVuDLGF/deXW+Jm+Czg/jLjeRq+mlElqP9DURmSuZyUSSZcrtKH3B70VBlcTZRwDbsKoVXEz2ew= 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 PH0PR03MB5799.namprd03.prod.outlook.com (2603:10b6:510:34::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Wed, 30 Nov 2022 09:22:37 +0000 Received: from DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1]) by DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1%5]) with mapi id 15.20.5857.023; Wed, 30 Nov 2022 09:22:37 +0000 From: Hsia-Jun Li To: dri-devel@lists.freedesktop.org Cc: airlied@linux.ie, ayaka@soulik.info, sakari.ailus@linux.intel.com, ezequiel@vanguardiasur.com.ar, tzimmermann@suse.de, linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, mchehab@kernel.org, tfiga@chromium.org, mripard@kernel.org, ribalda@chromium.org, maarten.lankhorst@linux.intel.com, linux-media@vger.kernel.org, sebastian.hesselbarth@gmail.com, helen.koike@collabora.com, nicolas@ndufresne.ca, linux-arm-kernel@lists.infradead.org, Hsia-Jun Li Subject: [PATCH v5 2/2] Documentation/gpu: Add Synaptics tiling formats documentation Date: Wed, 30 Nov 2022 17:21:49 +0800 Message-Id: <20221130092149.102788-3-randy.li@synaptics.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221130092149.102788-1-randy.li@synaptics.com> References: <20221130092149.102788-1-randy.li@synaptics.com> X-ClientProxiedBy: SJ0PR05CA0142.namprd05.prod.outlook.com (2603:10b6:a03:33d::27) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|PH0PR03MB5799:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d5819fc-b07b-4ddf-9669-08dad2b46ba5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sWATc+C+itzm4dTeDSsuhUBfuRc5AxklY6dHJcF6FpIMgNIAI9f5kIBXImzsoMzousKo84thc+XsH8EFgSbOZvw1M+KJ9BesKDRbJCPRDbYNTiH6bbMpVP/0ansmLAIc9/xvylHWKA+lEWW7/ANml73Nn/xPlWVfMIsgi5wcn2K6TLDxn2PGEaSUQuVWjDRb0nA8/uPMmLswJcHhP33Q/sZwrE/URFp/Rt3AEnJsFaX9yiMSjXSGmRez/BbHUMwHJVdzd8o7BRJW3HDeKdRCk3sls1r7HQxZg3jPVtVC+PC/kmJxh39kCm9bqsy44kEv4hG2gxmLki+/Jg4S/8T/MInC2XJLaXIXk9o6NipH5d52xn1OwjmFkEf8fT2euI3xOlIRZ8DZN+3pzvA8BsekQHWb7NXVkHdzQdhnYFhTbTIXWW7ZaCnGDWLk2jMYKcyTVD+BIJ3pkzkxtJ5obD8GwYYjnjZVJoVZx5INgK6x9mzQvUa74cq3bjYDWWxzs/jjH5KMEqW5w4r/ppbBSj/KB+GSiZdNacSe+KjbSPsdNu9m/WxsLv1ZKxECAWuPM0mglTb8wde5/xJRRyKz2ASad/SN3xglvY4Zn/0gKplmj6quQTdixRLHvjuthjShuVoAFlpvmSx00NJq4LtcsfnbKRM71mt3I44LNxSODI7hHmaDAJ2V/bcdJMq3mmBZNOHz 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)(136003)(346002)(366004)(396003)(376002)(39860400002)(451199015)(316002)(478600001)(66946007)(36756003)(2906002)(6916009)(1076003)(6486002)(86362001)(38100700002)(83380400001)(107886003)(6666004)(38350700002)(52116002)(6506007)(26005)(6512007)(186003)(2616005)(8936002)(5660300002)(7416002)(41300700001)(4326008)(8676002)(66556008)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VUU4ovx2KNm9EgVfupMqICKyJgS0U+E/ZofofFPi5M6X+0vozMZwvUtojaSH6n6zdaQYv3LfPKxxxLbD2uQTzsja9L0Wa02xeIbNBtxTbjkwDjf7uWjpUdK2TW3iy2nynYb23/al9jlXspNbXZOKRrwwoRVi8dAQ5lNOFO/UzzU7yQ4lXSvh2kcq7X4zV85g9FfTB11st3wv5uRylRUBgb4auusUYIBMIB37K9jurTOrKYSBCNl8vNmCRDtK5uHZ/5JRI9ft6nSG4aRH6AkUnAN7dSHirAjwNo8hKC49eCqv4BvsYF/NxW1GGEEgqxH1SgtsLUFK+ew7QdOHat3eVRZvY0//q8MP6329ii3ADVAg51J6WEIKgqRB6QXf3s8YbB3x95meWNzunWDTliaOXkDL1M/5ANL8qae3kazjTpytcuVa4MiYbHW9L/KdoGk6OkpDZ7p6OJIHYS94U6HVARld6WzCEav13TRhzfKUSmFoaqTwT36aCWG/bxNWMaMyvJqz0tyayGbJ7GTETuBd9e8Lvb2H3gr2LOGabOGE4kdN4JUIGRYrdt1mrF/ivnSVn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ddf-9669-08dad2b46ba5 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2022 09:22:37.0962 (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: MHOBV/e7NS3elbLarza+sGNZspRTyLHLkh6yU1+cEZGkL1DxM3lg/QOxBPRpP4GcLl9NCOqBuFXNE6FO/fdFCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR03MB5799 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?1750913017377056724?= X-GMAIL-MSGID: =?utf-8?q?1750913017377056724?= From: Randy Li Signed-off-by: Randy Li Signed-off-by: Hsia-Jun(Randy) Li --- Documentation/gpu/drivers.rst | 1 + Documentation/gpu/synaptics.rst | 104 ++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 Documentation/gpu/synaptics.rst diff --git a/Documentation/gpu/drivers.rst b/Documentation/gpu/drivers.rst index 3a52f48215a3..7e820c93d994 100644 --- a/Documentation/gpu/drivers.rst +++ b/Documentation/gpu/drivers.rst @@ -18,6 +18,7 @@ GPU Driver Documentation xen-front afbc komeda-kms + synaptics .. only:: subproject and html diff --git a/Documentation/gpu/synaptics.rst b/Documentation/gpu/synaptics.rst new file mode 100644 index 000000000000..b0564d2fe3ce --- /dev/null +++ b/Documentation/gpu/synaptics.rst @@ -0,0 +1,104 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later + +================ +Synaptics Tiling +================ + +The tiling pixel formats in Synpatics Video Smart platform have +many variants. Tiles could form the group of tiles(GOT), pixels +within a group rectangle are stored into tile. +There are two parameters which consist a modifier described +the (nearest) width and height pixels in a group. + +Meanwhile, the tile in a group may not follow dimension +layout, tile could form a small group of tiles, then that (sub)group +of tiles would form a bigger group. We won't describe the dimension +layout inside the group of tiles here. The layout of the group +of tiles is fixed with the group width and height parameters +in the same generation of the platform. + +Compression +=========== +The proprietary lossless image compression protocol in Synaptics +could minimizes the amount of data transferred (less memory bandwidth +consumption) between devices. It would usually apply to the tiling +pixel format. + +Each component would request an extra page aligned length buffer +for storing the compression meta data. Also a 32 bytes parameters +set would come with a compression meta data buffer. + +The component here corresponds to a signal type (i.e. Luma, Chroma). +They could be encoded into one or multiple metadata planes, but +their compression parameters would still be individual. + +Pixel format modifiers +====================== +Addition alignment requirement for stride and size of a memory plane +could apply beyond what has been mentioned below. Remember always +negotiating with all the devices in pipeline before allocation. + +.. raw:: latex + + \small + +.. tabularcolumns:: |p{5.8cm}|p{1.2cm}|p{10.3cm}| + +.. cssclass:: longtable + +.. flat-table:: Synpatics Image Format Modifiers + :header-rows: 1 + :stub-columns: 0 + :widths: 3 1 8 + + * - Identifier + - Fourcc + - Details + * .. _DRM-FORMAT-MOD-SYNA-V4H1 + + - ``DRM_FORMAT_MOD_SYNA_V4H1`` + - ``DRM_FORMAT_NV12`` + - The plain uncompressed 8 bits 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. + * .. _DRM-FORMAT-MOD-SYNA-V4H3P8 + + - ``DRM_FORMAT_MOD_SYNA_V4H3P8`` + - ``DRM_FORMAT_NV15`` + - The plain uncompressed 10 bits tile format. It stores pixel in 2D + 3x4 tiles with a 8bits padding to each of tile. Then a tile is in a + 128 bits cache line. + * .. _DRM-FORMAT-MOD-SYNA-V4H1-64L4-COMPRESSED + + - ``DRM_FORMAT_MOD_SYNA_V4H1_64L4_COMPRESSED`` + - ``DRM_FORMAT_NV12`` + - Group of tiles and compressed variant of ``DRM_FORMAT_MOD_SYNA_V4H1``. + A group of tiles would contain 64x4 pixels, where a tile has 1x4 + pixel. + * .. _DRM-FORMAT-MOD-SYNA-V4H3P8-64L4-COMPRESSED + + - ``DRM_FORMAT_MOD_SYNA_V4H3P8_64L4_COMPRESSED`` + - ``DRM_FORMAT_NV15`` + - Group of tiles and compressed variant of ``DRM_FORMAT_MOD_SYNA_V4H3P8``. + A group of tiles would contains 48x4 pixels, where a tile has 3x4 pixels + and a 8 bits padding in the end of a tile. A group of tiles would + be 256 bytes. + * .. _DRM-FORMAT-MOD-SYNA-V4H1-128L128-COMPRESSED + + - ``DRM_FORMAT_MOD_SYNA_V4H1_128L128_COMPRESSED`` + - ``DRM_FORMAT_NV12`` + - Group of tiles and compressed variant of ``DRM_FORMAT_MOD_SYNA_V4H1``. + A group of tiles would contain 128x32 pixels, where a tile has 1x4 pixel. + * .. _DRM-FORMAT-MOD-SYNA-V4H3P8-128L128-COMPRESSED + + - ``DRM_FORMAT_MOD_SYNA_V4H3P8_128L128_COMPRESSED`` + - ``DRM_FORMAT_NV15`` + - Group of tiles and compressed variant of ``DRM_FORMAT_MOD_SYNA_V4H3P8``. + A group of tiles would contains 96x128 pixels, where a tile has 3x4 pixels + and a 8 bits padding in the end of a tile. A group of tiles would + be 16 KiB. + +.. raw:: latex + + \normalsize