From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 21D32411FBB for ; Mon, 3 Aug 2026 15:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785770759; cv=none; b=mSu3H/sMPIFER0Yj9rV38FpF8zue/Y9IgUCMJ1pebIZTvmimv47rTQ+BKW/gV7IiFI9XUXmyeU4oXlQmfM6hF29XoH5aTUXpCEkoYJ9VQY1GV0bAtojyshdYWxZzXEJeZvJDqALSkq5OcOqUmsG3oWUZzawqReelbicaimneLqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785770759; c=relaxed/simple; bh=9LoyqYzYJ0Nb5xInecrCvJNeUVfm0JCLfhe5/5aWpTE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=epmssglmXAtza8W8H1Zt8DKf9XqKJ7xebXbgNi/qMd6LkZPuX9a+fp16qMxuHLGx5ayZ7oLKaluoB8gq1PTASjewUiNuK/ddyV+nlzjkQ55nUkaSTlD+tIWx0xzD1rOW+4Cysgyre3N4nOvM8e5/iu4dixNjeonb8ShbjhYtEE4= 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=GA25qAuc; arc=none smtp.client-ip=209.85.221.53 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="GA25qAuc" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-47f611b3af9so487803f8f.3 for ; Mon, 03 Aug 2026 08:25:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785770756; x=1786375556; 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=9LoyqYzYJ0Nb5xInecrCvJNeUVfm0JCLfhe5/5aWpTE=; b=GA25qAucsIGtTmJsExulOQbjmbejqX00pBHpzY8PJpTwnF3V1EH6Rh6PF8Qkz3dvJr N0legbOgLrgzgd/38waMjxoKZY0Cv/JtrF855U2quUDuAriqDxxDbmqsCFK+U8kZDY+y Gp8162srhuP1v/BvL3pr3BpHnzouHfUleSx12hmTb/Qlu3ryKQ43sWVNBkjF9DQ2gRy6 HNKF8y8NfLkdhh7ypA+0MO19b1wjWav5m9CmgevzsuSUsa2vA1m81gNTwS8Im8roMUnm OhDMKI0/OK5CQ+nYO1nquC4MpcQh5RPaPtZu2BkCW+qKLQnTsKNfa7t0OnPinrLyAzrL jfTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785770756; x=1786375556; 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=9LoyqYzYJ0Nb5xInecrCvJNeUVfm0JCLfhe5/5aWpTE=; b=gjY3Lst4ajw/At77/7oNKG+D2DqZxA16/BVbkmPVqYK3cythcSlJ/keH011JRWfPkS 6Vl3IzUCJAjKV3TotA9qN9luQ9Xw4SdL1GCVrXKaZbWKYIQVLFCRuL39ZFFXbrcsMCtj pP6HW91nldpTxU9Wtn0gXqlMFQgFeTg3osLck/9BGS2qsJ6HHS8FpNq1bhjEsu1aXv/y xVbCdDJKDvHX0N4NZ4x/XbCcVhqCCOWjSrgiDbv4BN/8MC91a8v1Pj1Vh2QC5SJ/lIrA TF9gYkii8qvjGryX0ToTp1TObdSUjyNYItokyyWMQ9r4X5gI/+7GSAXALcT7rBiimRjC PRvg== X-Forwarded-Encrypted: i=1; AHgh+Rp8RHmjQQ83+wmnDDiB06LKMeAIA43EBZqLBPj6t9UNtkBdkmieToMoV4kGeYNmDthPUOpOuyeh+7Ktrms=@vger.kernel.org X-Gm-Message-State: AOJu0YyDvjfjy8HaAWJbFgftrd1bf82KCgwe4kBJYtghptC4FhZhY2PE sqplyJOF0vuJgrrik26aW/Pthlbfk2C5EaskbSDms/3A0nqXLPkoqPkh X-Gm-Gg: AR+sD10JLPCykizN/IzgIuXih+Gbx0FGL9hNznccZ45bXGS1XD4BOtKuClRDlIlD1AR 02pJN4Zf28A3+zQgyP4cR1L/tDRRx0zwwvuj9IsFL4zPeVJ0orSaMgEbMphM7+jFfczTTodeFhq itjr5vXDIkWRyeHVQFTG2EachQbfQD2m34rb+6fPq95Ax30jWLacSCbutMVbasjxiyvwGGRB4D4 zuv/YuAm7Ma+Fae/IGCIr2zmiwFxy5WkRv0upOEjKP9itR8cOPk4NHz/ioQZ3KvWzZYgf36E9Ao LieuUOWn5TFuOhzIzhFQGOuiN8DH+RSp1QctuYox/1nl1l4DnPLokDHE4Er0EtfJSZNXhPVc8Rs IFTWM5LeBbCRYZWKbNWcG4HRCBBq4/WUJyUaDJvwEISu/ZJnF3MVzXldxwxYSuE+QJ8wWKCxXbT nwsqGCuDlDDN8eh1KOctXh3LYxdRR6A3W6u0bGp/PwlJsM7ON0Bt+EHkcoNzHTB7dn+UiMBiRYS EywjeL7O6Y0bXr0peW5hJ+G7LqaY4U/qLTocA1DMD2mTl5+gndlH4fhl8Pz+ArHhYUEmseHfM0G WtQ= X-Received: by 2002:adf:e197:0:b0:47f:6c7e:b32d with SMTP id ffacd0b85a97d-47fd72a0d89mr15322739f8f.1.1785770756108; Mon, 03 Aug 2026 08:25:56 -0700 (PDT) Received: from OrangePi5-Plus.BB-HOME (20014C4E1B85F300A5CC0DBDABDC4661.dsl.pool.telekom.hu. [2001:4c4e:1b85:f300:a5cc:dbd:abdc:4661]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd41e2abbsm34461507f8f.9.2026.08.03.08.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 08:25:55 -0700 (PDT) From: Igor Paunovic To: nlucasgit@gmail.com Cc: Igor Paunovic , amd-gfx@lists.freedesktop.org, 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: Re: [PATCH 2/2] drm/amd/display: fix BT.2020 YCbCr output CSC matrices for DCE Date: Mon, 3 Aug 2026 17:25:33 +0200 Message-ID: <20260803152533.9008-1-royalnet026@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <15b28cafab1b55f3e4cad9bb542847d22e776bda.1785616749.git.nlucasgit@gmail.com> References: <15b28cafab1b55f3e4cad9bb542847d22e776bda.1785616749.git.nlucasgit@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Nathan, I hit exactly this on a DCE 11.2 part, so here is a data point for the path you could not test. Setup: XFX RX 580 8GB (Polaris10, DCE 11.2) as an external GPU on an Orange Pi 5 Plus (RK3588, arm64) over PCIe Gen3 x4, driving a Sony 65" HDR10 TV at 3840x2160@60 with HDR enabled under KWin/Wayland. The sink lists 3840x2160@60 only in its YCbCr 4:2:0 video data block and caps TMDS at 300 MHz, so the stream comes out as PIXEL_ENCODING_YCBCR420 (confirmed in hardware: FMT_CONTROL = 0x002a0000, FMT_PIXEL_ENCODING = 2), and with the compositor setting Colorspace=BT2020_RGB the output color space ends up COLOR_SPACE_2020_YCBCR_LIMITED. My tree predates 51e6668ab4ba, so global_color_matrix[] had no BT.2020 row at all. That is worth recording as its own failure mode: with no matching entry, dce110_opp_set_csc_default() programs no matrix and configure_graphics_mode() leaves OUTPUT_CSC_GRPH_MODE at 0, so the output CSC stays bypassed and plain RGB is fed to the 4:2:0 formatter while the AVI infoframe declares YCbCr 4:2:0 with BT.2020 colorimetry. The sink then applies a BT.2020 YCbCr to RGB matrix to RGB data: luma lands on green, Cb/Cr sit near mid scale, and the picture is washed out with a heavy green cast. SDR on the same link was fine, since it stays on the BT.709 entry. Applying 51e6668ab4ba plus this series on top of 7.0 fixes it: colors are correct on that TV in HDR, across a reboot, with no amdgpu errors in the log. As a cross-check, the same desktop on a second monitor driven by a completely different pipeline (the SoC's own display controller) now matches it. I also booted 51e6668ab4ba without this series on the same setup and could not tell the two apart by eye. That is not a counter-argument to the fix, just a note on sensitivity: the compositor maps SDR content to around 350 nits, so nothing gets near the top of the PQ range where the full-range luma scaling would clip, and the residual difference stays below what this TV's processing reveals. Tested-by: Igor Paunovic Thanks, Igor