From nobody Fri Oct 2 10:06:53 2026 Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4CC02FE0F for ; Sun, 2 Aug 2026 14:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785681334; cv=none; b=Q98Th1TLwSbwrOXPdfccu3ivf7PjbBTY9me13NXSpeVD4yycpZiK6i6Yptnr2P9UpYobfpiQPm+w3cQQcewa/MPopEQkWAqpd5aYSwJeNGaityrCKMJAIM3KOZ9XGhSVIjOMxYrPtGhr5S6isDco4vp8Vv7J6t02AmrJ2hVuFTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785681334; c=relaxed/simple; bh=oqH75FqE8IN3bZrGBHwKUh3SutduxEVwzQjYhiN471I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cd/8CliW04qrh3E+3t02zN1SBYEMy5ce8Yam4u//d0Uj/KvGbcChvDdTT3rHcVyQBgxGOPjfMuBDkPoPaYIQtroEk0xWA42Ru514n2oJ3LKLRgg/xJ7lEt5p3c8qNCe3lsX/Nldc7rOzNrV3yseq7cU4KF9YrDf4tUQcN27y/x4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=g3LllBNO; arc=none smtp.client-ip=209.85.210.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g3LllBNO" Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-7e9d7464b71so1180498a34.0 for ; Sun, 02 Aug 2026 07:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785681331; x=1786286131; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Io4qfNiJxrvTXDG74iRNZw9/a8wNffmXNJvx5MlsNa4=; b=g3LllBNOX24yhW8sxCi0nDkuukyoW8JfKQaxSrEXOdhmOzpvWThRr5/SFj+ykWMbO5 FheRuEpKys2CF40YjdeWNbUzR2gvDbzKDX0ed8SaFuJR92O37JzTv9em8T24t1EnBTZ3 zKE7YVs9m1ZcYaVFZ5ueBxQIQm90SNELZ3lae+05CZYz2fC3HB5mQic3hP7ktn9IH2uw LPPJCDLoQhDExIQrSU0fzHpdrIDJ3L4EuWDXiRL7L9fzDWoZLCMO3gub6u7Ureq4Vswy LJvCqgxfMhSpFADRFdhRsqqMk5MbQLtZa1aWZEBhOFCX8f0lo+ns2IV3eYvc6Jod43gU ZhFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785681331; x=1786286131; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Io4qfNiJxrvTXDG74iRNZw9/a8wNffmXNJvx5MlsNa4=; b=XUdndiRKg1Irto54JgiMEc5+IG6/CJ9Jnz8Boc4BwM0nUYyDcKYyBr/C6tT/9aaGxI 2x7FqAWFRrzJw3Ho8rgI/28+GjPGKxD2gT7WItXqcOoGNdkj2PX46xrNoqMS67s82po0 Jun6iRnwLZhMzVbSan8HiowakHg0YaFcsq9XIn5lMEElKBC+MUYj1fvkVdctpFHMYIwK 1Oz5Pz5WBtGwqRN6Lc5+2YtVfa4Xut1xJR06DtycY7Amwiw3jjePwoHx0tvbWQWVDwMb ghD7JiDLkoCRarZn24fWRVwXMbVI47NgaUd1BZnDUzm0PxdH4mF0mkYXGhc3wb8tUejF is/Q== X-Forwarded-Encrypted: i=1; AHgh+RqCUM4/OUT9W9JQUFzS+B/kDEwvWxWtXdy/C39+wJGPHnka+nNLiay/IkttCTYIdaw2KmnFAhPNIOEwbyw=@vger.kernel.org X-Gm-Message-State: AOJu0YzxJ4mUBDbB3ZSFpd2DNty/JyLsOc2XtX5bb8a3LtBxw19LsomU 0kCQgKFGlEmOVifrKf5dmviPekw8NfD1BHmflOeY2nHipV+A4qmNuGuC X-Gm-Gg: AR+sD11bEKc/cPwannrmvnhoKDkii4WPsk5AsLjS9CITvdiisrMU34G+g29A0GDNLcw i/upWrjYp46Dc7/KZwSFLVc0nLmRLrcuP1Hv8S88OYzYLiTk7bQvF85hQDkerQiMShw1x0UuuHN eN6yf7/3XPCj3EKZNqlT2xG5DHGe6ThCxql5K6366jy1rjvxLl/DDmuXHrGyrFWmlJk7ea+jK2j f4etP+D9B27ah7cNhzJVlRpfdGG7G700ghkEPXO8pbdIjl79r2pcMMIuAAT+2IBIfKepuXBg9on HxomJx9nAwrMP+TNRwxzeHYKdtM0V4hzsndMSLpBb3sch8GF84ojFP7WO7/HVBaDERwZbQZwgfg RcwYuDGFOZQxxK8NwlNh3vPIvOi0OLmDJ/4XXLxq+UES0dxXnVPBCMukOUtmWUr2+H5aAzqGOWj NO8Gf6eFlyUUE1ffmvACUQ/o/UpZaQDqlKGUxQoqenJCLk1wN1LbW0BcKmjUt5iip/xKhUfc1li lWwZFr3iVF0jvE++kFg+bieHSPyrrLESU/sHopHzjkp X-Received: by 2002:a05:6808:17aa:b0:487:530f:5754 with SMTP id 5614622812f47-4af5e2f59b4mr12709212b6e.20.1785681331520; Sun, 02 Aug 2026 07:35:31 -0700 (PDT) Received: from natebox2.jabitha.com (46-110-104-162.wmnscoaa.metronetinc.net. [46.110.104.162]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4af58e9551dsm4778877b6e.11.2026.08.02.07.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2026 07:35:31 -0700 (PDT) From: Nathan Lucas To: amd-gfx@lists.freedesktop.org Cc: harry.wentland@amd.com, sunpeng.li@amd.com, siqueira@igalia.com, alexander.deucher@amd.com, joshua@froggi.es, mwen@igalia.com, leorize+oss@disroot.org, alex.hung@amd.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] drm/amd/display: fix BT.2020 YCbCr limited output CSC matrix Date: Sun, 2 Aug 2026 08:35:23 -0600 Message-ID: <2fcc52cc1a86d6e9e393e72f6038ae42ccf1930d.1785616749.git.nlucasgit@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" COLOR_SPACE_YCBCR2020_TYPE, which is selected for COLOR_SPACE_2020_YCBCR_LIMITED color_space, has coefficients that are incorrect for limited-range output. Its luma and chroma scaling is full-range so output is too bright and colors are incorrect. COLOR_SPACE_YCBCR2020_TYPE is closer to a full-range conversion matrix with incorrect luma offset, so correct the luma offset for full-range and rename it to COLOR_SPACE_YCBCR2020_FULL_TYPE. Add COLOR_SPACE_YCBCR2020_LIMITED_TYPE with correct scaling and range for limited-range output. Fix related functions so COLOR_SPACE_YCBCR2020_LIMITED_TYPE and COLOR_SPACE_YCBCR2020_FULL_TYPE are correctly selected based on dc_color_space. Derivation of both matrices follows ITU-T H.273: Table 4, MatrixCoefficients 9, BT.2020-NCL weights: KR =3D 0.2627, KB =3D 0.0593, KG =3D 1 - KR - KB =3D 0.6780. Equations 45-47 in matrix form: [ KR KG KB 0 ] M2020_NCL =3D [ -KR/(2(1-KB)) -KG/(2(1-KB)) 1/2 0 ] [ 1/2 -KG/(2(1-KR)) -KB/(2(1-KR)) 0 ] [ 0 0 0 1 ] Limited and Full transforms based on equations 30-32 and 36-38 with bit depth 10, normalized by 1023: [ 876/1023 0 0 64/1023 ] MLimited =3D [ 0 896/1023 0 512/1023 ] [ 0 0 896/1023 512/1023 ] [ 0 0 0 1 ] [ 1023/1023 0 0 0 ] MFull =3D [ 0 1023/1023 0 512/1023 ] [ 0 0 1023/1023 512/1023 ] [ 0 0 0 1 ] M2020_NCL_Limited =3D MLimited x M2020_NCL M2020_NCL_Full =3D MFull x M2020_NCL The upper three rows of M2020_NCL_* are stored in CR, Y, CB order. Each M2020_NCL_* value is stored as Round(value * 8192) in its 16-bit two's-complement representation. Fixes: 973a9c810c78 ("drm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matri= x") Assisted-by: OpenAI-Codex:GPT-5.6-Sol Signed-off-by: Nathan Lucas --- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c b/driver= s/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c index 11411fa94665..e686815f9a0e 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c @@ -59,7 +59,8 @@ enum dc_color_space_type { COLOR_SPACE_RGB_LIMITED_TYPE, COLOR_SPACE_YCBCR601_TYPE, COLOR_SPACE_YCBCR709_TYPE, - COLOR_SPACE_YCBCR2020_TYPE, + COLOR_SPACE_YCBCR2020_LIMITED_TYPE, + COLOR_SPACE_YCBCR2020_FULL_TYPE, COLOR_SPACE_YCBCR601_LIMITED_TYPE, COLOR_SPACE_YCBCR709_LIMITED_TYPE, COLOR_SPACE_YCBCR709_BLACK_TYPE, @@ -111,9 +112,15 @@ static const struct out_csc_color_matrix_type output_c= sc_matrix[] =3D { { 0xE00, 0xF349, 0xFEB7, 0x1000, 0x6CE, 0x16E3, 0x24F, 0x200, 0xFCCB, 0xF535, 0xE00, 0x1000} }, - { COLOR_SPACE_YCBCR2020_TYPE, + /* Corrected. Not included in the TODO above. */ + { COLOR_SPACE_YCBCR2020_LIMITED_TYPE, + { 0x0E04, 0xF31D, 0xFEDF, 0x1004, + 0x0733, 0x1294, 0x01A0, 0x0201, + 0xFC16, 0xF5E6, 0x0E04, 0x1004} }, + /* Corrected. Not included in the TODO above. */ + { COLOR_SPACE_YCBCR2020_FULL_TYPE, { 0x1000, 0xF149, 0xFEB7, 0x1004, - 0x0868, 0x15B2, 0x01E6, 0x201, + 0x0868, 0x15B2, 0x01E6, 0, 0xFB88, 0xF478, 0x1000, 0x1004} }, { COLOR_SPACE_YCBCR709_BLACK_TYPE, { 0x0000, 0x0000, 0x0000, 0x1000, @@ -180,14 +187,14 @@ static bool is_ycbcr709_type( return ret; } =20 -static bool is_ycbcr2020_type( - enum dc_color_space color_space) +static bool is_ycbcr2020_limited_type(enum dc_color_space color_space) { - bool ret =3D false; + return color_space =3D=3D COLOR_SPACE_2020_YCBCR_LIMITED; +} =20 - if (color_space =3D=3D COLOR_SPACE_2020_YCBCR_LIMITED || color_space =3D= =3D COLOR_SPACE_2020_YCBCR_FULL) - ret =3D true; - return ret; +static bool is_ycbcr2020_full_type(enum dc_color_space color_space) +{ + return color_space =3D=3D COLOR_SPACE_2020_YCBCR_FULL; } =20 static bool is_ycbcr709_limited_type( @@ -216,8 +223,10 @@ static enum dc_color_space_type get_color_space_type(e= num dc_color_space color_s type =3D COLOR_SPACE_YCBCR601_LIMITED_TYPE; else if (is_ycbcr709_limited_type(color_space)) type =3D COLOR_SPACE_YCBCR709_LIMITED_TYPE; - else if (is_ycbcr2020_type(color_space)) - type =3D COLOR_SPACE_YCBCR2020_TYPE; + else if (is_ycbcr2020_limited_type(color_space)) + type =3D COLOR_SPACE_YCBCR2020_LIMITED_TYPE; + else if (is_ycbcr2020_full_type(color_space)) + type =3D COLOR_SPACE_YCBCR2020_FULL_TYPE; else if (color_space =3D=3D COLOR_SPACE_YCBCR709) type =3D COLOR_SPACE_YCBCR709_BLACK_TYPE; else if (color_space =3D=3D COLOR_SPACE_YCBCR709_BLACK) --=20 2.55.0 From nobody Fri Oct 2 10:06:53 2026 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC4D03B774F for ; Sun, 2 Aug 2026 14:35:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785681335; cv=none; b=BkdMRyiGvL9Q4Gwe6fUDoC5d00IPeEkXOvIpn/7HCsL1pFCmQc4JzSeQtSyqYeA69ax9eFIP8UT2yNrNB8DjF0pZ9wnY/fElNz5y4jQIx30D2YP/z7VFhBsTtoI6GWkQz/+mLejlYTNaup4xjOxTeP0Y8htx5MZPiyCRRCugb14= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785681335; c=relaxed/simple; bh=USS/Wefnl1QrbL3oWrqBFEktQSOOvcwqQEt6tfkpOfg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ct2rgB2Psa6TUvRI4sFGCySksGjV9JRx2PJPxOO+HIInGYoiuEJPNla/6U1Hb+6JxvNS/V47Y8KjgrxqnAHnb1OYf3kzD7WyXzGQoDeDlS/e6wWOVgYM0WuNzIhLOb2gJmDeFdbhvPd8l/V0DxUj8+zwQUirFoPTqRYzUMBZZQo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VHK8JtQW; arc=none smtp.client-ip=209.85.167.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VHK8JtQW" Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-4864ebb6268so1168685b6e.3 for ; Sun, 02 Aug 2026 07:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785681332; x=1786286132; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=R9/ZBBWwxbo/L0scHa1+0PKeDSXAJU8I4FcEXNAE4v4=; b=VHK8JtQWUiJPMy8b3bJeRkutUq3akIk1Y6G1CezvtnZNeAglfdAeC+IIn5Zsmoy1dB 5iH6P/nokQ+rEW7q7EmMmVZljtHDBUBqxuf0/G1GkcdEXtfbAxrpEwLw5AwOLYArWZHc lWogYI0jd4NhUqvdmq3ZmBoLagZuv83HYGeAwo/ZHEiuLPcZOieoQL90ssHzY930u1Vr WqO8M0N3fbieTJW5GVKvUEeJWK0Ii8K4pW/xPYOVMcumwfenIZjSgOJoBf14quG9QfRc BjVxFPWu7zocvsXoKYvDwEJpnMoh4MR9KITkycJtradMCasF2cPvTILqYW0UxJPvGZFU Ycjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785681332; x=1786286132; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=R9/ZBBWwxbo/L0scHa1+0PKeDSXAJU8I4FcEXNAE4v4=; b=QhVZ+wYVB1uogHknTvHMDoMNt6L5iRlL7PdmBFsZincLh9YCF47pL48o0N+EDNwIgf wEDjyo4xSmkYL1TwbY/eC69a4bQg6V7VGd9qaclkv+Zb/kHaa1gV2z4IePEMajo4ZZ9z tPZdDt2pW/1oAs6qwHNcPOlnXQkx88Co1t9+komQoV4iKKFOTkc5Q75GcWPV7VNsFCuw WWvviFDe4wr790tCYWeb9hoP8K1x4gbfj9bjM2I/ognf1Yo1Ez4P9g9cq2LNBDVAVs18 dm/WCVz5CeDM0T+VEr8Qt1tFr6FuQtUbzoboxZdsvGl2cLIQ8Kn1EVjPKeRDHkVrh66k t/Uw== X-Forwarded-Encrypted: i=1; AHgh+RqOAbxGHSTlR4A1cwaCwce6SC/yBXHLtSD8zhlhxBbXNz63LzpTMn9wjzo6vrHXn0m0H4hDyuSVhrLsLUU=@vger.kernel.org X-Gm-Message-State: AOJu0YyQIKwJpjuuDjCg4ZOCuycMiDlWUQZB/wvwflgGPXxEzDyS6pHw wmfy3+y4Us6lmUu8maSclgtrtR106ZioZ1AGK+1BFWH7z12EteF10+sl X-Gm-Gg: AR+sD11M9+m/Cn4yZwxS0Ti4ZOzyrBf+CpTZhqF/OCQXAWKBOq3WbyvTY0zfa8P2Q2K Z7G7tXif/Qx4EF2/PShLO4SoYadV6HviVkLkwxUWmG8HBoSEpWs9w/LEfbkwPHUVFR2ZE0UzfzA 1TYMpFs+99idbnoxtT8xy2CxV+qlFmc0WZi7qhBpW0sgS9vaKxcVbXFLXRQfEyLuediP8spqDdE ldYAntpsK+LdHBgW/SqWDkTc5o1bvhozjP6tVYYC1Q83mTdVJEK4I5vuPi8ib4F60/xm01KM8pF OxWxBMDNuv7JdQUaFhyHOS+T/Wb40rvMeYNum2dLH4VAxRVJQo/YfSIt4pdAlMUPHOs2DH+FRzU V6q/e9I5pron6M6/gw9XG6gEsvkbT5weMuwDkuiG7bbEimX5ov/EtVNbVaq60/MSproR0ly/yAn hxPcBjISBrou8cu7noKkrzEOm37qA4WZHDY5toUTpaEsEKAj6MdeH77928lBZqIKQzeW59lyUo5 fd848FMjiwUUfdn3e+0DnzQ+TJHjGzLDfavwBqpYEI8 X-Received: by 2002:a05:6808:bcd:b0:497:8f1:df07 with SMTP id 5614622812f47-4af5e0583c4mr12361035b6e.7.1785681332450; Sun, 02 Aug 2026 07:35:32 -0700 (PDT) Received: from natebox2.jabitha.com (46-110-104-162.wmnscoaa.metronetinc.net. [46.110.104.162]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4af58e9551dsm4778877b6e.11.2026.08.02.07.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2026 07:35:32 -0700 (PDT) From: Nathan Lucas To: amd-gfx@lists.freedesktop.org Cc: harry.wentland@amd.com, sunpeng.li@amd.com, siqueira@igalia.com, alexander.deucher@amd.com, joshua@froggi.es, mwen@igalia.com, leorize+oss@disroot.org, alex.hung@amd.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm/amd/display: fix BT.2020 YCbCr output CSC matrices for DCE Date: Sun, 2 Aug 2026 08:35:24 -0600 Message-ID: <15b28cafab1b55f3e4cad9bb542847d22e776bda.1785616749.git.nlucasgit@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The commit cited by the Fixes tag added separate limited and full-range BT.2020 YCbCr entries to the DCE output CSC tables, but populated both entries with the same matrix copied from the common DC table. That matrix combined full-range scaling with limited-range luma offset and was incorrect for both limited and full-range output. Replace the coefficients in both entries in the DCE paths with those from the new COLOR_SPACE_YCBCR2020_LIMITED_TYPE and COLOR_SPACE_YCBCR2020_FULL_TYPE entries in the preceding commit ("drm/amd/display: fix BT.2020 YCbCr limited output CSC matrix"). Fixes: 51e6668ab4ba ("drm/amd/display: add missing CSC entries for BT.2020 = for DCE IPs") Assisted-by: OpenAI-Codex:GPT-5.6-Sol Signed-off-by: Nathan Lucas Tested-by: Igor Paunovic --- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c b/drivers/g= pu/drm/amd/display/dc/dce/dce_transform.c index 864491bfd7f7..83f819890020 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c @@ -115,10 +115,11 @@ static const struct out_csc_color_matrix global_color= _matrix[] =3D { { 0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} }, { COLOR_SPACE_2020_RGB_LIMITEDRANGE, { 0x1B67, 0, 0, 0x201, 0, 0x1B67, 0, 0x201, 0, 0, 0x1B67, 0x201} }, -{ COLOR_SPACE_2020_YCBCR_LIMITED, { 0x1000, 0xF149, 0xFEB7, 0x1004, 0x0868, - 0x15B2, 0x01E6, 0x201, 0xFB88, 0xF478, 0x1000, 0x1004} }, +/* COLOR_SPACE_2020_YCBCR_* values corrected. Not included in the TODO abo= ve. */ +{ COLOR_SPACE_2020_YCBCR_LIMITED, { 0x0E04, 0xF31D, 0xFEDF, 0x1004, 0x0733, + 0x1294, 0x01A0, 0x201, 0xFC16, 0xF5E6, 0x0E04, 0x1004} }, { COLOR_SPACE_2020_YCBCR_FULL, { 0x1000, 0xF149, 0xFEB7, 0x1004, 0x0868, 0= x15B2, - 0x01E6, 0x201, 0xFB88, 0xF478, 0x1000, 0x1004} } + 0x01E6, 0, 0xFB88, 0xF478, 0x1000, 0x1004} } }; =20 static bool setup_scaling_configuration( diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c b/dri= vers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c index 1ed018aaa4bb..f5f8cd2d47a5 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c @@ -93,10 +93,11 @@ static const struct out_csc_color_matrix global_color_m= atrix[] =3D { { 0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} }, { COLOR_SPACE_2020_RGB_LIMITEDRANGE, { 0x1B67, 0, 0, 0x201, 0, 0x1B67, 0, 0x201, 0, 0, 0x1B67, 0x201} }, -{ COLOR_SPACE_2020_YCBCR_LIMITED, { 0x1000, 0xF149, 0xFEB7, 0x1004, 0x0868, - 0x15B2, 0x01E6, 0x201, 0xFB88, 0xF478, 0x1000, 0x1004} }, +/* COLOR_SPACE_2020_YCBCR_* values corrected. Not included in the TODO abo= ve. */ +{ COLOR_SPACE_2020_YCBCR_LIMITED, { 0x0E04, 0xF31D, 0xFEDF, 0x1004, 0x0733, + 0x1294, 0x01A0, 0x201, 0xFC16, 0xF5E6, 0x0E04, 0x1004} }, { COLOR_SPACE_2020_YCBCR_FULL, { 0x1000, 0xF149, 0xFEB7, 0x1004, 0x0868, 0= x15B2, - 0x01E6, 0x201, 0xFB88, 0xF478, 0x1000, 0x1004} } + 0x01E6, 0, 0xFB88, 0xF478, 0x1000, 0x1004} } }; =20 enum csc_color_mode { --=20 2.55.0