Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6147413rwr; Tue, 9 May 2023 10:52:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5wAjAq0nkzQPqUF2eVio/uSd81s5YucyTUca1i/7XaAgs6YS11H32YwASr5Sfg24X6ujO/ X-Received: by 2002:a17:902:da92:b0:1ac:94b3:3ab4 with SMTP id j18-20020a170902da9200b001ac94b33ab4mr3947447plx.27.1683654768577; Tue, 09 May 2023 10:52:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683654768; cv=pass; d=google.com; s=arc-20160816; b=tFkWgfdY//4N2l3K6AcOFh450kCXX+5MLK2pTfkB8xB7ANogIMVHR3q8Q3q8GsDdo1 3ffqUicDwdy8iAotrgE6w6f0s8gdde1BN9bsP68xA9CAUQKjUViY2skpQoKVSwMJl0ew B7Bz72xXy++L3+NauHSzPeZHXbprZsmeJv52n4LFJRdAWkt2rJsHnRwEDlkfVqItJYyJ SZ4QocSF+wbOmyqLXd4EHd3TtQlaVkdFoQMBGcJWQohSGSvHGyi36/ofqjIIlUiIDys0 w/5FRFG86fE0aCjVN9n/WkpLjVgQBTCd53rNY8qyLD27iP+TPkpxSAnXEHQ59XghUgpg Ykrw== 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=8zx5k5uLKXs3Cd2fSpER135m2Im1IDR4BfLjnrJssCM=; b=xIM4uZH8hvfoLpbUs+C9JprJtO/PVPgDg1Y8xESc1bYaQrxqIg7esyoWHDiO9v2czv Fiqyk7kR6rNRtC88f5BmFZoRp67DLCX3li4ChxT8pag0unJdntIJ9oduI3BUro9Ud4p3 izaL031FQdOg6QqP8mWrbqDf6jdWPIicR5IXcV01j2qUV9YmP5YT7+mX0yRXJo3JspJK aW4KlevlE0YWVAe+XzlUZUxMb719MICZsjy4B2FkhZ6mBPf0bPfNqIMpq2FYDGXB6mJp /ZrzwHGs/4Ih27owkIaVlKmsY2OO7O2smoOkwOHT5hewGl+r7FoUo0F5bJvfViWCI36H BJuQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=1pdJUvaR; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a170902ce9000b001ab256f90b2si2122992plg.460.2023.05.09.10.52.33; Tue, 09 May 2023 10:52:48 -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=@amd.com header.s=selector1 header.b=1pdJUvaR; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235036AbjEIR0C (ORCPT + 99 others); Tue, 9 May 2023 13:26:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230345AbjEIR0B (ORCPT ); Tue, 9 May 2023 13:26:01 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2052.outbound.protection.outlook.com [40.107.220.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1324F1BCB for ; Tue, 9 May 2023 10:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PuF+kETVKX/nb6ticaUhWtgBezqd76mXh0Zg/3uVE4lGCeBf9ZflY8KJI/yfXTrbfxaNq454wxZ6DLwLERe5HMzvCheTmgCjhENutsTzHLMz/f+8bv+oHiWEwkGM3p7HJh4p1gVOwxkkgVQb+67VxEdMINM3A8l6QU844HcH8YfyhbdNEJ6bJFjlDkC18qgTHVMgLvH35MRqCCS+SgOYXa5XdxCYPocPZLP0f4/zUak6G5PBBjB0iuDp36kpe40bd+I5VxcN78YjVYuGYunBOqKzCM8XWrFIT2w9e1BtMuTzHZzQkPINFbCn6+hsVfkhVYyBFUz6/j98cjcpQFTdKw== 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=8zx5k5uLKXs3Cd2fSpER135m2Im1IDR4BfLjnrJssCM=; b=CIIF88u3hzlxdT6aPxjB1zcB3ocVeMzRbQdChxAtd3QMpAZ9lULDWLd3raoGolNYo/BlvVJf14didkhVmTgsBw0akfH2Bs2mutCcenYmK55oioG9d5on/FfLFpzKtxqXTEDJ1fOJlZhZKk3Ns6KPsZprVpJx6LJgAsH5h0rJZM0eTNmdKiNEFWEQLj4pfenlQIZdj6+pHu/W5Vn4uqs7fWvjmWfUGbBsJYIEvrdh2RvcppG1NN3HUweEa95tyXa0AmJxPaX9pSYS2ucwXpdGo3TElZC6Dj7WHSZKxIfqJgeoERd8V3GPm9Foo/J/Ny0hZlxC9iOsh5T5ykWJ3wat/Q== 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=8zx5k5uLKXs3Cd2fSpER135m2Im1IDR4BfLjnrJssCM=; b=1pdJUvaRlKK6kmeFIXo1XHDmMLxTfsnhyihFUkqpoS7q0cDk/55gm9FrISzBUxK1exOEfniN4DuRefSMMCnnIQrM7XPFfTreqkdsoAnNfOXw3d2DjEWFedfVxSZ71bMhsJz3L5S+cQdu+FiSeXFpE3XZyf73OJ9SB8FzFWrNib4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CO6PR12MB5427.namprd12.prod.outlook.com (2603:10b6:5:358::13) by DM8PR12MB5413.namprd12.prod.outlook.com (2603:10b6:8:3b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Tue, 9 May 2023 17:25:54 +0000 Received: from CO6PR12MB5427.namprd12.prod.outlook.com ([fe80::4666:2db3:db1e:810c]) by CO6PR12MB5427.namprd12.prod.outlook.com ([fe80::4666:2db3:db1e:810c%6]) with mapi id 15.20.6387.018; Tue, 9 May 2023 17:25:54 +0000 Message-ID: Date: Tue, 9 May 2023 13:25:41 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [RFC PATCH 00/40] drm/amd/display: add AMD driver-specific properties for color mgmt Content-Language: en-US To: Melissa Wen Cc: amd-gfx@lists.freedesktop.org, Rodrigo Siqueira , sunpeng.li@amd.com, Alex Deucher , dri-devel@lists.freedesktop.org, airlied@gmail.com, christian.koenig@amd.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, Xinhui.Pan@amd.com, Joshua Ashton , Sebastian Wick , Xaver Hugl , Shashank Sharma , Nicholas Kazlauskas , sungjoon.kim@amd.com, Alex Hung , linux-kernel@vger.kernel.org References: <20230423141051.702990-1-mwen@igalia.com> <20230509165208.kaydnbcc22ejj72u@mail.igalia.com> From: Harry Wentland In-Reply-To: <20230509165208.kaydnbcc22ejj72u@mail.igalia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: YQBPR01CA0167.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:7e::23) To CO6PR12MB5427.namprd12.prod.outlook.com (2603:10b6:5:358::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR12MB5427:EE_|DM8PR12MB5413:EE_ X-MS-Office365-Filtering-Correlation-Id: ae900e0d-e8e7-4270-1561-08db50b27130 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TOtP/dZLC3nwpSPmSIHK72h3VChXoE9rPAgeY1lNbrxLCh3By0/9FNmrRGTV4FkQEfe1EqbAsKDz5bHOSfs7+jdgCPOIc8SRwE0RPp3tQXOTmCvExP+k68u1gl6khn7p2YJJ7a6bdpnw+y7p+606QMOzLaU9mcesDbRdjGpOUbDQRIvmYHrtu9c5K081e6mQuQqVBb1CKDCLlv9/kPvAtWVZgzqBv0FlAAKHh/lPWiMfXYzq1wkLv5eRRK2dWwMj3E46DVHsBptSAXFuXKsuY+g3ZU2L3ninIrlS1iKRQbKqx+0FnhMhSkeLjhB9++ArVCEmC+u9fHitZEfJu8d4VhwwSavK+USXY0FRKdAFxt36QPHk/EYSF5qSaTsY0Co/+uyFfpyhiKCNC/NMVpLyRLleltjJaG78ZXBeRnPvsUElYmMchZf8Eg4IKpEvBHWiqJbU/D5Q5FfDb9Xf98fkHQagYqEEvzrw8FvAggb4WRgKHdeTp8yjkMHFZTfPdX2EktRP6hRpZAO7NNCf3u7LhJuAZFW+a0Ozpt33dLetfAk+GkooVqefjvabknzukPB9AUeqpmI+wODMB2U1yqAPYkYulyVwGlsVBN3hQbwwBh3d7Sx2saM+sr6bDQVww4LF9sepAGcUnk/OFmaW4hT+76cxGaq3xYJbFjnbYCqDGN5LSAtSowq1ycxnC9nH4Kpi X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR12MB5427.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(39860400002)(346002)(136003)(366004)(451199021)(5660300002)(44832011)(7416002)(8676002)(966005)(8936002)(2906002)(83380400001)(2616005)(186003)(30864003)(36756003)(38100700002)(86362001)(31696002)(53546011)(6506007)(6512007)(66476007)(66946007)(316002)(6916009)(66556008)(4326008)(26005)(54906003)(31686004)(478600001)(6486002)(6666004)(41300700001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MkZPYXJYSEIreE1CK3gvUnpLQWorMGh4T1RpMHpxbmRmV0h3ajdqNDFFOVUv?= =?utf-8?B?UHJkdXluWStkOTczK2xMdzFJWDF3N2JyMDNJcjBheWcyTXo5R09UWVVpRTRo?= =?utf-8?B?ZFhtdjk4eHZRR2RkRkJmSHIrTFpLbVFwdkFzZDNKOXBSTStiY3d2a2tGd3Zh?= =?utf-8?B?NkE4NUorcGxxczdsTDQ2cjZFeTN0U2hLY1VSUkNkdFRuU0VmS1NZOHMyQ3U2?= =?utf-8?B?eFVpZlV4V1g0Tm9xbzQ1VHFieEE1ZGlWVXZOSWthMXpaZEJ5TVdCYmppdWhT?= =?utf-8?B?cjlkUjg2cVdkNm5SVWJSdjhNS3R0NkVMOEJGQ3VzTS9OVzVCdm94aS9oMXRn?= =?utf-8?B?cDl0L21KZVpSL29NQVJkYjFWNGt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270-1561-08db50b27130 X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5427.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2023 17:25:53.8238 (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: P3wtm6ruxR42fuGH3KlhJet9H6B9zqagdXWddvgH+P2rMZI5Ja3QzSMEV2SWMynyTh85AuAWjf6tmb+3SUtvZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5413 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 5/9/23 12:52, Melissa Wen wrote: > On 05/08, Harry Wentland wrote: >> >> >> On 4/23/23 10:10, Melissa Wen wrote: >>> Hi all, >>> >>> Joshua Ashton and I (with the great collaboration of Harry Wentland - >>> thanks) have been working on KMS color pipeline enhancement for Steam >>> Deck/SteamOS by exposing the large set of color caps available in AMD >>> display HW. >>> >> >> Thank you for your work on this. >> >>> This patchset results from this full-stack work, including pre-blending >>> and post-blending new color properties. The first two patches fix >>> quantization issues on shaper LUT programming. Just after, we have one >>> patch that adds a config option to restrict AMD colo feature usage. The >>> following 13 patches implement AMD driver-private color properties >>> (pending detachment of property counter and plane color_mgmt_changed >>> from DRM). Finally, the last 24 patches rework the AMD display manager >>> and color management to support the properties exposed. >>> >>> In short, for pre-blending, we added the following: >>> - plane degamma LUT and predefined transfer function; >>> - plane HDR multiplier >>> - plane shaper LUT/transfer function; >>> - plane 3D LUT; and finally, >>> - plane blend LUT/transfer function, just before blending. >>> >>> After blending, we already have DRM CRTC degamma/gamma LUTs and CTM, >>> therefore, we extend CRTC color pipeline with the following: >>> - CRTC shaper LUT/transfer function; >>> - CRTC 3D LUT; and >>> - CRTC gamma transfer function. >>> >>> You can already find the AMD color capabilities and color management >>> pipeline documented here: >>> https://dri.freedesktop.org/docs/drm/gpu/amdgpu/display/display-manager.html#color-management-properties >>> >>> In previous iterations, we tried to provide a generic solution for >>> post-blending shaper and 3D LUT [1][2][3], and also Alex Hung worked on >>> a pre-blending 3D LUT solution[4] extending plane color mgmt proposal >>> from Uma Shankar [5]. However, we identified during our work [6] that >>> AMD provides many other valuable capabilities that we don't find in >>> other vendors, so we started to work on AMD driver-private color >>> properties that better describe its color pipeline, enabling us to >>> expose full AMD color capabilities on Deck HW. >>> >>> Our primary purpose is to avoid usage limitations of color calibration >>> features provided by HW just because we don't have an interface for >>> that. At the same time, a generic solution doesn't fit well since some >>> of these capabilities seem AMD HW specific, such as hardcoded >>> curve/predefined transfer function and shaper 1D LUTs sandwiching 3D >>> LUT. >>> >>> So far, we keep these properties' usage under an AMD display config >>> option (STEAM_DECK). However, we are fine with having them fully >>> available to other DCN HW generations. In the current proposal, we are >>> already checking ASICs before exposing a color feature. We can work on >>> 3D LUT resource acquisition details to fit them to DCN 3+ families that >>> support them. Indeed, before moving to these config boundaries, we >>> started working on an open solution for any AMD HW [7]. >>> >> >> The problem with a CONFIG_XYZ option is that it becomes uAPI and can't be >> removed. I feel we have a good proposal going for the generic solution. >> Would it work for you if we don't make this a CONFIG_ option? What I mean >> is using >> >> #define AMD_PRIVATE_COLOR >> >> around the interface bits, which are only compiled when building with >> -DAMD_PRIVATE_COLOR > > I think we can go with this approach for the properties already in use > by Gamescope/SteamOS. >> >> That way we have the option to rip the driver-private stuff out later >> while still allowing for experimentation now. >> >> Or, alternatively, we can merge everything but the stuff currently >> guarded by CONFIG_STEAM_DECK, so that custom kernels can enable this >> functionality by simply merging one patch that includes all the >> CONFIG_STEAM_DECK stuff. > > An then we can drop the interface of things that Gamescope is not > managing, but keep those things already programmed on DM color for any > future usage. What do you think? > Sure. Harry > Melissa > >> >> This will allow us to merge the vast majority of the code without >> having to maintain it in downstream repo. >> >>> The userspace case here is Gamescope which is the compositor for >>> SteamOS. It's already using all of this functionality (although with a >>> VALVE1_ prefix instead of AMD) to implement its color management >>> pipeline right now: >>> https://github.com/ValveSoftware/gamescope >>> >>> We are planning on shipping our color management support with gamut >>> mapping, HDR, SDR on HDR, HDR on SDR, and much more in Steam OS 3.5. A >>> brief overview of our color pipeline can be found here: >>> https://github.com/ValveSoftware/gamescope/blob/master/src/docs/Steam%20Deck%20Display%20Pipeline.png >>> >>> We have also had some other userspace interests from Xaver Hugl (KDE) in >>> experimenting with these properties for their HDR/color bring-up before >>> a generic interface is settled on also. >>> >>> It still needs AMD-specific IGT tests; we are working on documentation >>> and adding plane CTM support too. >>> >>> We decided first to share our work to collect thoughts and open for >>> discussion, even with missing refinements, since driver-private >>> properties are not the usual DMR/KMS color management approach. >>> >>> Please, let us know your thoughts. >>> >> >> As discussed at the hackfest I think it's a good idea to have something >> that's easy to enable for the purposes of experimentation (and to >> help downstream users that help us figure out how this all fits >> together, i.e. SteamOS). >> >> Harry >> >>> Best Regards, >>> >>> Signed-off-by: Joshua Ashton >>> Signed-off-by: Melissa Wen >>> >>> [1] https://lore.kernel.org/dri-devel/20220619223104.667413-1-mwen@igalia.com/ >>> [2] https://lore.kernel.org/amd-gfx/20220906164628.2361811-1-mwen@igalia.com/ >>> [3] https://lore.kernel.org/dri-devel/20230109143846.1966301-1-mwen@igalia.com/ >>> [4] https://lore.kernel.org/dri-devel/20221004211451.1475215-1-alex.hung@amd.com/ >>> [5] https://lore.kernel.org/dri-devel/20210906213904.27918-1-uma.shankar@intel.com/ >>> [6] https://gitlab.freedesktop.org/mwen/linux-amd/-/commits/amd-color-mgmt >>> [7] https://gitlab.freedesktop.org/mwen/linux-amd/-/commits/amd-private-color-mgmt >>> >>> Harry Wentland (2): >>> drm/amd/display: fix segment distribution for linear LUTs >>> drm/amd/display: fix the delta clamping for shaper LUT >>> >>> Joshua Ashton (15): >>> drm/amd/display: add CRTC gamma TF to driver-private props >>> drm/amd/display: add plane degamma LUT driver-private props >>> drm/amd/display: add plane degamma TF driver-private property >>> drm/amd/display: add plane HDR multiplier driver-private property >>> drm/amd/display: add plane blend LUT and TF driver-private properties >>> drm/amd/display: copy 3D LUT settings from crtc state to stream_update >>> drm/amd/display: dynamically acquire 3DLUT resources for color changes >>> drm/amd/display: add CRTC regamma TF support >>> drm/amd/display: set sdr_ref_white_level to 80 for out_transfer_func >>> drm/amd/display: add support for plane degamma TF and LUT properties >>> drm/amd/display: add dc_fixpt_from_s3132 helper >>> drm/adm/display: add HDR multiplier support >>> drm/amd/display: handle empty LUTs in __set_input_tf >>> drm/amd/display: add DRM plane blend LUT and TF support >>> drm/amd/display: allow newer DC hardware to use degamma ROM for PQ/HLG >>> >>> Melissa Wen (23): >>> drm/amd/display: introduce Steam Deck color features to AMD display >>> driver >>> drm/drm_mode_object: increase max objects to accommodate new color >>> props >>> drm/amd/display: add shaper LUT driver-private props >>> drm/amd/display: add 3D LUT driver-private props >>> drm/drm_plane: track color mgmt changes per plane >>> drm/amd/display: move replace blob func to dm plane >>> drm/amd/display: add plane 3D LUT driver-private properties >>> drm/amd/display: add plane shaper LUT driver-private properties >>> drm/amd/display: add plane shaper TF driver-private property >>> drm/amd/display: add comments to describe DM crtc color mgmt behavior >>> drm/amd/display: encapsulate atomic regamma operation >>> drm/amd/display: update lut3d and shaper lut to stream >>> drm/amd/display: allow BYPASS 3D LUT but keep shaper LUT settings >>> drm/amd/display: handle MPC 3D LUT resources for a given context >>> drm/amd/display: add CRTC 3D LUT support to amd color pipeline >>> drm/amd/display: decouple steps to reuse in CRTC shaper LUT support >>> drm/amd/display: add CRTC shaper LUT support to amd color pipeline >>> drm/amd/display: add CRTC shaper TF support >>> drm/amd/display: mark plane as needing reset if plane color mgmt >>> changes >>> drm/amd/display: decouple steps for mapping CRTC degamma to DC plane >>> drm/amd/display: reject atomic commit if setting both plane and CRTC >>> degamma >>> drm/amd/display: add plane shaper/3D LUT and shaper TF support >>> drm/amd/display: copy dc_plane color settings to surface_updates >>> >>> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 153 +++++ >>> drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 92 +++ >>> drivers/gpu/drm/amd/display/Kconfig | 6 + >>> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 +- >>> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 120 +++- >>> .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 613 ++++++++++++++++-- >>> .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 124 +++- >>> .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 238 +++++++ >>> .../amd/display/amdgpu_dm/amdgpu_dm_plane.h | 7 + >>> drivers/gpu/drm/amd/display/dc/core/dc.c | 49 +- >>> drivers/gpu/drm/amd/display/dc/dc.h | 8 + >>> .../amd/display/dc/dcn10/dcn10_cm_common.c | 109 +++- >>> .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 5 +- >>> .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 9 +- >>> .../amd/display/dc/dcn301/dcn301_resource.c | 26 +- >>> .../gpu/drm/amd/display/include/fixed31_32.h | 12 + >>> drivers/gpu/drm/drm_atomic.c | 1 + >>> drivers/gpu/drm/drm_atomic_state_helper.c | 1 + >>> include/drm/drm_mode_object.h | 2 +- >>> include/drm/drm_plane.h | 7 + >>> 20 files changed, 1509 insertions(+), 104 deletions(-) >>> >> >>