From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from DM1PR04CU001.outbound.protection.outlook.com (mail-centralusazon11010013.outbound.protection.outlook.com [52.101.61.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3004E373C10 for ; Tue, 21 Jul 2026 13:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.61.13 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784642131; cv=fail; b=TocIH1vwS9kQUI59dDNLCT3eAexwkkxcQ/XZiiQ36amRJkr9FmA57V46/hOyC+cwrmXGkb78Joqn3G6cpSloVC4CI5IyjtG8TzLg389pW4M174Bp4hyAM5vK7Gl7wYxC7BPXqDgaHkXQsoR8KS5fCG7oCMyySQUnjvFObDhd6w4= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784642131; c=relaxed/simple; bh=u11z6lU5ftlUP4zMTpCMulZyMtAoO0i9j2hhZz18TqI=; h=Message-ID:Date:Subject:From:To:Cc:References:In-Reply-To: Content-Type:MIME-Version; b=PSb5OCYRwC3eSvNvsYynrLFDjvfkmSRXTcHsPCtzYVHNE6CZ9W68mJ19G0hXPeOGCLIZf4qx4M8EdpEyX0kX8FVS1WzlLg89SrFyIJNtE0x+e/08+eN9VCQ/Ite/LqDA2zGAEycOMFuUqm17LShI8cd3gfckIwomd7wAPoDl+Gc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=cN3iMM45; arc=fail smtp.client-ip=52.101.61.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="cN3iMM45" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LgEBnbLw4F+0oCGxO5k6whJkT1oavFyQ6wSnSK6OyV3OdR6B51qiaYHQoHdGvV1VvZ6TuSyF8YeQsP9NEgl6pgNShbpSeDb2p8JDw7jT0wSCLkCofG7EHcvBiOM1i4eeIdtFz0xPhFzNyxb15qejbQutox2X+mvHp7N4V4g6IcS2WeUuaTLPJkOvc9cDiGNtLYUjvoQKb4e5xYwrvz2nSDxZLDJ1BDf6Vy52HejSP6PZfhsac6vwKVa7ij1rDKXiNzs+KpiA6ehqM9kv+tSxeu2Lfj9vyGnjfQm8Zn5Z/YqhUpi2P5mM3xsJv2aWm00PZscb5o1WvGi8CrcNcHGHQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=7/APmSaMOyunPxERsCF2xJdqPIGqOvgajzqOZY4u9rk=; b=UEiYneZ2xIUgmWwN1H7pqFmnH4dEX6eBVqR7LAjssOqO19nwkvln/IGtfpGgbiMFUe8FZIEQsodkNcse8r7niMD4K/ZEart+d4Q3G6+5uOMjVaf4I0NskHjunQrhaiVly48tWI+1XLI/mhpdEJyiCmHU4PjRjEKDPa8UP820diwfxcY04cvzy62aZSSkWgzrjW+LZ7wqr6MuWAnY3Jc/K7URDSvazRt+EtfZVJT2GangArazfwrNCE9oXnDFr+OqvqJZwPj1XEBW0pFoGOKTxfFtwVLo1i4KBKYprrfb0U2oh5sc50807tmDtR1GeEtqjAd8n3ae+K8Rml7bHL2/rQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7/APmSaMOyunPxERsCF2xJdqPIGqOvgajzqOZY4u9rk=; b=cN3iMM45n077GIWmmJnc3H+nlcVSlQmgfeFdtWRxT+Ws26JgPaoeNSnLeLYY0lY/QzBX6xaXP19cDOksVI+KPfEFdAAZ1a3D+bvZZtr46oY7SKVj4HxOn15xvlMM9Cfezbk8Xs68S2SLxeXdd/R0mmydXp4MbpDDlupN/yPZ/Mc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB7003.namprd12.prod.outlook.com (2603:10b6:806:2c0::10) by SAWPR12MB999115.namprd12.prod.outlook.com (2603:10b6:806:4e3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.223.18; Tue, 21 Jul 2026 13:55:18 +0000 Received: from SA0PR12MB7003.namprd12.prod.outlook.com ([fe80::4099:396e:1f40:169b]) by SA0PR12MB7003.namprd12.prod.outlook.com ([fe80::4099:396e:1f40:169b%3]) with mapi id 15.21.0245.009; Tue, 21 Jul 2026 13:55:18 +0000 Message-ID: Date: Tue, 21 Jul 2026 09:55:13 -0400 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] drm: Guard DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE From: Harry Wentland To: Maarten Lankhorst , Robert Mader , "Borah, Chaitanya Kumar" , dri-devel@lists.freedesktop.org Cc: Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Daniel Stone , Uma Shankar , Louis Chauvet , Melissa Wen , Simon Ser , Pekka Paalanen , Leandro Ribeiro References: <20260703073230.19982-1-robert.mader@collabora.com> <6d8806b8-fc71-4699-82c4-7189a0ea2284@intel.com> <7d58b289-eabe-4d68-9080-c7202b0f60a0@intel.com> <361dfc91-94e8-4289-9b3e-5280803d9257@collabora.com> <2fa23cb1-b4c9-459b-a0dc-31960313a243@amd.com> Content-Language: en-US In-Reply-To: <2fa23cb1-b4c9-459b-a0dc-31960313a243@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: YT1PR01CA0047.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2e::16) To SA0PR12MB7003.namprd12.prod.outlook.com (2603:10b6:806:2c0::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA0PR12MB7003:EE_|SAWPR12MB999115:EE_ X-MS-Office365-Filtering-Correlation-Id: 22e10b3a-4537-410e-8ff2-08dee72fb296 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|23010399003|366016|22082099003|18002099003|56012099006|11063799006|4143699003|10067099003|6133799003; X-Microsoft-Antispam-Message-Info: W5GWgUaYb3MOU8sJKWeCyfA+V5FNTbVEh219si/TNHFw2pXNi+MG6CTvQF7Z4uv79NCN2PFPmsCtlFzkJs2R/mzY/lPTds92q7+GUnAmx+y/AB2nRn9uAtihL7AMEDxZl5uzZanq7xaof5xYVmTLdD/brB9dgmcVCedKoqKE3GFD2/y1igkJ6j+3Cham5wf06JUH3AihyFhtbP8Rqf7QTWIesaHipl1caqoI3MRFp6TAXIQHXLDT6A5zU9VcGaEDDe6eo822UpzQlOpJ5MX8mJ8WVwwG/B1QDR4ZaPH9kDbJKeze3nsiMCc/MtTvbs0rZGVGHghwUBZc2RwVWyZnI8dPrD0GXlO7M0SDm9xkzOP192Eeg85FFugZg6Dupp/7N/nSbCZp4rLlVj8CrcIdW30EF+68J2hYh2QTCbDyqYEw0rppu1KFkoTQDPoopB8936Weg5f/GuHbQCCFo/AbQFQFEiFKPf1kSURbNILRXQGWs9/kgDtx74IdaUK86kqZ+gNGr3XZ2XDb7Ht9KWwINf7pCejK6s358rlOyKK5GOpszFuhauLoIQQlahZuTxANxNvNpOS9KI4i7AtO+yK24vlb5IlisbS9dkqfQxZB663z1+NPJf5ScXep1wnOPHcEtOyPTPRF+nsyQEkc0hP29xWlAYtbAO7GaZI0km15T7o= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB7003.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(23010399003)(366016)(22082099003)(18002099003)(56012099006)(11063799006)(4143699003)(10067099003)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UHFaNSszYmhIMTV1MmtJTnhUaHpjWWs0d3JnNVhoUHpETW5LQjVtSWhzL2xz?= =?utf-8?B?RWt1aCtHdFhrMjBrMW1KOVE2VGZrS1pzbzVhM0FlWDBPZVhFbzZDUHNibDBh?= =?utf-8?B?MnhoRE1iME0vNTlNMzBobGtKVzZVR1Q3MnY0UENKRkRXbGxtUzhnTDFZb1A0?= =?utf-8?B?aDVTdUhSenh2eVF5Q0luQUQvM1EyWkcwTjJxVjIySVdiaTRibkFVOXZ3SXhZ?= =?utf-8?B?V3J4Z2s4Zm54a0lNWHQrNjM3eUhGQk5QRElGUUxVMnJDTDA1SWhleVZxb0Z3?= =?utf-8?B?Ynh4bklYOFdrdkgrSGxzRU9XRDE5d2c3M2FhQ2dTRWordGRRajRWWjliQ0pj?= =?utf-8?B?NnJwazR3QnlmM0p3YjBqcVRlV0F4UHl4WERnVmRXRnN3dk9ISzZZT2tLL1ly?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05GZ3ZvdHJRQWgrZnA4Z3dqakhm?= =?utf-8?B?Ty83TCtlQXR6VmdhdXJtMlB5V0xYcDE4Z241eHByQzUxa0pNeEZjT0dlWjVY?= =?utf-8?B?S2VDejNoVXd1dTlkdnYvd0NLKzcyUkN0VzNrL3NWUnd5ekUwMEl6dz09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22e10b3a-4537-410e-8ff2-08dee72fb296 X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB7003.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2026 13:55:18.0658 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7xQH2nBA5QN0H0P13QSbJO4STzp2v1b7X186mqC+COxQW2g8cAe34Pc4ZjLGjVTmEZidYkYwFflYJW2vurnMqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SAWPR12MB999115 On 2026-07-13 16:05, Harry Wentland wrote: > > > On 2026-07-09 07:49, Maarten Lankhorst wrote: >> Hey, >> >> On 7/9/26 13:14, Robert Mader wrote: >>> Hi, >>> >>> On 09.07.26 12:02, Maarten Lankhorst wrote: >>>> Hey, >>>> >>>> On 7/9/26 08:44, Borah, Chaitanya Kumar wrote: >>>>> >>>>> On 7/7/2026 6:31 PM, Maarten Lankhorst wrote: >>>>>> Hey, >>>>>> >>>>>> On 7/7/26 10:03, Borah, Chaitanya Kumar wrote: >>>>>>> On 7/3/2026 1:02 PM, Robert Mader wrote: >>>>>>>> The client cap is currently advertised unconditionally, even for drivers >>>>>>>> that do not support plane color pipelines. If clients supporting the later, >>>>>>> s/later/latter >>>>>>> >>>>>>>> like Wayland compositors or tools like drm_info, enable the client cap on >>>>>>>> such drivers they will be left without both color pipeline and the legacy >>>>>>>> properties COLOR_ENCODING and COLOR_RANGE, effectively breaking YUV->RGB >>>>>>>> conversion support. >>>>>>>> >>>>>>>> Prevent that by only marking the cap supported if there are actually planes >>>>>>>> with color pipelines. >>>>>>>> >>>>>>>> Note: while the color pipeline replacement for the legacy properties is >>>>>>>> still under review (1), we can assume that it will work as a drop-in >>>>>>>> replacement. >>>>>>> This change will but a driver can also choose to export colorops like programmable CTM_3x4 to achieve the same. >>>>>>> >>>>>>> We should also perhaps document this somewhere that if a driver supports LEGACY properties, it is imperative to implement some version of it with the color pipeline line property. >>>>>> Would this be doable inside drm core? Implement the color pipeline properties, get the fixed pipeline for free? >>>>> Right now, the Bypass(default) pipeline is automatically created when we call drm_plane_create_color_pipeline_property(), we could come up with a similar helper that could also create a pipeline that replaces the legacy properties. >>>>> >>>>> But this can't replace the existing helper entirely because some HW (though unlikely) might not support YUV buffers. >>>> No need to do this for free, but a cheaper way for drivers to implement legacy >>>> properties by only implementing the pipeline would be nice, similar to how >>>> atomic also implements legacy modesetting and universal planes. >>> >>> I really like this idea - should we take it to the corresponding series, https://lore.kernel.org/dri-devel/20260623164812.81110-1-harry.wentland@amd.com/ so the initial implementations for AMD and VKMS directly do so? >> >> That would be great! >> > > If I understand you correctly you suggest to map legacy COLOR_RANGE and COLOR_ENCODING to the new FIXED_MATRIX colorop in a generic way, instead of having drivers advertise them separately. Do I have that right? > > It's probably a good idea. It should be easy to make that change after merging the Fixed Matrix series with YUV support. > I sketched this out but both VKMS and amdgpu have HW generations or configs where no color pipeline is created. For that we still need the current way of COLOR_RANGE and COLOR_ENCODING handling. Because of this the code to create COLOR_RANGE and COLOR_ENCODING based on the color pipeline is not really simplifying things, but merely adding more code. At this point I am not convinced adding helpers to create COLOR_RANGE and COLOR_ENCODING based on the color pipeline is a net positive. Maybe in the future that equation changes. If anyone is interested I'm still happy to share the code. Just let me know. Harry > Harry > >> Kind regards, >> ~Maarten Lankhorst >