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 8AE9CC44503 for ; Wed, 8 Jul 2026 19:44:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D460C10F26F; Wed, 8 Jul 2026 19:44:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="JSwHy0hh"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id C6B4410F260; Wed, 8 Jul 2026 19:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9G3kQItU6v4A1JLe7MM4sPnTCAQ8PtusRLOSDDlkytc=; b=JSwHy0hh9qIWHdPipw4qhOwwzq Yh0UvPt+Y3Ks+KP7BjxabqFqrddW0PY8IltKqUI+C2Cd0TaRX67jyqjc3KGi++FIiostnOpM5QQTN JTVMtG8r5iiu72tdtPGTEizxCw+P3doXhq4kyh33zf+b8hHBM3yaVRKuWudzYUm9uyNwNPAVdbIsc A6IDNjRYxsajMgCiFZV32nhOnKYcezRkFrDzcK+IMi9f1LoGRBaWKkQkA/nQcf1npbg+W+O8pUWVF uW/wRAH6gt5aGNOVmpZTCjmrwQt7V8ro6lJ8hGAdDFK+4DTxi+YoBF1J7WdUBBqnVHwT1UDQTZnuJ oDbjGbMw==; Received: from 100.red-79-144-92.dynamicip.rima-tde.net ([79.144.92.100] helo=killbill) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1whYBb-00BtrH-2E; Wed, 08 Jul 2026 21:43:59 +0200 From: Melissa Wen To: airlied@gmail.com, alexander.deucher@amd.com, christian.koenig@amd.com, harry.wentland@amd.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, simona@ffwll.ch, siqueira@igalia.com, sunpeng.li@amd.com, tzimmermann@suse.de Cc: Ariel DAlessandro , "Nicolas F . R . A . Prado" , Alex Hung , Simon Ser , Uma Shankar , Chaitanya Kumar Borah , Robert Mader , Xaver Hugl , Pekka Paalanen , John Harrison , amd-gfx@lists.freedesktop.org, kernel-dev@igalia.com, Louis Chauvet , dri-devel@lists.freedesktop.org Subject: [RFC PATCH 06/19] drm/atomic: Pass crtc_color_pipeline client cap to atomic check Date: Wed, 8 Jul 2026 21:37:21 +0200 Message-ID: <20260708194343.2578387-7-mwen@igalia.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260708194343.2578387-1-mwen@igalia.com> References: <20260708194343.2578387-1-mwen@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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" From: NĂ­colas F. R. A. Prado Pass the state of the CRTC (post-blend) color pipeline client cap to the atomic state so that drivers can rely on it to enable color pipeline functionality and ignore the deprecated color management CRTC properties. Signed-off-by: NĂ­colas F. R. A. Prado Co-developed-by: Ariel D'Alessandro Signed-off-by: Ariel D'Alessandro Reviewed-by: Louis Chauvet --- drivers/gpu/drm/drm_atomic_uapi.c | 1 + include/drm/drm_atomic.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 8f9c11bd94c6..0ee44976031e 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -1738,6 +1738,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, state->acquire_ctx = &ctx; state->allow_modeset = !!(arg->flags & DRM_MODE_ATOMIC_ALLOW_MODESET); state->plane_color_pipeline = file_priv->plane_color_pipeline; + state->crtc_color_pipeline = file_priv->crtc_color_pipeline; retry: copied_objs = 0; diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 88087910ab1a..a28701704e01 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -575,6 +575,26 @@ struct drm_atomic_commit { */ bool plane_color_pipeline : 1; + /** + * @crtc_color_pipeline: + * + * Indicates whether this atomic state originated with a client that + * set the DRM_CLIENT_CAP_CRTC_COLOR_PIPELINE. + * + * Drivers and helper functions should use this to ignore legacy + * properties that are incompatible with the drm_crtc COLOR_PIPELINE + * behavior, such as: + * + * - GAMMA_LUT + * - DEGAMMA_LUT + * - GAMMA_LUT_SIZE + * - CTM + * + * or any other driver-specific properties that might affect pixel + * values. + */ + bool crtc_color_pipeline : 1; + /** * @colorops: * -- 2.53.0