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: 13014 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1889538wru; Sun, 30 Oct 2022 10:23:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6cQPeeXV+LpaBn1ql5kpuzIxhZBY6iRAl2bN1L6EK1d5O23pkWNfsF1a/plSM1plJXiEvx X-Received: by 2002:a17:902:6a87:b0:181:c6c6:1d38 with SMTP id n7-20020a1709026a8700b00181c6c61d38mr10107004plk.74.1667150615811; Sun, 30 Oct 2022 10:23:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667150615; cv=pass; d=google.com; s=arc-20160816; b=RJY/jElkRcIjXcQtrw2rH4gUT+i4qcs361IprdKuoRl3mtOJWPF2qPbNO4MR7gcymC 4we0ItjSx1dO1dMAJU9X2dp5x9mDNIigwsjvdeIYSWzI7yn6fywPwA7PeK2zOg8p35Qh lovd8pyLjHc+imwwywAtwYmRfHEusABxHhm8IXbVaUo625Y+HkdSOIVnZ8CepxkZ4FNZ NIOx5B2Sja+Z4zeDtOMsY1Tvs4AwcLwZVdNSgZUCgLY06e1NyCoRcOEVFeSfWinRrG2k IxuRAMwenqAbL/ty1u2TnZdjmwKUwTyBOFUjkkFHEuSrqUxVD2gllzk/X6kHbGSPRylD 8UIA== 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=Ra/82IXfTj/xJPXlX8W3UboVngRt8xJLGHsw4zY0qQ4=; b=H5l2obpZtjsRHL1Jb7uxnfbfqzltz7YnDAXSNrR1F4zQUJjlAmRHAR/YdQHm48DE5N WZguTvmt01WYdfRdnAgF61gC+Ex/UCJXYkBLQsoTKurJMUW2+sTEphip+6aV+yaQh0sZ QhIkgCrC9U9IJsTK4iYAcXjTDVskMp+Jr7BgctkeofB8EiaVkHqS8w8YbadQ0WNGPdLa VQv6r253Pmk+vdIYm4SlteoFhrdpm3ZZbvPhYfHjB/y85N/jmqw+t8M8RhoXvapc8fJK mpS1hO7NY9k31XLGKyMz+TYHpMlK7vOtSpDr18MHuF/t0//+BHMw1Lw2Lv3tDTENJdwY FWQQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=V8g0IfOU; 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 p12-20020a17090a868c00b00213393ff173si4943782pjn.75.2022.10.30.10.23.22; Sun, 30 Oct 2022 10:23:35 -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=V8g0IfOU; 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 S229828AbiJ3RTe (ORCPT + 99 others); Sun, 30 Oct 2022 13:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbiJ3RTd (ORCPT ); Sun, 30 Oct 2022 13:19:33 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662F52BF0; Sun, 30 Oct 2022 10:19:32 -0700 (PDT) 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+iNR2ynJBds7lvSNBqcY915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4Us388RwBMGPzxwGnY3ltMg3JDPguFu4+joyzFrgq2b3aMHGmXadlKzAIQbGb6r6NAPs22zy52cVkS0ROravOs/VTV7fXy7zXRthyDyR1I9+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-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?1748134123954191183?= X-GMAIL-MSGID: =?utf-8?q?1748134123954191183?= 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: 13015 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1889860wru; Sun, 30 Oct 2022 10:24:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4IBTeocnnWWQYEuPIEDGwSTTHTN2ULKTbtGzizJyo6GIrqPBni9vojMKqIdZRDFjecsVnw X-Received: by 2002:a62:fb0f:0:b0:56d:78af:993 with SMTP id x15-20020a62fb0f000000b0056d78af0993mr835052pfm.7.1667150667693; Sun, 30 Oct 2022 10:24:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667150667; cv=pass; d=google.com; s=arc-20160816; b=l1l7pzhh2t/W0/xr1s6ELGpPw6B/4xGzlxsxAE3UyXAU5F37rX1iTdcKuGBZM74ADe olBCdlwhIo96tYf6m4ihnHGRGWNeHtNTXpHo3WtQ3pD6H17CSY/Lo5gjeODMPRrp3Fo7 etMNTscgyb4lyMCGMLHmH9ukKruINSImMayju+7Z3ky8JoQjH0jR4XiQqcPa3m1Bu4VZ qV4CPo6Y8aJSSDFfN7Vx4ZzMnOyDaeadoHuvSWfV8aEx9C0fGXpp/ZxCodleEh8i5uRm WEL0v9qhxc1OhFfz5GudHdsuNEN1ojb9LQXRGF45eRJZFB8EF/gmJ/PCMfNUq/MJOfDn XvAw== 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=Gr933eifnr2TpHN8IVdO6xIseG0WakdC3w2T5dMzTFo=; b=O3isIMGOajOS1B+u34G0UIJxAvMY3L65TuDEmhK7VZ+FhhsJ5T5jmDAz8Tgp/F6ek+ I8obh3O2NTiYjv1Is+arWm7MeX99HbYWZCHgCbkWJ25vH3QkWjq+dhSYzvtudbJ2jtQg SkrIkAmmNoZXi7ZQSXi2iymwnjtqzLbGu4QTpeE2xf7084NnOkdDhoZxx92VsXpPqqhE hSC2IMd810xF0W01KmwoP1rzF72YGXQXJWVdnP5JPbgygEYTo/dqhI1S3f9ftqKkRzFh 6EtKZlEXOKzfvEVlkT2juXze/v9+AVJmgnWLSNAzSE6nPVB7VX1PVE1bTGmh8ewzIQb1 dksg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=iSXI+GIf; 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 q35-20020a17090a1b2600b00205d58e9125si5231764pjq.68.2022.10.30.10.24.14; Sun, 30 Oct 2022 10:24:27 -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=iSXI+GIf; 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 S229839AbiJ3RTu (ORCPT + 99 others); Sun, 30 Oct 2022 13:19:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbiJ3RTr (ORCPT ); Sun, 30 Oct 2022 13:19:47 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11688389D; Sun, 30 Oct 2022 10:19:46 -0700 (PDT) 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+AWTu7HWgq9MNBZ5ycrI2NNNZArShRFCszqK6jXGh3abtLAJHhJ7WYPaVF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rlow7ICqDyrYXswyNVzcd+ZDAhsv2//UkxtdMhbzKiIe7dliSCGDTg9/ii5IQTpsNYPUKXHU3Iup6+gXj3wxfzqtthFIvogvNisxvVdAcXL71bfwDr0qlfHDn8elMomkexVOaeC6TPCDd2m1YrBgBH56t4vE+UarhItEEFgjciyTlQDCZVLKJH0+Ntf8kET6gOqvI54m4XOh X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 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-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?1748134178505829025?= X-GMAIL-MSGID: =?utf-8?q?1748134178505829025?= 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