Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1745536rwb; Thu, 10 Nov 2022 22:51:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf43RL2DwZE+sn1snNS1YSJPOStPKQvBHzS18zHkwVuJnu2cDTHHcPdKDlTJcHBW+X/7zoDS X-Received: by 2002:a17:90b:b08:b0:212:d796:d30f with SMTP id bf8-20020a17090b0b0800b00212d796d30fmr529378pjb.9.1668149473239; Thu, 10 Nov 2022 22:51:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668149473; cv=pass; d=google.com; s=arc-20160816; b=pGWHNOViNoAW4WuiYGMGHGAVSspwf0uZDEtkMmGnUG7jI0eNnL8O+EaF3dx62ZcCID W4hp4qPasfTGL6q54EfEtLDEH7Ds+dFJcQa8nyiYyX5AT8nA6jrMbyoMIzRLi3ZC51OU 5xwJh6WfQ9MqOnl83UbGB8Z7T2Q1zmfZj6NepfgrNGIhLf7hZGGhgG97y950p8s0WTz4 E4Rr+0HPNKN45QM1YowGxs49uq38/xGhU3MRlwdfyQbhcNG+StscTXgWWRWJ7oBj/41h H4YQtkL7oVWrW4+oUxrgupnV8V5P2YIN/ptzOYIww6CBS+QIWfBi1uIpkxg+JBcNIIVL 5EuQ== 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:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=zpZoHYJrHGvwVLh+l0Yn1HOzmZjCzIULpGm8ktZQv7I=; b=cM22YUUyVixEAKfqRwRo/KTrRT/QgYn6/HWQUJaXPHGRzveKVCLWJ/SIrVItaGX6Wt MvecODk5HFGJiX2vymD6aw8FCdGHOzK7FLKWuPD6AEU/8uMTOubHC0n+nQiUVW9AJWS1 kGmfWztO6Gvr6oXdxPv7drLVT193/3dnYednUm4E1ELfE26Ftv8usPjeegKU7xME9jFd hWKKIv9GopQ9ERt2sECxHf4YZDQ+ZbI7S2nh0inS8D337lffMogb8M51Ab4yY7wOr+wv 62+/CsuX6/Wn7NRj0dCT+AdI1SPDKs8fOME5dYvCUD1wJ8u/qa2pefq6FD7NPx99hld9 vP3w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector2-Synaptics-onmicrosoft-com header.b=oxXSa3+6; 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 d27-20020a631d5b000000b00434d8692854si1648099pgm.541.2022.11.10.22.51.01; Thu, 10 Nov 2022 22:51:13 -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=oxXSa3+6; 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 S233009AbiKKGcw (ORCPT + 92 others); Fri, 11 Nov 2022 01:32:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233247AbiKKGcQ (ORCPT ); Fri, 11 Nov 2022 01:32:16 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2067.outbound.protection.outlook.com [40.107.220.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13D26CE5; Thu, 10 Nov 2022 22:31:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hbh0MeGAxeukl4qCkQT1epQXtUQY8HyHg1Aj1fWnpJP0NzN4O6/sxz9GmFLnLvnc52CXlbIFTkCF6ojr20/XA4Eu318m/2AvTzTN0MmWbBNHHD29eRvaG2Okj7APbEX4BWcdRymwkHCG2cCIqTmuvBY3FZUbbjpju+HwOCZDPWyWUnZTHd/9fAexbqSdQmcAPYqLAHShaRsZwTtEPW4mii/vdv5jvf5NHvJ1yfe95NuikAP6nVHa28qSyo9X3b7dZxj1dGj3f6fIUjvZtjrlNglrhXFYc8RhvBlxuWbR9HoS1j6PHQecAddwNWIYmv+v6F7LTC1hLToAhu8S+LseSQ== 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=zpZoHYJrHGvwVLh+l0Yn1HOzmZjCzIULpGm8ktZQv7I=; b=WSOmDqwovsjXBAj8DsKHxmhBLpHGWzy2P2vlhrM5+8/owyAI2asmP2kNCtf8Yr+lruH1+yZ1K6nf0jJ7zeCiBcvw3oArhLvpHis7+LUf6x2XoBJ96ITH0WXNNXT/ETQQM1qSlveX2wrTHEHHeAWYi6RKf4X04l6twieB0bdmQXJBZnesvI/5fCG8qVdVidk+c+7LB8YX/w9PdGsp5EaeyqptbfgXQnnFa8sN43cP7+Gf1qRHk78q+cu7qJQaIhDkNaFOT+gHKYH0n8rOTYFf8pDItL9V+8ty92dbwa7xfv17q+WCl5VtNgdaQeuzNIopp/ZlwfY7CJKwaXhTmCsukw== 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=zpZoHYJrHGvwVLh+l0Yn1HOzmZjCzIULpGm8ktZQv7I=; b=oxXSa3+61LqrzMGfcvLpPsRo0NcyPrCax+P8KdCo6LhDFYixg1HqMzhG2RU8DNsD72mTxaJYiSW9nRDYn1PRG78TobcXXaomott+pCNYIzsOmFso/NA9sLnGmdtuDhmFIac28Ua4Othh2JQvojb+IpLtRFm5ppbtcnXRjiMMA0Q= 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 SJ0PR03MB6615.namprd03.prod.outlook.com (2603:10b6:a03:388::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Fri, 11 Nov 2022 06:31:00 +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.5813.013; Fri, 11 Nov 2022 06:30:59 +0000 Message-ID: <91a96b4a-a91e-aae6-733f-c307ca6840f0@synaptics.com> Date: Fri, 11 Nov 2022 14:30:46 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [RFC PATCH v6 02/11] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more) Content-Language: en-US To: Tomasz Figa Cc: Nicolas Dufresne , mchehab@kernel.org, hans.verkuil@cisco.com, laurent.pinchart@ideasonboard.com, sakari.ailus@iki.fi, boris.brezillon@collabora.com, hiroh@chromium.org, Brian.Starkey@arm.com, kernel@collabora.com, narmstrong@baylibre.com, linux-kernel@vger.kernel.org, frkoenig@chromium.org, stanimir.varbanov@linaro.org, Hans Verkuil , linux-media@vger.kernel.org References: <20210114180738.1758707-1-helen.koike@collabora.com> <20210114180738.1758707-3-helen.koike@collabora.com> <577c56bf-146c-f34a-2028-075170076de7@collabora.com> <708221e8-a805-c394-6958-6c7ec24bfe66@synaptics.com> <03f6fd9ff6a757f6d1cb6cc552efcb0b94327104.camel@ndufresne.ca> <3b1edf81-bcc0-0b56-7e55-93da55d7f747@synaptics.com> From: Hsia-Jun Li In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR13CA0082.namprd13.prod.outlook.com (2603:10b6:a03:2c4::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_|SJ0PR03MB6615:EE_ X-MS-Office365-Filtering-Correlation-Id: 8416783c-5712-4a95-81e5-08dac3ae4b92 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 92FfLvLRlRvrQTaP3qdcJHSE0uLkoHIb/SKLixCkbdhP5oOiEG29aJGEGUIkMC9dgY1An3LppuLXq1NGBq2iqf2UH2KVDcbHxu+DNMK3jfx26X9TmYT/D1Rb/ZxSU8Y1G8XYxWjFrMXTVfN8RET05b8ul23l+f0y27XsbWsrVTdDbTYfpiJkNulldJ1ngH7zh4wUVoUixyUqGFCXEcn01QyE31l6YIOWk5V3aizWkHis2FTXpRpu7xrqmAXFCFP4a9vaqSn62jmPLYSCO/Zmpxlf+L0yRCJbTY7DKJdo4GkOtM6k5CpEEfxti+PixEOf4esOgKHTRxn6MNs5Mj607bE05SfI44/liYqjfoPrEYHS0QCkNm7eYxj+XAnHZVR9nmVp41TZc9qqpVeD0kXy/EM+2SGhK2dbJ27cH8+SJ9YLtse0kRPqgYXPVT9TvBOAI3e/KFXarhmX6QeESBR92dUI50jBn6hFfJeL7g0JUhNEfRgeuDX29uWqgxb92aXpJm3fcUX6EWIO1CK34f4lzG9eE0GW15qOPOyzkdsxSQN8lzc66PB5Au6WCU249V/gfQBuux0cy3TSBE1Q0N52oOqz6LEJRDxJ5aDl/UjAUTfi4+LZbRkLfoYnmIU877BztPTd4EPYZhhLbUaNUtloyd3beGkK/CZ0Kze1FN1E+zrZVSfu9auh2D/bbOHddKpVfj62gRRRohOLVoWlNgLh6jdWJTIWT9jR7fd4i01IoduU9EGotasUKxjwb7aYS/1ls7iHQYi5ExU0//3WpRFzESj/zk/BJ5q4+4cUuot1wsDOZb9HJA8TXVarjXsnD6gNJUy2EA68X+3Wn3cWAPOLu6b13jtRI3Mak7Y0HCn7Pfs= 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)(366004)(39860400002)(136003)(346002)(376002)(396003)(451199015)(66574015)(83380400001)(86362001)(31696002)(38100700002)(38350700002)(7416002)(4326008)(8676002)(5660300002)(2906002)(41300700001)(66556008)(8936002)(52116002)(26005)(53546011)(6506007)(6512007)(186003)(6916009)(6666004)(316002)(54906003)(2616005)(6486002)(66476007)(66946007)(966005)(478600001)(36756003)(31686004)(66899015)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RFlBdDBtVHZhVUl6YnBPNTlUUU9mYlpYRTJZeUkxM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B?= =?utf-8?B?TnVxaVJEd3VTV0c2a1BXVGswT1dTV2RFSzVidllzUmVUYnNFZjZ3UnRtVjZB?= =?utf-8?B?RHZhYldiZm9RNHRjRHNxSlp5djJ0Rlo3c0I5b3REU283a09rbXJ6cFIvZFFt?= =?utf-8?B?UUQwVUJweEhDMWI4KzkzMVdYRnNqNU1GamVlSFZrSnVNOG5rRjhud0w1OWxQ?= =?utf-8?B?cDNYVjNIM1VHMDRhSXFJdWF6NEpSR2h3Ulp2NVRZUTlrc2srem5qQXdLdlJC?= =?utf-8?B?Y25Yc3k2Y1hDTmNLcjZlU1FadUliNWNSUUFPQ0RONzU2blFOZVRtNFBOOUpr?= =?utf-8?Q?mi9DntVc9tqull2gTCvry1KBy?= X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8416783c-5712-4a95-81e5-08dac3ae4b92 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB5196.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 06:30:58.8620 (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: SPZxJduXTWDCfNZIXNMNKzXpJ2B6MEaIafihisTU/p+GoXcWPksnRXQJifM0rXcAEvl6/tgBoC2EHDScQEx+IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR03MB6615 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,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 On 11/11/22 13:48, Tomasz Figa wrote: > CAUTION: Email originated externally, do not click links or open attachments unless you recognize the sender and know the content is safe. > > > On Fri, Nov 11, 2022 at 12:04 PM Hsia-Jun Li wrote: >> >> >> >> On 11/11/22 01:06, Nicolas Dufresne wrote: >>> CAUTION: Email originated externally, do not click links or open attachments unless you recognize the sender and know the content is safe. >>> >>> >>> Le samedi 05 novembre 2022 à 23:19 +0800, Hsia-Jun Li a écrit : >>>>>> VIDIOC_ENUM_EXT_PIX_FMT would report NV12 and NV12M, while >>>>>> VIDIOC_ENUM_FMT >>>>>> would just report NV12M. >>>>> >>>>> If NV12 and NV12M are equivalent in Ext API, I don't see why we would >>>>> report both (unless I'm missing something, which is probably the case). >>>>> >>>>> The idea was to deprecate the M-variants one day. >>>> I was thinking the way in DRM API is better, always assuming it would >>>> always in a multiple planes. The only problem is we don't have a way to >>>> let the allocator that allocate contiguous memory for planes when we >>>> need to do that. >>> >>> Its not too late to allow this to be negotiated, but I would move this out of >>> the pixel format definition to stop the explosion of duplicate pixel formats, >>> which is a nightmare to deal with. >> I wonder whether we need to keep the pixel formats in videodev2.h >> anymore. If we would like to use the modifiers from drm_fourcc.h, why >> don't we use their pixel formats, they should be the same values of >> non-M variant pixel formats of v4l2. >> >> Let videodev2.h only maintain the those codecs or motion based >> compressed (pixel) formats. >> >> If I simplify the discussion, we want to >>> negotiate contiguity with the driver. The new FMT structure should have a >>> CONTIGUOUS flag. So if userpace sets: >>> >>> S_FMT(NV12, CONTIGUOUS) >> I wonder whether we would allow some planes being contiguous while some >> would not. For example, the graphics planes could be in a contiguous >> memory address while its compression metadata are not. >> Although that is not the case of our platform. I believe it sounds like >> reasonable case for improving the performance, two meta planes could >> resident in a different memory bank. > > I feel like this would be only useful in the MMAP mode. Looking at how > the other UAPIs are evolving, things are going towards > userspace-managed allocations, using, for example, DMA-buf heaps. I > think we should follow the trend and keep the MMAP mode just at the > same level of functionality as is today and focus on improvements and > new functionality for the DMABUF mode. > I know there are still some devices(encoder) which only have one register for storing the address of a graphics buffer. >> >> That lead to another question which I forgot whether I mention it before. >> >> There are four modifiers in DRM while we would only one in these patches. >> From the EGL >> https://urldefense.proofpoint.com/v2/url?u=https-3A__registry.khronos.org_EGL_extensions_EXT_EGL-5FEXT-5Fimage-5Fdma-5Fbuf-5Fimport-5Fmodifiers.txt&d=DwIFaQ&c=7dfBJ8cXbWjhc0BhImu8wVIoUFmBzj1s88r8EGyM0UY&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=mCebYOAiZK6pbpH1MrZGq-ZkDW-OqORCSwsCEX9ScgdXk_yfWZFJPC5aC93CUg5F&s=rtmW_t2LYoJ6g3Y5wgyICmABu-2Npw3JCOlvUVIYH2o&e= >> >> The modifier for echo plane could be different. I wish it would be >> better to create a framebuffer being aware of which planes are graphics >> or metadata. > > What's an echo plane? > They could be DRM_FORMAT_MOD_SYNA_V4H1_128L128_COMPRESSED DRM_FORMAT_MOD_SYNA_V4H1_128L128_COMPRESSED DRM_FORMAT_MOD_SYNA_MTR DRM_FORMAT_MOD_SYNA_MTR Or DRM_FORMAT_MOD_SYNA_V4H3P8_64L4 DRM_FORMAT_MOD_SYNA_V4H3P8_64L4 in our platform. It could give a better idea on what is stored in a plane. > That said, it indeed looks like we may want to be consistent with DRM > here and allow per-plane modifiers. > >> >> I wonder whether it would be better that convincing the DRM maintainer >> adding a non vendor flag for contiguous memory allocation here(DRM >> itself don't need it). >> While whether the memory could be contiguous for these vendor pixel >> formats, it is complex vendor defined. > > Memory allocation doesn't sound to me like it is related to formats or > modifiers in any way. I agree with Nicolas that if we want to allow > the userspace to specify if the memory should be contiguous or not, > that should be a separate flag and actually I'd probably see it in > REQBUF_EXT and CREATE_BUFS_EXT, rather than as a part of the format. > I agree with that. But here is a problem, if there was a display device(DRM) that only supports contiguous planes in a frame buffer. How do we be aware of that? >> >>> >>> The driver can accepts, and return the unmodified structure, or may drop the >>> CONTIGUOUS flag, which would mean its not supported. Could be the other way >>> around too. As for allocation, if you have CONTIGUOUS flag set, userspace does >>> not have to export or map memory for each planes, as they are the same. We >>> simply need to define the offset as relative to their allocation, which I think >>> is the most sensible thing. >>> >>> Nicolas >>> >> >> -- >> Hsia-Jun(Randy) Li -- Hsia-Jun(Randy) Li