From patchwork Fri Dec 20 04:33:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 13916196 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 1F45BE77188 for ; Fri, 20 Dec 2024 04:35:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96C8610E370; Fri, 20 Dec 2024 04:35:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="XEcDMedY"; dkim-atps=neutral Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2061.outbound.protection.outlook.com [40.107.212.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id B030D10E0D3; Fri, 20 Dec 2024 04:35:46 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ngqJFEW9SIVRz8Kfb0e/TYMJFEX/vNdEYiixTQ9v+T3i12+PYx415q7fKpiPA6dSLYpwBIn8tHSTkeD5RoeTkENpEdxUJX6sjEBpSXL0qcJUun6plBTMk5SMULlUxa4ArafZsaZJng1SkqYuzZtxTMDCh33Qy+pysburleRTdmA9PUGWScl/olaDctlhBNYLuFVzTelBPGdrLi6IjUM2tEES39ascexvQSabR5ypsVjrVYIVe5+ygpFxgtYEg8wDsUZbujB/O2PBGNwyZcFq4b+iF01EmObFc05+wqO0fldZfVPJAtrtBnLiFZFDVHU/tVxE0RHkfIXdK883/sG++Q== 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=PtPE1flTXAIXZ0OPFxlUmCfo9xm7WZ2afzq4l3hc85k=; b=FaAAn0oNTpn420JP0Aukd/oIDlHnf5O/YeKW09s2xg3BGup37LYoDuP6XRha0iGp9Xf4zQapO+JzTR8bba8aVIZPNhcFy7gkB1pBi4M+HFoovZzBRh2tWgISAbH3DTmoQXipRROlZoN42FsYEu41/FaQJ+rPJqGc/5eubXb3Gdcfuo5jrM7bozTo4vRuyk0vUHyeWbXD8EMBfF6l+su4qwdhOoxMV39WUV1Wk9i16kEmZTuCeqreafkTJRi7xNZyhj8/0/rbOvESuhlmQxUdK+HcP+YV/vNcFKrhlDRGm8mbV1lE9yatnpc61tGHFT4/Q/rlY+ksdoYgFRA4g3oy0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=PtPE1flTXAIXZ0OPFxlUmCfo9xm7WZ2afzq4l3hc85k=; b=XEcDMedY/MTzQUQM0E7iPLioYCFP0uZQlt5zai2FoQ00dZK6votJ+6YWVoxznz1n4Q9lCKzButMfEzD/eWZG0n4Sv1fuy/4Qe8cE1nY+AJRDEUgzPN40bWJ88I26tOFzpR6GBmuJlRbT+pd82NYVR9DwcxezFiIdCLWluaBqiTc= Received: from SN1PR12CA0065.namprd12.prod.outlook.com (2603:10b6:802:20::36) by MN0PR12MB6368.namprd12.prod.outlook.com (2603:10b6:208:3d2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.13; Fri, 20 Dec 2024 04:35:40 +0000 Received: from SA2PEPF0000150B.namprd04.prod.outlook.com (2603:10b6:802:20:cafe::85) by SN1PR12CA0065.outlook.office365.com (2603:10b6:802:20::36) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8251.24 via Frontend Transport; Fri, 20 Dec 2024 04:35:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SA2PEPF0000150B.mail.protection.outlook.com (10.167.242.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8251.15 via Frontend Transport; Fri, 20 Dec 2024 04:35:39 +0000 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 19 Dec 2024 22:35:35 -0600 From: Alex Hung To: , CC: , , , Ville Syrjala , "Pekka Paalanen" , Simon Ser , Melissa Wen , =?utf-8?q?J?= =?utf-8?q?onas_=C3=85dahl?= , Sebastian Wick , "Shashank Sharma" , Alexander Goins , "Joshua Ashton" , =?utf-8?q?Michel_D=C3=A4nzer?= , Aleix Pol , Xaver Hugl , Victoria Brekenfeld , Sima , Uma Shankar , Naseer Ahmed , Christopher Braga , Abhinav Kumar , Arthur Grillo , Hector Martin , Liviu Dudau , Sasha McIntosh , "Chaitanya Kumar Borah" Subject: [V7 00/45] Color Pipeline API w/ VKMS Date: Thu, 19 Dec 2024 21:33:06 -0700 Message-ID: <20241220043410.416867-1-alex.hung@amd.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF0000150B:EE_|MN0PR12MB6368:EE_ X-MS-Office365-Filtering-Correlation-Id: 1434c857-2660-468f-b5b2-08dd20afc1ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Hl4maUJMcBBg6lMKKxt8LBdyI/6bd7C?= =?utf-8?q?7EGCK6VNxtFtal1ttGyilOQuKNY+41tjpnGWU0605xLX0yCmlvUjR024JWQAVns+P?= =?utf-8?q?ROJZDtVsDqZX4c5IZqICAe+Xo90df58AKDv6Js22JN4SmSVIv9xC4UUeTtGm2HRhj?= =?utf-8?q?agoVCPDZx97noecki0c3prs+LEQXk9Ijk5u/YB216lIPHLYkm2PVoYMIDtND3trJB?= =?utf-8?q?WQ4dDAsOcZ8oQ2GCTepJcgva5sIRb+vEw4zolA9yTsy1FxVN7Gg8+HacoZpRIhBWo?= =?utf-8?q?AiSzTDDJ3W2VjivYVWFi6bTnZVhTaVwcs3chZIRgg+9cnUTPEAoP/QPW0rqIQKLFi?= =?utf-8?q?PhUWozXNMTP29egl0/At533xpWcPPe6ZlBEdgTD38KUxn0sqInSl7b4mbQl6IfJOS?= =?utf-8?q?OoqdGyDOMQeihItwIt0mqFI6lQkH1c+DHnkQLTNL345nAMqOpymugJ0cSxT4CfVfU?= =?utf-8?q?gomLTzqxJjjsaeBmOQQ6eiY8DnN2ZL6RLF0FPi08N/rM8dpsKvC6Ccy1ucESdkzKl?= =?utf-8?q?rJlG3AMzPdfPkaS4kdXqID+N6goXVCgE6aG8fcphkT9l1yIwsqTkF8XH9RDHyglo/?= =?utf-8?q?MHPhRB4X0g4hHdWB6EW73CAjAxiKCijvZBL9zvzHBmP1rBT8RI/JB8iPy3bL9sN5o?= =?utf-8?q?p/Ps91JAGbAUNdStwe1sosQUhrTtXJEVJxO50mLwUUyz/jTG0FuAc1D2AQTaDa8MY?= =?utf-8?q?VqrMBCEFIGFcnTwEP9O85bAwgKsHQ7jvfw4PhtHmeSIOc/lWRR9lp0ui8UUfvlHo9?= =?utf-8?q?egQtnTDsxiLai6Fh8XiGmdngqQo/YG8mp3Ots81WovCTxm0u2urRQ587Izu7DY958?= =?utf-8?q?7xl6hVH4B5ee7QXWVMKUBmsrOD2F+hXYknsSRlGW5Q+Z/DRwQnB47cs1rKNaIlnm7?= =?utf-8?q?ZR/WgR8j/R+IvxgH9kg3ovoLkziM30rOFNZzulIDIINCADGQoe0NsgvisqFLQpAdv?= =?utf-8?q?uMtf1igheQ0OHjQXbcXQoHJaglxO+givvR4dLACrGGKtwyvAE3LnmYQltodfl8pfM?= =?utf-8?q?Pxu5272fJ8m8tMKwy5xTJ3PZQdEVxj9z9SAY/G+IjCfmae3OUDqM4XWcRy1RS9f1z?= =?utf-8?q?iANdVYXwuidDvR+XgwFCbE+OEaQfG0Q+V4swbP1gzeaKsQsPDqvdandoL2aB0275v?= =?utf-8?q?t9PIIYHKSb75QsczuPOvtqvT2bQYs73b02URUepbih6Q37NXPdmP7heKUXWSznetb?= =?utf-8?q?bwwEacggZgh1EBEDcXcoi+YHP2TwXVJ6FfoWFqJ5EC2f14K7nOo0vIN2JHgKZ1diI?= =?utf-8?q?qDfQD+mgYsRL923FVKrRklrPBAAoVg1Ve8AOmmO/229KfE/+h0+H4H+ATbYjx8iEq?= =?utf-8?q?HERNfiBM9PyuO+49lHXJ6EiiErVChG+ZA4J+b/w7iL8hMyHgRjgGkds=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(7416014)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2024 04:35:39.6515 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1434c857-2660-468f-b5b2-08dd20afc1ae X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF0000150B.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6368 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. v6 addresses a few comments from various reviewers. v7 simplifies 3D LUT and addresses more comments from various reviewers. 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. There have been no updates since v5 and rebase on latest main is straight- forward. A kernel branch can be found at [2]. There is a version of v5 with Uma and Chaitanya's patches for the Intel color pipeline based on top of v5 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/alex.hung/igt-gpu-tools/-/tree/amd-color-pipeline-v6 [2] https://gitlab.freedesktop.org/alex.hung/linux/-/tree/amd-color-pipeline-v7 [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 v7: - Simplify 3D LUT by removing lut_3d_modes and update doc accordingly (Simon Ser) - Add destroy / cleanup functions when color pipeline initialization fails (Louis Chauvet) - Fix checkpatch errors and warning (spaces, long lines, {}, and etc) - Change lut's size from drm_colorop_state->size to drm_colorop->lut_size and from size_property to lut_size_property - Update some kernel updates and commit messagesa (Louis Chauvet) - Squash "drm/colorop: Add atomic state print for drm_colorop" and "drm/colorop: Add NEXT to colorop state print" (Simon Ser) - Add missing MODULE_DESCRIPTION (Jeff Johnson) v6: - Eliminate need to include test as .c file (Louis Chauvet) - some doc updates - cleanup if colorop alloc or init fails in VKMS and amdgpu (Louis Chauvet) - couple other small improvements in VKMS, such as rounding (Louis Chauvet) - take ref for DATA blob in duplicate_state func & fix refcount issues (Xaver Hugl) 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 (15): 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 drm/colorop: Add kernel doc for data blob drm/colorop: Add destroy functions for color pipeline Harry Wentland (30): 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: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE drm/vkms: Add enumerated 1D curve colorop drm/vkms: Add kunit tests for linear and sRGB LUTs 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 | 378 +++++++++ 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 | 566 ++++++++++++- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 206 +++++ .../amd/display/amdgpu_dm/amdgpu_dm_colorop.h | 36 + .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 32 + drivers/gpu/drm/drm_atomic.c | 170 +++- drivers/gpu/drm/drm_atomic_helper.c | 12 + drivers/gpu/drm/drm_atomic_state_helper.c | 5 + drivers/gpu/drm/drm_atomic_uapi.c | 165 ++++ drivers/gpu/drm/drm_colorop.c | 610 +++++++++++++ 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 | 71 ++ drivers/gpu/drm/vkms/Kconfig | 15 + drivers/gpu/drm/vkms/Makefile | 5 +- drivers/gpu/drm/vkms/tests/.kunitconfig | 4 + drivers/gpu/drm/vkms/tests/Makefile | 3 + drivers/gpu/drm/vkms/tests/vkms_color_test.c | 459 ++++++++++ drivers/gpu/drm/vkms/vkms_colorop.c | 113 +++ drivers/gpu/drm/vkms/vkms_composer.c | 135 ++- drivers/gpu/drm/vkms/vkms_composer.h | 27 + drivers/gpu/drm/vkms/vkms_drv.h | 7 + drivers/gpu/drm/vkms/vkms_luts.c | 801 ++++++++++++++++++ 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 | 442 ++++++++++ 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 | 92 ++ 42 files changed, 4634 insertions(+), 49 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/Makefile create mode 100644 drivers/gpu/drm/vkms/tests/vkms_color_test.c create mode 100644 drivers/gpu/drm/vkms/vkms_colorop.c create mode 100644 drivers/gpu/drm/vkms/vkms_composer.h 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