From nobody Tue Feb 10 01:50:15 2026 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16D05346FA7 for ; Tue, 23 Dec 2025 18:03:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766513006; cv=pass; b=GozSkzNtu/olPtgrz/I3rAGfUjM24R7hgM0zlCIBEKP8nXkXyak+hE/y6G5O2f/w3/fsVS93XLP7319ZviXmMH5yZb5h6zy8A1s9M3Px0t9i1tMrWKbCJigWGMI2GM2zCOsgsseUDyEw+XrhArRQpp8vU/QMXGWLz6UE7Y8oGQ0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766513006; c=relaxed/simple; bh=KrJ8dCT5aT+iH82VrlKJ0QwH7sL0fz8sb4CkiuHRW34=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y5ylf11h+SIriPCjqPIhbiTrbDT5/QAfx8IPbRHMrTYhmtQjJ39k8Xa2oRPNkh0PfTpy5ydI7O6zPKYA0Ohpzz8JRtbmSIIiC74ocB8C99bbl/3++PoUmfpuSx62VVaMr54LVYYaD8ooVJa78Hle7RUq6uIh04tnurivQZwlsxg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=ariel.dalessandro@collabora.com header.b=JRy2l6R5; arc=pass smtp.client-ip=136.143.188.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=ariel.dalessandro@collabora.com header.b="JRy2l6R5" ARC-Seal: i=1; a=rsa-sha256; t=1766512981; cv=none; d=zohomail.com; s=zohoarc; b=IspqoohT9QA0xwJTnqKfkEAyn9tUyson0B8roQJ8s+qjCgMnH0djbKuRtOKCzTpCFSSroE+eOd3Tpm84Fi9DUEn4OPtOiTDIFnIcdeljzuC6A5Xk6RqL71ByJrHxqDkqe9jtJx3etQKCdrYNaNunXmNP90Nc2qR8JnnXjpCd3W8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1766512981; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=8Pk1bOdW4DywWabgxSmZe43EDBa8FOVNt1pDyMGplsA=; b=BDY1RP7URYMSQe/9S4a3hW7wNY44DNikIXZzECUJadZTMUTCXaSRY59iCVvwiCalmzTu8/WrftKY93OuVeX+K2nEp+Sh6mdNG8nY3XlQvt1epVnIvNlWLVQMTeHsRUz37rOEh/QKDmyFK7h4LuJaXMoGK+4iAoUANh0AK1gcde0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=ariel.dalessandro@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1766512980; s=zohomail; d=collabora.com; i=ariel.dalessandro@collabora.com; h=From:From:Date:Date:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Message-Id:References:In-Reply-To:To:To:Cc:Cc:Reply-To; bh=8Pk1bOdW4DywWabgxSmZe43EDBa8FOVNt1pDyMGplsA=; b=JRy2l6R5GGvx9HTc2uRjX2cFIaGCFAVbQo7R3n79V2pZjad7AVE8RwqpNKHUPGyi hrJJwmJzIEhKQafLjMrLG8q1pl2SFAsRvoG9rTxYgEvJUX0Phcyc5AHHyPoR3xm6FOm 2SfZ4BOfGjXVSQC4JBLGrcD4hNA7pzmtAsw78cZ8= Received: by mx.zohomail.com with SMTPS id 1766512978817141.00038080090178; Tue, 23 Dec 2025 10:02:58 -0800 (PST) From: Ariel D'Alessandro Date: Tue, 23 Dec 2025 15:01:31 -0300 Subject: [PATCH v3 11/21] drm/crtc: Track crtc color pipeline client cap in drm_crtc_state Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251223-mtk-post-blend-color-pipeline-v3-11-7d969f9a37a0@collabora.com> References: <20251223-mtk-post-blend-color-pipeline-v3-0-7d969f9a37a0@collabora.com> In-Reply-To: <20251223-mtk-post-blend-color-pipeline-v3-0-7d969f9a37a0@collabora.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , AngeloGioacchino Del Regno , Louis Chauvet , Haneen Mohammed , Melissa Wen Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= , Ariel D'Alessandro , Harry Wentland X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1766512902; l=1933; i=ariel.dalessandro@collabora.com; s=20251223; h=from:subject:message-id; bh=3y10C5Mwu/sdD+b5xMD3KEubR/Wzf/qSO2/9lBdGz3o=; b=piU06VW6Rl48awo5uv5SX1zI/5YEPFJ0cxQgVVOvlt363GPtteLDdhpnFWzhcfHHyT2tMBw/R Fdx9od8x/GCCd4jiMR2k26flrfj50B4XPqKt4UT8SfifTpfvA+OzH3d X-Developer-Key: i=ariel.dalessandro@collabora.com; a=ed25519; pk=QZRL9EsSBV3/FhDHi9L/7ZTz2dwa7iyqgl+y1UYaQXQ= X-ZohoMailClient: External From: "N=C3=ADcolas F. R. A. Prado" Some drivers, like VKMS, only have access to the drm_crtc_state but not the drm_atomic_state during composition of the output framebuffer. Store the state of the CRTC (post-blend) color pipeline client cap in the drm_crtc_state so those drivers can decide whether to look at the color pipeline or the legacy properties for the color management settings to apply. Signed-off-by: N=C3=ADcolas F. R. A. Prado Co-developed-by: Ariel D'Alessandro Signed-off-by: Ariel D'Alessandro Reviewed-by: Louis Chauvet Reviewed-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 1 + include/drm/drm_crtc.h | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index aa4aa2f589b3d..f2028e6cdd62f 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -389,6 +389,7 @@ drm_atomic_get_crtc_state(struct drm_atomic_state *stat= e, state->crtcs[index].new_state =3D crtc_state; state->crtcs[index].ptr =3D crtc; crtc_state->state =3D state; + crtc_state->color_pipeline_enabled =3D state->crtc_color_pipeline; =20 drm_dbg_atomic(state->dev, "Added [CRTC:%d:%s] %p state to %p\n", crtc->base.id, crtc->name, crtc_state, state); diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index b3c9818715851..888a3a5aa3a27 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -282,6 +282,14 @@ struct drm_crtc_state { */ struct drm_colorop *color_pipeline; =20 + /** + * @color_pipeline_enabled: + * + * Whether color management should be done based on the &color_pipeline + * or the legacy color properties (&ctm, &gamma_lut and °amma_lut). + */ + bool color_pipeline_enabled; + /** * @target_vblank: * --=20 2.51.0