From mboxrd@z Thu Jan 1 00:00:00 1970 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 8B339FD2D64 for ; Tue, 10 Mar 2026 12:00:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B07E010E702; Tue, 10 Mar 2026 12:00:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Eq3XQydn"; dkim-atps=neutral Received: from mgamail.intel.com (unknown [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3478210E704; Tue, 10 Mar 2026 12:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773144051; x=1804680051; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GMuRZsIcDPYzUmK3hRLnUVbGlgh6ZtOMDCxtj9c841Y=; b=Eq3XQydnB45YndpfZjWMBy0TZszjyQh3mW8hZ7GZ/lPMCUnAGqrunlKs e48y0ovudKkA06Bs3OHFuPg1ry+gtLSh0wXwJX7ZeGkSxykeXhucu27Ry pNyRbIZ0OLhJmeD5hFb2qwcEyp5UedgimEXkRMQfTXcBVUaUXEcHMiKLt oZw8cnfgr8mpOlKybwco6+/qErJGcuLVdsHZIF32xdHY6oSUt+y6V5h26 xeLbZVWnO/LS0rd5BNdY1O5IT7ki/i22RvyiOpqymFud0Tw21dJkE2Kye AyOn2K1Z4ajt7TjMUpcVf1mCYV7wGex45FGFcohIFSr8XATFn22SqtWrH g==; X-CSE-ConnectionGUID: bqXqt9hyTuacgxKfUjt6Qg== X-CSE-MsgGUID: 9+GDMqtTQaOvqTPdgCSw/g== X-IronPort-AV: E=McAfee;i="6800,10657,11724"; a="84897898" X-IronPort-AV: E=Sophos;i="6.23,112,1770624000"; d="scan'208";a="84897898" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2026 04:57:46 -0700 X-CSE-ConnectionGUID: T899SoHYTtWxDo7ymnwV6Q== X-CSE-MsgGUID: +Gs3nQC3SKybWqfT0s/xBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,112,1770624000"; d="scan'208";a="224773048" Received: from dut-2a59.iind.intel.com ([10.190.239.113]) by fmviesa005.fm.intel.com with ESMTP; 10 Mar 2026 04:57:42 -0700 From: Chaitanya Kumar Borah To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: contact@emersion.fr, alex.hung@amd.com, harry.wentland@amd.com, daniels@collabora.com, mwen@igalia.com, sebastian.wick@redhat.com, uma.shankar@intel.com, ville.syrjala@linux.intel.com, maarten.lankhorst@linux.intel.com, jani.nikula@intel.com, louis.chauvet@bootlin.com, stable@vger.kernel.org, chaitanya.kumar.borah@intel.com Subject: [PATCH v2 2/2] drm/atomic: Add affected colorops with affected planes Date: Tue, 10 Mar 2026 17:02:38 +0530 Message-Id: <20260310113238.3495981-3-chaitanya.kumar.borah@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260310113238.3495981-1-chaitanya.kumar.borah@intel.com> References: <20260310113238.3495981-1-chaitanya.kumar.borah@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" When drm_atomic_add_affected_planes() adds a plane to the atomic state, the associated colorops are not guaranteed to be included. This can leave colorop state out of the transaction when planes are pulled in implicitly (eg. during modeset or internal commits). Also add affected colorops when adding affected planes to keep plane and color pipeline state consistent within the atomic transaction. v2: Add affected colorops only when a pipeline is enabled Fixes: 2afc3184f3b3 ("drm/plane: Add COLOR PIPELINE property") Cc: #v6.19+ Reviewed-by: Uma Shankar #v1 Signed-off-by: Chaitanya Kumar Borah --- drivers/gpu/drm/drm_atomic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 04925166df98..dd9f27cfe991 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1587,6 +1587,7 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state, const struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc); struct drm_plane *plane; + int ret; WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc)); @@ -1600,6 +1601,12 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state, if (IS_ERR(plane_state)) return PTR_ERR(plane_state); + + if (plane_state->color_pipeline) { + ret = drm_atomic_add_affected_colorops(state, plane); + if (ret) + return ret; + } } return 0; } -- 2.25.1