Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8319775rwb; Wed, 23 Nov 2022 19:58:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf5LXnuD85DfJ4tdFQuWUGahpc+VNljk/SW54TgWsa0RlTlk7HVzl0HV2rzQsw4/gAjJiV4W X-Received: by 2002:a63:ec46:0:b0:456:5024:e6ae with SMTP id r6-20020a63ec46000000b004565024e6aemr11970708pgj.466.1669262328964; Wed, 23 Nov 2022 19:58:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669262328; cv=pass; d=google.com; s=arc-20160816; b=miZNU6HW+KcGmynnylp5B49WEJqVL2xq4/pIVR7zR1cBDsi9cE4mTO+iB12q6Sp6z/ UTZRsBr1sUGwIRMQ5ep2P1ungVZHAhYYTuks+kaZw/KZ3A43zTHX1IC7BR6E5bpPspP3 HDO8aSL0xocXaoKO6N87pUXevavjU0s1XUcjCdk0pFA9itRPkwJZPaV5V/Q54VznyNA+ 5iPjOMVbVizd5pQq/w6MO5Pa5lDjAhJgu6128m1ohurLo4U7kKbMRniTVYEJmx6CjkuI WRbRZdW68/FSYrMiw1HnazymID0anrKPonAsk4qP3sV37Q8bJFF+YH35D4X1wc/3KCNs Wh1g== 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 :in-reply-to:from:cc:content-language:references:to:subject :user-agent:date:message-id:dkim-signature; bh=DpuTgbPwmEooBS+88CZQxaDe2vTOtu3JCUtXzdrtvNY=; b=OK/2btCLCtEfpfDPF+1/JcG+hdfc8/gg2f6R+YOIuFAh3pOP44txjk/V++YZ279D6+ xsRqkAL8BBzrUgc34bgYVuy4H/Fy8rTi7vSqvatZLrtkLhB9zmcDmlI0rKQcjXQgrAoq 8Ve84umC3YCbOws9gTAFisCCMqcr4waeTVlkP2z4HVb6Ig1xs4iY9eFEzVHecPckQvB+ R2fzApsV63DnwjOo5Tn+aKUZfYcatTXBtrXfuZaFhssy69lKaW85cWOkx+RGOyjMQeHd SOyRnnthFRXgXF9p7mLe5Ke8qST1gSPHBstBBwPBoyc+lsUFHvleduOEZvmrHo24NVoa bIPQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=TLUhoLLY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k16-20020a170902c41000b001892c125b7csi936922plk.464.2022.11.23.19.58.37; Wed, 23 Nov 2022 19:58:48 -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=TLUhoLLY; 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 S229955AbiKXD2s (ORCPT + 89 others); Wed, 23 Nov 2022 22:28:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbiKXD2q (ORCPT ); Wed, 23 Nov 2022 22:28:46 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20626.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::626]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB27D56D41; Wed, 23 Nov 2022 19:28:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gesCOb80HiPyxOhrikXpv2wB2qs92Kxiy/kPmKn8JeL7DW1GDoLT9LtTUo+CXmB+vGpZNYcIjlygpNpsDyoxSsiiAzZrWQN0mJyLWcC0G8s8TvU9lV3xmUeOQ3CjxXL/gehMd57HNvWKu1KFg6yVIsEvhOvIKu1yTzdEGlo9JQAxI6cKZCQFkcgjSwD6fxPLguVeBSShEby+VEnowPqU7kjr9mO4CNt7cIMAPbYMoAAWud6G/UJSQ+8nRJwM3vDzdCzY4GUuwsfn/q2fmc9OIfy7MiN+13JRXxreUWwGvQMXdpCgE6L+5EeKrMUM7zdbGcP+IooOxbeevXrALSR4fg== 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=DpuTgbPwmEooBS+88CZQxaDe2vTOtu3JCUtXzdrtvNY=; b=Zn5twJFsE+vJs3c223MD2CAdvoVdLv6fiHNZBxfw74Y/9fLEBlA+VAXDCbHhNIX/ttzl1PKM+TfgTzrHYerfxpDiIt6th9bNdENSlNLCa/lfyIJBQxlk6UGN9HKnKuGQEJoz8qmjQj3eDxNDkhO65RIWPfDksA8DGccVATEs4znPhOfW4wOBG8eoXEFuSeqVVLL5QBu2Iw+LLEv8/2IlhD9aO6gC/yUXxEyCf9uYlNVlCq63KCU0GGXFLAqvyCFDBHTeJ6DBoZBPTiVqWmH28Lo7JmYYvTCf7mtVdwESzmkpbJarlk8lPcZspk0Q+DkI4asPGxTN7GD1hu26/2qNkg== 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=DpuTgbPwmEooBS+88CZQxaDe2vTOtu3JCUtXzdrtvNY=; b=TLUhoLLY3YERqdjzpQp9tVTSp/ZbJutp1//bgyhYBA2Lpxc14f/7jYQSPOWetCbAE5Z2+kS2gtbgjnRqxIPvic3pPyHVSpq8b6aZYnYlMWfPdwU1gKC1RhIioEi5VharjXf2Lcndhg9+i8kh8cajN0VW+zx9oIN+d7EHqZUa1dM= 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 BLAPR03MB5476.namprd03.prod.outlook.com (2603:10b6:208:29b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.19; Thu, 24 Nov 2022 03:28:41 +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.5834.015; Thu, 24 Nov 2022 03:28:41 +0000 Message-ID: <801bea69-fd52-40a9-8ac4-8be5b7e425eb@synaptics.com> Date: Thu, 24 Nov 2022 11:28:32 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v4] drm/fourcc: Add Synaptics VideoSmart tiled modifiers To: daniel@ffwll.ch References: <48867317-C751-4339-ADA6-6AF88A7FB9AC@synaptics.com> Content-Language: en-US Cc: Jisheng Zhang , airlied@linux.ie, ayaka , 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, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, nicolas@ndufresne.ca From: Hsia-Jun Li In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR03CA0211.namprd03.prod.outlook.com (2603:10b6:a03:39f::6) To DM6PR03MB5196.namprd03.prod.outlook.com (2603:10b6:5:24a::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR03MB5196:EE_|BLAPR03MB5476:EE_ X-MS-Office365-Filtering-Correlation-Id: e1ab2c5c-bb9d-4ccd-ce6c-08dacdcbfbaa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GvJEPjs1VC65E8FBqgpFiZ0c8ZBk7tdAYo0S89vXYNV9I9fXfiutbsEiglThi7VpZTCrbV8NUT3gxUjUY6IysHQhIUCs2D1ByOT8c7WzkOrWteXqqLl01SL9HcpDKVa4JlVu8wgFBhc01Mi7ssVPWiRIyuw51F8CSqN3oJ5triWSuQSPBWNmuCgnh4DsxIPhWptKsJf2uVt+tlKeYri085N8U+xRCpomkHXWvftfQMrNpCB+M/3/4yCScxK3U7CqZ6ehlFa0anNn/fjZbjmh/6XxNVLmPsI3i8TrDANnOPNdFqfkZxOQ5g6kgVXzFFiKlNov6MWZZ/jbwyk1OA9U3AMZCv38QTb1XSwrv9WGM4/2u66zewCD4kJ6x81zxDKr/NRP+nVS+4XRL8sLS4blK0TrFyAfDlkyPl/s9XJ7iu0NmYZuOfLS3yYVyaFzTvwxxpPYz77kPcMdYtbjBdWF5tKZI457QYmnejE1SqUkbTocrUkLWq9Q20+vdLohgBCfljQAJQlyEMCXOgO/VldE5rRPBd7RLsDKjOgPtWtPdHobx5jCMli6+vBNcPsZlFrrUsYpBCi/mJBTau08+arRISFgxVK1FipyrlpKLO32hB+oEswpy7T2xrOVSY0i+eQYkndI0bUX1YzBvPg57rTru89tGoutBSYg2IdVA4LMo0cckfMilbBcWeL+lmOHuVEGSAiZMLu8dVONCYesaqG1U6PckRvrNXqNB0um9PyXXxoBUIbeYljIuQ2BeWhHbt7Dx8RaSIHH6YQ5nNVT14NefOriDLTRlo9C2xSm916nsCc= 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)(346002)(396003)(366004)(39850400004)(136003)(376002)(451199015)(2906002)(86362001)(31696002)(316002)(83380400001)(54906003)(6512007)(6916009)(6666004)(53546011)(52116002)(26005)(6506007)(6486002)(966005)(186003)(2616005)(478600001)(8936002)(7416002)(5660300002)(41300700001)(38100700002)(4326008)(38350700002)(66476007)(8676002)(66556008)(66946007)(31686004)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?LzJHa0d3N01rdFQ4dEVTWExMc3hFd1ZKcUlxbi9YakEwdVBXQlZFcGZ3YWJ2?= =?utf-8?B?bEN1T1l6dTkwRTBqTStwMytlVGcveHZzdjM0bjZkVlR5cE12bENxMFJ6R2dy?= =?utf-8?B?VTBzK0pYdERGc01rQk5pYytyM3VtRjdZc255V2dvcktlckI2ZnNQYkRLRk15?= =?utf-8?B?S3FzO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JcmVqVklnSzdOd0JFMVNqS1djY3FtZmRl?= =?utf-8?B?eDJETzdQTHhkd3J0TW1FakJkWlFOZkg0RVp3R3RFYlc5OFN3Y3BDbXd6Y2U2?= =?utf-8?B?SXlzTHlpQWx2RTdUNkdVYTRYZUM3bkZtbFVzZmJkdThReTJhaE5EME4vbUxk?= =?utf-8?Q?t42YkTOFMDcXnBmV4xQDv9ucN?= X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1ab2c5c-bb9d-4ccd-ce6c-08dacdcbfbaa X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2022 03:28:41.2395 (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: K+HMo2C3I8QSj5/h0xKlY2y+cN1ZrZNTdOlIWv2sHLWPJfmnJkSElcRk+2OpTJmNq6BNLcnDtU9zHCAmQRI8Cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR03MB5476 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,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 On 11/24/22 01:27, Daniel Vetter wrote: > CAUTION: Email originated externally, do not click links or open attachments unless you recognize the sender and know the content is safe. > > > On Thu, Nov 24, 2022 at 01:14:48AM +0800, Randy Li wrote: >> >>> On Nov 24, 2022, at 12:42 AM, Daniel Vetter wrote: >>> >>> On Wed, Nov 23, 2022 at 10:58:11PM +0800, Jisheng Zhang wrote: >>>>> On Wed, Nov 23, 2022 at 05:19:57PM +0800, Hsia-Jun Li wrote: >>>>> 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 >>>> Any users in the mainline tree? >> Not yet. I believe a V4L2 codec would be the first one. >> Still there are many patches are requested for v4l2 which currently does >> not support format modifier. You could find discussion in linux media >> list. >> >> This does need the agreement from drm maintainers, three of us tend to >> drop the pixel formats in video4linux2.h only keeping those codec >> formats in new extended v4l2 format negotiation interface. All the pixel >> formats should go to drm_fourcc.h while we can’t decide how to present >> those hardware requests contiguous memory. > > Uh no. > > These enums are maintained in drm_fourcc.h, by drm maintainers. You > _cannot_ mix them up with the fourcc enums that video4linux2.h has, that's > a completely different enum space because fourcc codes are _not_ a > standard. > Things us in v4l2 try to solve is the those non contiguous memory planes in v4l2, we don’t want to increase them anymore. Besides the values for pixel formats are the same between V4L2 and DRM. > Please do not ever mix up drm_fourcc format modifiers with v4l2 fourcc > codes, that will result in complete chaos. There's a reason why there's > only one authoritative source for these. > In the previous version, it would fail in building, because a driver’s header(ipu-v3) would included both v4l2 and drm. I can’t add another format modifier macro to v4l2. If DRM doesn’t like the idea that v4l2 use the fourcc from DRM, I should inform people about that. >> We don’t bring those NV12M into drm_fourcc.h, we hate that. >>> Note that drm_fourcc.h serves as the vendor-neutral registry for these >>> numbers, and they're referenced in both gl and vk extensions. So this is >>> the one case where we do _not_ require in-kernel users or open source >>> userspace. >>> >> The first user for these pixel formats would be the software pixel reader for Gstreamer, I am planning to add the unpacker for the two uncompressed pixel formats. >>> If there is someone interested in an in-kernel or open userspace driver >>> though it would be really great to have their acks before merging. Just to >>> make sure that the modifiers will work with both upstream and downstream >>> driver stacks. >> This patch have been reviewed internally, it is good enough to describe our pixel formats. >>> >>> I just realized that we've failed to document this, I'll type up a patch. >> >> About the format itself, I have sent the document to the mesa, you could find a MR there. > > Please include the link to that MR in the patch description. mesa !19921 https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19921 I would like to do that when the document got more reviewed. > -Daniel > >>> -Daniel >>> >>> >>>>> /* 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 >>>>> -- >>>>> 2.17.1 >>> >>> -- >>> Daniel Vetter >>> Software Engineer, Intel Corporation >>> https://urldefense.proofpoint.com/v2/url?u=http-3A__blog.ffwll.ch&d=DwIDaQ&c=7dfBJ8cXbWjhc0BhImu8wVIoUFmBzj1s88r8EGyM0UY&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=MGl40tua4_XwHXeBMgk_8hffHo5og9goZOWs0NTaFEOVNt4EnfL6XjISa0JSiK_j&s=FeAOQAovXW3Vm03VKTY8ysPZY5rW-2Jd_vgrxgIgGo0&e= > > -- > Daniel Vetter > Software Engineer, Intel Corporation > https://urldefense.proofpoint.com/v2/url?u=http-3A__blog.ffwll.ch&d=DwIDaQ&c=7dfBJ8cXbWjhc0BhImu8wVIoUFmBzj1s88r8EGyM0UY&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=MGl40tua4_XwHXeBMgk_8hffHo5og9goZOWs0NTaFEOVNt4EnfL6XjISa0JSiK_j&s=FeAOQAovXW3Vm03VKTY8ysPZY5rW-2Jd_vgrxgIgGo0&e= -- Hsia-Jun(Randy) Li