From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16C61ECE577 for ; Mon, 9 Sep 2024 18:40:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA9F310E5B0; Mon, 9 Sep 2024 18:40:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="0fIvxE+W"; dkim-atps=neutral Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2056.outbound.protection.outlook.com [40.107.101.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9EC5210E5B0; Mon, 9 Sep 2024 18:40:11 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MazTAM8kIs9zjZ5S5gdrLsxUtb+AUcrLtPGFdwq5xgGVfbrEdnQa6nd9fxBBIz/UbugBtqUV5sKMOhLnx472EL4J7WsZ/XQKI2xjzDduvEvMIzpjFDf6H3SMgMJwF1TXURbtvH3lGPssXFMu7SweqH7asmF16ZvI+PyFiBca1XZx2HTqKEABI1XLjhHrb45xS4AuCRejQfMm67EG7o0EK0SwF7I+qPvpIz8oZv1US3nW0UZ6OjIRPzmaZ8I0E1Jdyg+g2vWW7WAVGebwdqz4JwIlGExllb2XuKa1BbNP8qQpIw4geTCJJpbsjrqr+nWSCd/SmQ1TUvAcAa12WBE9vA== 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=8JDIkVIwLHVhsTd2xPSlpGRJwhLmNV3iBwaD/hDUqNA=; b=m1kLkMqr/57K35sbJYObRfpt9EJBGCufpJ99wD1BPTYRTrPFGANqMf52A4Gtjff5WtC9JKSvHDr7HRAsnXpeQoEe5itecFdqkN83ty+Hzuhbht0r7YAO2qmsUk1fXkns0k0ew71m8A+JiXV1DMc49CPTczp8xrv0YrmEPff00OGfQ8owvXfNXu6GB3lN7LCSUPffGDQihPy8kfO9QseHANnjk5KDsXDHOLOttPoHZOAvfviF4tVS0mWtH6Wl2N6KJxWR0dwebxy/IVgPZv1vK/3kHEoKAD7vY6C3spSACoooMjDB2nLTmoq8zMm87BOVWri6TO32TZVvHWBGFgTlGw== 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=8JDIkVIwLHVhsTd2xPSlpGRJwhLmNV3iBwaD/hDUqNA=; b=0fIvxE+WYy3JI0Xq3b56b6LMe+f23IjRUiiRA0F+CwVLtahEjS4eM8TNy7hfPflZkZSZrt76sBvL7fliysagU0jljUWSq7jMB7tduS4AHOU2xDwLtCYvc88IcFw8ybGHp3qwYN1bXm+U8Ao9yoKKT5L2Imspj2VWM6oG5y91oz8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ0PR12MB5438.namprd12.prod.outlook.com (2603:10b6:a03:3ba::23) by MW4PR12MB8611.namprd12.prod.outlook.com (2603:10b6:303:1ed::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.28; Mon, 9 Sep 2024 18:40:08 +0000 Received: from SJ0PR12MB5438.namprd12.prod.outlook.com ([fe80::65b2:12d5:96ba:dd44]) by SJ0PR12MB5438.namprd12.prod.outlook.com ([fe80::65b2:12d5:96ba:dd44%7]) with mapi id 15.20.7918.024; Mon, 9 Sep 2024 18:40:07 +0000 Message-ID: <07cfa0ee-9160-4a99-82dd-0a0b11af243f@amd.com> Date: Mon, 9 Sep 2024 14:40:01 -0400 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 00/44] Color Pipeline API w/ VKMS To: Xaver Hugl Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, wayland-devel@lists.freedesktop.org, Ville Syrjala , Pekka Paalanen , Simon Ser , Melissa Wen , =?UTF-8?Q?Jonas_=C3=85dahl?= , Sebastian Wick , Shashank Sharma , Alexander Goins , Joshua Ashton , =?UTF-8?Q?Michel_D=C3=A4nzer?= , Aleix Pol , Victoria Brekenfeld , Sima , Uma Shankar , Naseer Ahmed , Christopher Braga , Abhinav Kumar , Arthur Grillo , Hector Martin , Liviu Dudau , Sasha McIntosh , Chaitanya Kumar Borah References: <20240819205714.316380-1-harry.wentland@amd.com> Content-Language: en-US From: Harry Wentland In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: YQBPR0101CA0123.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:5::26) To SJ0PR12MB5438.namprd12.prod.outlook.com (2603:10b6:a03:3ba::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR12MB5438:EE_|MW4PR12MB8611:EE_ X-MS-Office365-Filtering-Correlation-Id: a6ddd08d-690a-48de-8b83-08dcd0fed3d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B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IP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR12MB5438.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(7416014)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NGxnTEhMZU1HNnhJWkd4ZUhFcU51YnRzWTYxYklybDBvYUpBS0xTYndLejZE?= =?utf-8?B?YnJqRmlUQ0lISVVHRWJKMFNRMzNOcVZ5aTMzTDY2dHZvQ08xS3FQM00rekdB?= =?utf-8?B?Z0k1RjhJOElkOXZ4QmNPRk9JS3FBNGpzVFpEV2tnNm42eVZoOXdWYXFMVGxC?= =?utf-8?B?SkNOZHF1MmJjcTZCYnlpNnVxaEhyLysxUnhWMksrQ242bkJIUVgrZXpOK0xV?= =?utf-8?B?aWdhb3pEUURLMHAxaGlKTGFHdlRvOWx6b21iNVA5NmhpZVZMbVZIdW9ZQzhw?= =?utf-8?B?QXZ6Z25vb2tYUUxsNWZkU0diVmp6RU9DK28rSzVNckFROEoxb3ZkTi9oeTdF?= =?utf-8?B?ZFVveFIrUnhnOWxlZmcxNUFlSFFLZk9jSnc4NmZDcFVYWldDZDFFVjdGWlZx?= =?utf-8?B?c3NHRXJyTmhYOGdTNEhUSDh3eVAvUTlwYVlYVlA0NVRDWUFTL1pKSXd5SjB5?= =?utf-8?B?YjE0aWlmT2w2WWcvSWM5NmV0RjFGajhZZEpyVzI0V1ZkRnhFQzB5c2NGTitz?= =?utf-8?B?U2pzZXo3bEk5MGl1cURVYU56NmlKOWIwN0d2Y2l2OUhERTdKYWVnMUhZT3NM?= =?utf-8?B?MDNjcFRpQjFBOU0xSkRsVnBnWDZQc01JN0s2UDZlaThHWFZ1c3FveTRKdnda?= =?utf-8?B?bzQ2akgvcnJGb25odStTMFZCTmJjamFPNFFnekZhUExYa3Q0Wlg4WDJidXR2?= =?utf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hNEdR?= =?utf-8?B?MGVOdGVkMWM1OTJZUExxNUpLSk1oWTJIUEVLWTN5Tm04Y3JvanFJV1N3N0Zk?= =?utf-8?B?aHp2bWVXeVlmcWxXK0hBV3V4NjBoL3pjdmNVa1VEQzlTc2pIWG9lMkQvcXg3?= =?utf-8?B?M05FZWtnbUx4dDVRZTVYSHhITGZJN2Zwai9Ia2l1YVU5SXR3SnlyZGovdmMr?= =?utf-8?B?VERiTG1SM2h0TG12MnpGYkpDUzdnTVlrNHNxQktYM3lTVi8vSXBsdVg3NXg1?= =?utf-8?B?ZEpZMEp4bzRuZGMwYmRyakxYNFR3VUNsMS9UYXNiU0RoZHFRdjhHV2ZDTVkx?= =?utf-8?B?N0wvQ0VIcWtoT1NtTmtFRmI1cFNaZzF4Ri9VZU8wdFd6amZLUjlCOVVHeHdh?= =?utf-8?B?aGxMZDM1MWpTTlVuMGVibGNWUmFrcFZJKzljNmIvVERvVG5tVnp4d3lqZklz?= =?utf-8?B?dU1BY2NPMmFuaUh4YVdFekUwZVpsc09sN09qOEhRdDVmYmNOQ3paRmZCYkpk?= =?utf-8?Q?WFPPv5fLV/RVJceSQX9XAZ+6g?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6ddd08d-690a-48de-8b83-08dcd0fed3d0 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR12MB5438.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2024 18:40:07.7315 (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: LvINFZp/bbP6zpNXQkOxraQPKNKcIwzb9pGIg3Sy2PuuRoa1TPnx0i2I8coOhH0qD5pypZyJANC4gc8+Ds6nYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB8611 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On 2024-08-29 10:55, Xaver Hugl wrote: > Hi, > > I have a WIP implementation of this for KWin at > https://invent.kde.org/plasma/kwin/-/commits/work/zamundaaa/drm-colorop. > It maps KWin's color pipeline to the drm one to get (primary plane > only, for now) direct scanout of HDR content on SDR displays while > doing tone mapping (or SDR on HDR, but that's been possible before). > It currently uses the two 1D custom luts and the 3D lut for this; once > I add support for named 1D curves, it should also make use of that and > the matrix. I haven't tested the Intel version yet, but if it can > match the pipeline, it should work the same there. > > In testing your amd-color-pipeline-v5 branch I get two crashes in the > kernel though: https://invent.kde.org/-/snippets/3217 > The null pointer dereference only happens sometimes, seemingly > randomly, but if I make KWin generate new blobs each frame, I can 100% > reliably reproduce the list_add corruption problem by just opening > glxgears in fullscreen while the color profile of the display is set > to "built in" (which makes it use the 3D LUT for gamut mapping). > Here's a branch that generates the color pipeline each frame and > triggers this: https://invent.kde.org/plasma/kwin/-/commits/work/zamundaaa/drm-colorop-list-add-corruption > Thanks for the test branch. Got a repro and will investigate. Harry > > > Am Mo., 19. Aug. 2024 um 22:57 Uhr schrieb Harry Wentland > : >> >> This is an RFC set for a color pipeline API, along with implementations >> in VKMS and amdgpu. It is tested with a set of IGT tests that can be >> found at [1]. The IGT tests run a pixel-by-pixel comparison with an >> allowable delta variation as the goal for these transformations is >> perceptual correctness, not complete pixel accuracy. >> >> v5 of this patchset fleshed out documentation for colorops and the >> various defines that are being introduced. >> >> VKMS supports two named transfer function colorops and two matrix >> colorops. >> >> Amdgpu advertises the following pipeline for GPUs with DCN 3 or newer: >> >> 1. 1D Curve EOTF >> 2. 3x4 CTM >> 3. Multiplier >> 4. 1D Curve Inverse EOTF >> 5. 1D LUT >> 6. 3D LUT >> 7. 1D Curve EOTF >> 8. 1D LUT >> >> The supported curves for the 1D Curve type are: >> - sRGB EOTF and its inverse >> - PQ EOTF, scaled to [0.0, 125.0] and its inverse >> - BT.2020/BT.709 OETF and its inverse >> >> Note that the 1st and 5th colorops take the EOTF or Inverse >> OETF while the 3rd colorop takes the Inverse EOTF or OETF. >> >> The 3D LUT is a 17^3 tetrahedrally interpolated LUT but the mechanism >> exists for other drivers to describe their own 3D LUT capability. >> >> This mirrors the color pipeline used by gamescope and presented by >> Melissa Wen, with the exception of the DEGAM LUT, which is not currently >> used. See [1] >> https://indico.freedesktop.org/event/4/contributions/186/attachments/138/218/xdc2023-TheRainbowTreasureMap-MelissaWen.pdf >> >> At this point we're hoping to see gamescope and kwin implementations >> take shape. The existing pipeline should be enough to satisfy the >> gamescope use-cases on the drm_plane. >> >> In order to support YUV we'll need to add COLOR_ENCODING and COLOR_RANGE >> support to the color pipeline. I have sketched these out already but >> don't have it all hooked up yet. This should not hinder adoption of this >> API for gaming use-cases. >> >> We'll also want to advertise IN_FORMATS on a color pipeline as some >> color pipelines won't be able to work for all IN_FORMATS on a plane. >> Again, I have a sketch but no full implementation yet. This is not >> currently required by the AMD color pipeline and could be added after >> the merge of this set. >> >> VKMS patches could still be improved in a few ways, though the >> payoff might be limited and I would rather focus on other work >> at the moment. The most obvious thing to improve would be to >> eliminate the hard-coded LUTs for identity, and sRGB, and replace >> them with fixed-point math instead. >> >> There are plenty of things that I would like to see, but they could >> be added after the merge of this patchset: >> - COLOR_ENCODING and COLOR_RANGE >> - IN_FORMATS for a color pipeline >> - Is it possible to support HW which can't bypass entire pipeline? >> - Can we do a LOAD / COMMIT model for LUTs (and other properties)? >> - read-only scaling colorop which defines scaling taps and position >> - named matrices, for things like converting YUV to RGB >> - Add custom LUT colorops to VKMS >> >> IGT tests can be found at [1] or on the igt-dev mailing list. >> >> A kernel branch can be found at [2]. >> >> I've also rebased Uma and Chaitanya's patches for the Intel color >> pipeline on top of this to show how I envision them to mesh with >> my changes. The relevant branches can be found at [3] for the kernel >> and [4] for IGT. There were some rebase conflicts in i915 and I'm >> not entirely sure I've resolved all of them correctly, but the branch >> compiles and shows my thoughts for the new DRM concepts to support >> Intel's pipeline. >> >> [1] https://gitlab.freedesktop.org/hwentland/igt-gpu-tools/-/tree/amd-color-pipeline-v5 >> [2] https://gitlab.freedesktop.org/hwentland/linux/-/tree/amd-color-pipeline-v5 >> [3] https://gitlab.freedesktop.org/hwentland/linux/-/tree/amd-intel-color-pipeline-v5 >> [4] https://gitlab.freedesktop.org/hwentland/igt-gpu-tools/-/tree/amd-intel-color-pipeline-v5 >> >> >> v5: >> - amdgpu 3D LUT >> - Don't require BYPASS >> - update RFC docs and add to TOC tree >> - add drm_colorop and COLOR_PIPELINE kernel docs (non-RFC) >> - add amdgpu color pipeline doc >> - define SIZE property similar to drm_crtc's GAMMA_SIZE >> - various minor fixes and cleanups >> >> v4: >> - Add amdgpu color pipeline (WIP) >> - Don't block setting of deprecated properties, instead pass client cap >> to atomic check so drivers can ignore these props >> - Drop IOCTL definitions (Pekka) >> - Use enum property for colorop TYPE (Pekka) >> - A few cleanups to the docs (Pekka) >> - Rework the TYPE enum to name relation to avoid code duplication (Pekka) >> - Add missing function declarations (Chaitanya Kumar Borah) >> - Allow setting of NEXT property to NULL in _set_ function (Chaitanya Kumar Borah) >> - Add helper for creation of pipeline drm_plane property (Pekka) >> - Always create Bypass pipeline (Pekka) >> - A bunch of changes to VKMS kunit tests (Pekka) >> - Fix index in CTM doc (Pekka) >> >> v3: >> - Abandon IOCTLs and discover colorops as clients iterate the pipeline >> - Remove need for libdrm >> - Add color_pipeline client cap and make mutually exclusive with >> COLOR_RANGE and COLOR_ENCODING properties >> - add CTM colorop to VKMS >> - Use include way for kunit testing static functions (Arthur) >> - Make TYPE a range property >> - Move enum drm_colorop_type to uapi header >> - and a bunch of smaller bits that are highlighted in the relevant commit >> description >> >> v2: >> - Rebased on drm-misc-next >> - Introduce a VKMS Kunit so we can test LUT functionality in vkms_composer >> - Incorporate feedback in color_pipeline.rst doc >> - Add support for sRGB inverse EOTF >> - Add 2nd enumerated TF colorop to VKMS >> - Fix LUTs and some issues with applying LUTs in VKMS >> >> Cc: Ville Syrjala >> Cc: Pekka Paalanen >> Cc: Simon Ser >> Cc: Harry Wentland >> Cc: Melissa Wen >> Cc: Jonas Ådahl >> Cc: Sebastian Wick >> Cc: Shashank Sharma >> Cc: Alexander Goins >> Cc: Joshua Ashton >> Cc: Michel Dänzer >> Cc: Aleix Pol >> Cc: Xaver Hugl >> Cc: Victoria Brekenfeld >> Cc: Sima >> Cc: Uma Shankar >> Cc: Naseer Ahmed >> Cc: Christopher Braga >> Cc: Abhinav Kumar >> Cc: Arthur Grillo >> Cc: Hector Martin >> Cc: Liviu Dudau >> Cc: Sasha McIntosh >> Cc: Chaitanya Kumar Borah >> >> Alex Hung (13): >> drm/colorop: define a new macro for_each_new_colorop_in_state >> drm/amd/display: Skip color pipeline initialization for cursor plane >> drm/amd/display: Add support for sRGB EOTF in DEGAM block >> drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block >> drm/amd/display: Add support for sRGB EOTF in BLND block >> drm/colorop: Add 1D Curve Custom LUT type >> drm/amd/display: add shaper and blend colorops for 1D Curve Custom LUT >> drm/amd/display: add 3x4 matrix colorop >> drm/colorop: Add mutliplier type >> drm/amd/display: add multiplier colorop >> drm/amd/display: Swap matrix and multiplier >> drm/colorop: Add 3D LUT supports to color pipeline >> drm/amd/display: add 3D LUT colorop >> >> Harry Wentland (31): >> drm: Add helper for conversion from signed-magnitude >> drm/vkms: Round fixp2int conversion in lerp_u16 >> drm/vkms: Add kunit tests for VKMS LUT handling >> drm/doc/rfc: Describe why prescriptive color pipeline is needed >> drm/colorop: Introduce new drm_colorop mode object >> drm/colorop: Add TYPE property >> drm/colorop: Add 1D Curve subtype >> Documentation/gpu: document drm_colorop >> drm/colorop: Add BYPASS property >> drm/colorop: Add NEXT property >> drm/colorop: Add atomic state print for drm_colorop >> drm/plane: Add COLOR PIPELINE property >> drm/colorop: Add NEXT to colorop state print >> drm/vkms: Add enumerated 1D curve colorop >> drm/vkms: Add kunit tests for linear and sRGB LUTs >> drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE >> drm/colorop: Add 3x4 CTM type >> drm/vkms: Use s32 for internal color pipeline precision >> drm/vkms: add 3x4 matrix in color pipeline >> drm/tests: Add a few tests around drm_fixed.h >> drm/vkms: Add tests for CTM handling >> drm/colorop: pass plane_color_pipeline client cap to atomic check >> drm/amd/display: Ignore deprecated props when plane_color_pipeline set >> drm/amd/display: Add bypass COLOR PIPELINE >> drm/colorop: Add PQ 125 EOTF and its inverse >> drm/amd/display: Enable support for PQ 125 EOTF and Inverse >> drm/colorop: add BT2020/BT709 OETF and Inverse OETF >> drm/amd/display: Add support for BT.709 and BT.2020 TFs >> drm/colorop: Define LUT_1D interpolation >> drm/colorop: allow non-bypass colorops >> drm/amd/display: Add AMD color pipeline doc >> >> Documentation/gpu/drm-kms.rst | 15 + >> Documentation/gpu/rfc/color_pipeline.rst | 376 ++++++++ >> Documentation/gpu/rfc/index.rst | 3 + >> drivers/gpu/drm/Makefile | 1 + >> .../gpu/drm/amd/display/amdgpu_dm/Makefile | 3 +- >> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 + >> .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 581 ++++++++++++- >> .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 196 +++++ >> .../amd/display/amdgpu_dm/amdgpu_dm_colorop.h | 36 + >> .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 32 + >> drivers/gpu/drm/drm_atomic.c | 184 +++- >> drivers/gpu/drm/drm_atomic_helper.c | 12 + >> drivers/gpu/drm/drm_atomic_state_helper.c | 5 + >> drivers/gpu/drm/drm_atomic_uapi.c | 175 ++++ >> drivers/gpu/drm/drm_colorop.c | 562 ++++++++++++ >> drivers/gpu/drm/drm_ioctl.c | 7 + >> drivers/gpu/drm/drm_mode_config.c | 7 + >> drivers/gpu/drm/drm_plane.c | 52 ++ >> drivers/gpu/drm/tests/Makefile | 3 +- >> drivers/gpu/drm/tests/drm_fixp_test.c | 69 ++ >> drivers/gpu/drm/vkms/Kconfig | 5 + >> drivers/gpu/drm/vkms/Makefile | 4 +- >> drivers/gpu/drm/vkms/tests/.kunitconfig | 4 + >> drivers/gpu/drm/vkms/tests/vkms_color_tests.c | 449 ++++++++++ >> drivers/gpu/drm/vkms/vkms_colorop.c | 102 +++ >> drivers/gpu/drm/vkms/vkms_composer.c | 115 ++- >> drivers/gpu/drm/vkms/vkms_drv.h | 8 + >> drivers/gpu/drm/vkms/vkms_luts.c | 802 ++++++++++++++++++ >> drivers/gpu/drm/vkms/vkms_luts.h | 12 + >> drivers/gpu/drm/vkms/vkms_plane.c | 2 + >> include/drm/drm_atomic.h | 130 +++ >> include/drm/drm_atomic_uapi.h | 3 + >> include/drm/drm_colorop.h | 427 ++++++++++ >> include/drm/drm_file.h | 7 + >> include/drm/drm_fixed.h | 18 + >> include/drm/drm_mode_config.h | 18 + >> include/drm/drm_plane.h | 19 + >> include/uapi/drm/amdgpu_drm.h | 9 - >> include/uapi/drm/drm.h | 16 + >> include/uapi/drm/drm_mode.h | 156 ++++ >> 40 files changed, 4595 insertions(+), 34 deletions(-) >> create mode 100644 Documentation/gpu/rfc/color_pipeline.rst >> create mode 100644 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c >> create mode 100644 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.h >> create mode 100644 drivers/gpu/drm/drm_colorop.c >> create mode 100644 drivers/gpu/drm/tests/drm_fixp_test.c >> create mode 100644 drivers/gpu/drm/vkms/tests/.kunitconfig >> create mode 100644 drivers/gpu/drm/vkms/tests/vkms_color_tests.c >> create mode 100644 drivers/gpu/drm/vkms/vkms_colorop.c >> create mode 100644 drivers/gpu/drm/vkms/vkms_luts.c >> create mode 100644 drivers/gpu/drm/vkms/vkms_luts.h >> create mode 100644 include/drm/drm_colorop.h >> >> -- >> 2.46.0 >>