From patchwork Sun Oct 30 17:18:06 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: 13025147 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 34F07ECAAA1 for ; Sun, 30 Oct 2022 17:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NtC3sEWfyFNVwIBYOuxi5VUyfq/CSX/J/fsR4ZWkmWI=; b=mpYNhvVqgamW4f 7UXWS2ZP3ydHuPIjEbKRm1mxhsMN3HJ90zY/2sV7H9lWacN2mJ3JzOCGjd2s9PJe06YsTMax++2KP vONEd+nILCWHL0lTVV7ekmrX0KifYPhtdcx5CWB5H4sdT9GevGWKPL/wvnEeXTjUiNI196kVAH/Lf Ne4XX4ewd7/vegtUdNh/qv/GGSroH1SbX/5bWmH8rARiOKkSlk0wxTA4AT45TOO3lbNfAfzrFaT+9 +XRne/kQwLzXp6zR5AUmH9x9eWue1WA+urZZqIO5JFdKHdwvAovm98rv6I970g9MuGdYch50e4Jpw xaGuHt22E2jWWyStPB1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opByF-0012eC-B6; Sun, 30 Oct 2022 17:19:39 +0000 Received: from mail-bn1nam07on2057.outbound.protection.outlook.com ([40.107.212.57] helo=NAM02-BN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opByA-0012aP-AY for linux-arm-kernel@lists.infradead.org; Sun, 30 Oct 2022 17:19:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EPDi6P0yNNq5tEcaiJnZ6bHPOdoMR2d1qj4hSIWROPb2SX5pFsyFbZI9T57PTYkwlNF0/sDblfIG8k3Gw/7QUfXAa3nXkNVM7MBU5Fxc5xeN5vODefEd5zkTE4Vs9kS6hlpukIYZhVafXbJvPUESBIhNiR6ksARnzTlbwL/w5PqQM2Nf59v7XmvW5Hr2V6HkHmRvwwpMQ1TcOsOnkvHNPIr5LRuKB7ClLEhkBjdBQA18DPOfIG07ICDA8jmoRNMi+b/wpvyM9GukpvBol6Nungdm0Aof6TBgM0in6O23oUztjbOFHFdm9LQrLqgKSEI+7YTJoMxQizjXevWz7k8RFg== 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=Ra/82IXfTj/xJPXlX8W3UboVngRt8xJLGHsw4zY0qQ4=; b=fLo440TGGfOrifDEf/hPOp+8ZztF1KRaDGEzmc0tqzuPo/bmOSkf71RjnvHgEzxFGdpy3oui+ajsOTiBUfcoUAV7ACS3Y17okTy7YwBxQvdHmeU043dIAi5qi5PrhgiWZoQVryApXS0VYrY+xBroOwEBwlncV4rjB+/brFrBjdnUjgIPDPbXkUHYnZpXJqFBLd08g7VfOctnfawtRcfcU81J0Ax8G5nukWrVfr5+LlA5KMzqJwJojRnMiSl3+XuUy4+fC4ZZIx8HAqCDHS7h+AmqWFqsOdw8vn2bkxkqXHMb8I8To1ChURqDh0VBNOhSVaPf2TEsttTxuIjTxQdOxQ== 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=Ra/82IXfTj/xJPXlX8W3UboVngRt8xJLGHsw4zY0qQ4=; b=V8g0IfOUDFz2NNyXN7mTLwS9yFdd0qHT6REuJ7EfYmJAfbDOExPGfZ2YvVW2vyf1dgZjYhXqnklUA/YkUA5AEr+sxMp9tPEfiINDE3CSOPvxUkZw4AuA7mJ4+Le5+d9copQGSonQSi9eCroJ035Wp8TJrjDAzBTZF/wiA5xgq0s= 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 CH0PR03MB6113.namprd03.prod.outlook.com (2603:10b6:610:b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.16; Sun, 30 Oct 2022 17:19:28 +0000 Received: from DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1]) by DM6PR03MB5196.namprd03.prod.outlook.com ([fe80::a132:66d9:ed0f:e5c1%6]) with mapi id 15.20.5769.019; Sun, 30 Oct 2022 17:19:27 +0000 From: Hsia-Jun Li To: dri-devel@lists.freedesktop.org Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, ezequiel@vanguardiasur.com.ar, sakari.ailus@linux.intel.com, ribalda@chromium.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org, sebastian.hesselbarth@gmail.com, jszhang@kernel.org, linux-arm-kernel@lists.infradead.org, laurent.pinchart@ideasonboard.com, nicolas@ndufresne.ca, helen.koike@collabora.com, "Hsia-Jun(Randy) Li" Subject: [PATCH v2 1/2] drm/fourcc: Add Synaptics VideoSmart tiled modifiers Date: Mon, 31 Oct 2022 01:18:06 +0800 Message-Id: <20221030171807.55837-2-randy.li@synaptics.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221030171807.55837-1-randy.li@synaptics.com> References: <20221030171807.55837-1-randy.li@synaptics.com> X-ClientProxiedBy: BYAPR05CA0010.namprd05.prod.outlook.com (2603:10b6:a03:c0::23) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|CH0PR03MB6113:EE_ X-MS-Office365-Filtering-Correlation-Id: 040d62d7-e54d-468e-0462-08daba9ae617 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0ML+bfyd/8K01Fcr+clqaIOr/T8qSwF5+Zf35KFnFD5cbnzrj9ZqOcF34wtBDS+muBddbo7NBd0/WEdurO21E3fLEbvy7vACvwhjT5At/ZcloFrN6V4TBqTNCvmJ+CFPP1EpxF60Ko1/7hbO6jTPExkWXc2H3VwqQo2aLZY+v/h6l1xF+6hE98bt1ejH1FmGnWJVW2+I+7ISrLBP6KOo/ABTvYTe6QEomJ6+K67DTRUYhXG6RjSdM525DFlUZDrMhABt4GVNxoHKfnDEk9MF6sV6AjyxjznMw80xhxS+C7yLAabKyWq9xG67SJpFEW+mPV+JWNvCXuPGS9k9msKyde4C1vVMfAdb40V/mZ27SdWhIyreA6yAvWvovZ48mUoIuhJa46xI65bLL+5vX2DlhFnWJMMM/MPQMdkCk/GmlVDMFo8AlgHWXhB0QbZf1MGNEOlM2D0IbZjhR1iDI57sUv++7xTxQUmz1CrQ3Ab+CkbGgiy7r2TCazQd995K/BhCCNSe6pa+AEnPQ8Q3WrQZWp1uTDVQqSta/iM++cR85ufFwHEgv9HA4UL5A9NUFEXegVRTTOv9WBbXVYqQ6rncpY+OxGSbKwxpiwnK3n2G56Z/YeCXMxsETDCbkqwaErXmR3s52D77n2EVxMck12G50Z0d1B5OCLYPug14A7r1sYHQV9GyLm2tIGR879H9FPA1hdAKr8S1mBWJJQWcTdyzOBIA1Srrl37hJNM6R7Ge6XqfhjxrqPXlLMyD+BBL6dOm 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)(39860400002)(366004)(346002)(136003)(396003)(451199015)(38350700002)(38100700002)(36756003)(8676002)(83380400001)(66946007)(66556008)(4326008)(66476007)(316002)(2906002)(41300700001)(86362001)(2616005)(6916009)(5660300002)(7416002)(8936002)(186003)(1076003)(6486002)(478600001)(6512007)(26005)(52116002)(6506007)(107886003)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dkRI0YFZUH9Y5p9eZE/BSENwwxCPDC5G/i9aDQHG9uhLZOAhHZ1Vmb+GUwT0MCPZIMcHQltPD5MZ9btsic/8xfXBEOp6+sdSrEEOfd2KAr1Pnow7dV2Y+XkC1WU9p1lGrsPLluVzYabj8sZeRn9vUoykj/tpLicdHqgk8x2d+qXqF+YMVt6VyKRvbkk/7nK9Y85SdghHJ2+iNR2ynJBds7lvSNBqcY915srAEqBzFsElIxqKK0UtZsxNmLglLUr1dL8kLfFvxxhG2yHTYS0fZd+AjqaOqjkb5PQJT2kdnVdSd7pzE4gPkdz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Xy7zXRthyDyR1I9+oczMBiL64VPRGy7CDW5Tz8n2TdT5YPK+AXxunCQjfNUKvUclYqYqMd0gsjmioMKu3sQEF5ayhYcBRD1AyUSK2Fv3/vTAp6xIkBEhc+vujOXriVH9ilQ8WzIBG3HHDnn4nAl+guE9lReBiblUljVELHEA6hUcIKzYA22qIJaJ5hGvApsxto49 X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 040d62d7-e54d-468e-0462-08daba9ae617 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2022 17:19:27.8406 (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: zsNvxx0fyN5HxqTVW5agweuB+T9nDJnCV4X0GuOqbF9P85v7fRgQ6nP0D2KwAvvyqNGgym4L3GtVsrr571MdOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR03MB6113 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221030_101934_391717_DDE109B0 X-CRM114-Status: GOOD ( 16.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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..4b587a4694f7 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, (((f) & 0xff) | \ + (((m) & 0xff) << 8) | \ + (((p) & 0xf) << 16) | \ + (((g) & 0x1) << 16) | \ + (((h) & 0xf) << 24) | \ + (((v) & 0xf) << 28) | \ + (((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 Sun Oct 30 17:18:07 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: 13025148 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BFEB8ECAAA1 for ; Sun, 30 Oct 2022 17:21:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NJN9ki4a2MTb/Y9BVWOvIvu8dw2dBdlAKkSh2Kdz+30=; b=nRPQOFrIRjfatH SijYVOE4XJmuYDequlsOMTOia040KLNWrH37Grrzx/bKUqxg8HNwAYeC+hTDwJ04RWr1YygHutbwM nqdA9MWeCYN/LEr+O0C74MAvU91nYDRcaMJU2F31huXGfHQOCjnVonsH5FbrLBHlDdPE6HVJ37pwz ganexDXlefUSkVej2FTiuO6W6ttuGvpiALWnBhW8RIAE72W5rg0tOkJA1ds6htaf632b90CfHge/n jgutZ1s56TRr1fFor2gjf4zppv3WptPhf2FVv0LgStYuNUn6sFs3oKqu/rL2FGs4A+kqOSy7bgYf/ 6bikm0dMMXcfMEQZVjEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opByY-0012sj-Af; Sun, 30 Oct 2022 17:19:59 +0000 Received: from mail-bn8nam11on2040.outbound.protection.outlook.com ([40.107.236.40] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opByO-0012lu-9x for linux-arm-kernel@lists.infradead.org; Sun, 30 Oct 2022 17:19:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bsVnrc2pFtD3kfx0P8Eush3KDRWPFdTIgkncl716ZzL+sIHXZx3kqnP13++niKfop5PBPBMlJ2DX70SCDzKcH9Rq/mDxNfWwi6eDSw2+xVUj0uCKZj4bSqiXei2K8906AlSiezb/dxN8qlsGK+IB8C7hE1rEbMzaHk84/3JMpdtgdN3LNrEO6XbZeMsCS5S+tcKXiwNJRoAuUH+X/3qGl0OwPy/B795+IXoYgEVQrDC2ZnInHEOdCdhC7xY9fiBpyI1vTzuvBfvEchvhN7dR8g3pXXbwxPNb84pNclGMQPTenK7aC5srV8F4Kdu93yqDo9G63G9OZkzw7q0D1Skrqg== 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=Gr933eifnr2TpHN8IVdO6xIseG0WakdC3w2T5dMzTFo=; b=idy9IUovvAMsPu8BdXO69mon5RqbdCd2HJpD+19ea5hjCKPY1TBCCFvho6HWJgOk5KgbUEIF212322Y5ffvv9pIu1z38aBjUCTNNwzgI93xlp/7WuPlBRUzJt7qnlgwv9NOXhEMEKKUzuiF0MDBxd9SUMtXEjJq8jzy77fbg4CFqwFFHv9QhwJhalezYjL1ZM5KeitXxcdjc90Huwmhh8uKJn2+1fs1dDrv+KcRIPFx2i3MH5DofGeclkgU01VEVHmVAFn1yYbHFxI51baAODJZ4OcKeq+xkCyp73dSxtVOnE17S7fqLdvMbBqvdr22Sp7cpK/TCT767pa5OYujZZg== 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=Gr933eifnr2TpHN8IVdO6xIseG0WakdC3w2T5dMzTFo=; b=iSXI+GIf8iVvcglAdf/Pf0Ypa7zdGoBv5vBdpYAMmtpEmjbtH0+r8znNvcD0asKwt+nX7yQVDrZNek0CmOfN9YcpPQ/0j19+3qZVthczGIrkXpnR6sXV8puwozOFDDqXzJZtv5DXRq7j4sVSmnHl+6o7ItrKB0LxFWxdw4cx0ag= 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 CH0PR03MB6113.namprd03.prod.outlook.com (2603:10b6:610:b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.16; Sun, 30 Oct 2022 17:19: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%6]) with mapi id 15.20.5769.019; Sun, 30 Oct 2022 17:19:44 +0000 From: Hsia-Jun Li To: dri-devel@lists.freedesktop.org Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, ezequiel@vanguardiasur.com.ar, sakari.ailus@linux.intel.com, ribalda@chromium.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org, sebastian.hesselbarth@gmail.com, jszhang@kernel.org, linux-arm-kernel@lists.infradead.org, laurent.pinchart@ideasonboard.com, nicolas@ndufresne.ca, helen.koike@collabora.com, Randy Li Subject: [PATCH v2 2/2] media: docs: Add Synpatics tile modifiers Date: Mon, 31 Oct 2022 01:18:07 +0800 Message-Id: <20221030171807.55837-3-randy.li@synaptics.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221030171807.55837-1-randy.li@synaptics.com> References: <20221030171807.55837-1-randy.li@synaptics.com> X-ClientProxiedBy: BYAPR05CA0010.namprd05.prod.outlook.com (2603:10b6:a03:c0::23) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|CH0PR03MB6113:EE_ X-MS-Office365-Filtering-Correlation-Id: e04e6ce0-e267-4ee3-e85f-08daba9af014 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oAKqHbQ52D4xvBjJ7CmnByI9x4+lAy8g55gKOzPavrizpv9V5NkCu1aPa3rgiaPLCj6GfAbT18bomoVMsEBQypS9+rLwEsv5SN2RL2vI+M+IJj7i2RmqYsDarP28AywBTlSy+WqNDZHn77HPhSdPHLGnc7LY/h8oKOWiZk7EQqqEPcEa7wblcgXc5m3Uz3zlGrlQ/AkfxDId9C0G57vHxG0maBQZ0QIFVQA+ECXnWcHd/s7qVvuNRizIwttNYavrf9HaLXCzwEZzPB+mpLX9mfbYiGwu1jcW7QXNV7WxJg0+Bk3M5Rb6GY8m/H7wKxNB33FkubFEy9K40JVzRfS147zL9OILh3AGd4uJ2Ufve5lrDPLLYk0Sys3hNOr1pTSvGqkPTPAmJ65zMGW7tDERwndvKru85A8IKGk70+aguKC/q7xI/enKovmaE8zQ8AXJBH+IhbnUqie0Ay1aCKgJUIGsAindZyr4TaCXHBCmNqN4siZi14PUn2UuSVH3PyU4SmYNF5v4S2P9eQsSTrLlwhF6G3TZmW6ovg7sg/DMB14UaV4ami19x5v+Wbuo+4im43jucRt8r49FYk87TOTZ3spt0EPnwoDwMiB0HtwLpP9wVX1uVVAgCFSE9sGjgZN8gHyxiRXP6NGItihyW8eh9ChZUMmjNx1d6fqjm+Bc74x7GPIiiiynZwB1BBJYpMw7wm+IE/JVp8L3PsZRc0+jL/n4lLjPGKjKSCsyg0hby8v0ISM0vPvZta/X3evZE/Q4 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)(39860400002)(366004)(346002)(136003)(396003)(451199015)(38350700002)(38100700002)(36756003)(8676002)(83380400001)(66946007)(66556008)(4326008)(66476007)(316002)(2906002)(41300700001)(86362001)(2616005)(6916009)(5660300002)(7416002)(8936002)(186003)(1076003)(6486002)(478600001)(6512007)(26005)(52116002)(6506007)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gVEt4Rnk4hGRDg0RE1+hHOBWfwb7nqsWMMtNOHjA8rqnE6pUnT+1m7m8k2pb0rMI45vbt/Ug6CQ2aAXHy1HTUD0On8Me1FaYKuGuwGxRQqsK1hvPg3rmSLjUEcd2mCcZdINXzqSmjAqoVmQmUm8d9vuxwuezTTWvvQROOGbnljF9+LEW1YeEdbv2usRficgRepJ98GTAEsyVahUXL/WxT58MhaJ21k7FiOixYDZaZM2zFhIs+ts6nZE1SM7pRmJczxoLpKn+AWTu7HWgq9MNBZ5ycrI2NNNZArShRFCszqK6jXGh3abtLAJHhJ7WYPaVFtHB3dxoO9D8rubWqVl70pnZyszAeuelBYd4JbfpKDHS7lh2JkBy6bLgnglTe3hM6SrzVKBwMoofE8ATdk21sYTy8KW5Voi1tJmIvluoBIwBBuaQkd2pwYz7WM7ZP6EBYn5/OXR/7Eu44ykSEuZJX5er31TMaN12kBC3RHTb5iPPehu1C+ZNrV3c3gkxe08QxbJEaH+tb/sQfBA1olklDI0EBrXeofAZ6Qx9XyCPbdgcSmIsMFeN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: e04e6ce0-e267-4ee3-e85f-08daba9af014 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2022 17:19:44.5716 (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: eqM+jJzXE3fI+SiFAnEnYC4xInLeTJcGZ34/DoRLjdKjUMQHCBfkhrwaOU/wI0VsV9KJ/7/CgIT1zBq9w7O9HQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR03MB6113 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221030_101948_380315_FC25D651 X-CRM114-Status: GOOD ( 15.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- .../media/v4l/pixfmt-synaptics.rst | 80 +++++++++++++++++++ .../userspace-api/media/v4l/pixfmt.rst | 1 + 2 files changed, 81 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..bc86737febb7 --- /dev/null +++ b/Documentation/userspace-api/media/v4l/pixfmt-synaptics.rst @@ -0,0 +1,80 @@ +.. 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`` + - '0x0b00000026010101' + - 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`` + - '0x0b00000026090301' + - Compressed ``V4L2_PIX_FMT_MOD_SYNA_V4H3``. It stores 64x4 pixels + in 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-V4H1-128L128C: + + - ``V4L2_PIX_FMT_MOD_SYNA_V4H1_128L128C`` + - '0x0b00000077010101' + - Compressed ``V4L2_PIX_FMT_MOD_SYNA_V4H1``. It stores 128x128 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`` + - '0x0b00000077090301' + - Compressed ``V4L2_PIX_FMT_MOD_SYNA_V4H3``. It stores 128x128 pixels + in tiles. 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..bfe4fdb52b6b 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