From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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 7CFA7379ED2 for ; Thu, 7 May 2026 07:57:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778140660; cv=none; b=KS0wVeL8/53kysnjvwbTbMfTnz+F/3PQTPqHCX2B9I4qSsa+ENnCOQznFX5p5g3Lyc39j7Rr4+z0q6lkYIlHxl7juQ46JFunDs52G/moIpD3cFzzO4421HhAv6I5OGz3nN4V+DeKU5PcHuKX4BOno1kJnonew2tt/n/1Z8WUv44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778140660; c=relaxed/simple; bh=GuAzBdSHTlIb57jvgw+9NLT7Nf4A/lApLbiOAqTXBl8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NBlyW14BS1eJO8B2+iG79unwvt94/2Z+9e/o51ulSKR8xgGuYwxEt3kZfNZYuk39Cmen1djOc0b+qHBVN381zJirqMCknY3wknlp7wh2yIR+yvp68+z1na1gYO1YZttOdtZc+oDu7XAkGwUmxgfenInjGGzJOQ6P7g8m0tLSmdQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3CABB5D35D; Thu, 7 May 2026 07:57:31 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id BCBED593A7; Thu, 7 May 2026 07:57:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MLqiLOpF/GnZJAAAD6G6ig (envelope-from ); Thu, 07 May 2026 07:57:30 +0000 From: Thomas Zimmermann To: mripard@kernel.org, maarten.lankhorst@linux.intel.com, airlied@redhat.com, airlied@gmail.com, simona@ffwll.ch, admin@kodeit.net, gargaditya08@proton.me, paul@crapouillou.net, zack.rusin@broadcom.com, bcm-kernel-feedback-list@broadcom.com Cc: dri-devel@lists.freedesktop.org, linux-hyperv@vger.kernel.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-mips@vger.kernel.org, virtualization@lists.linux.dev, Thomas Zimmermann Subject: [PATCH 02/10] drm/atomic-helpers: Evaluate plane damage after atomic_check Date: Thu, 7 May 2026 09:12:21 +0200 Message-ID: <20260507075725.29738-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260507075725.29738-1-tzimmermann@suse.de> References: <20260507075725.29738-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 3CABB5D35D X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Score: -4.00 X-Spam-Level: X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Rspamd-Action: no action Each plane's and CRTC's atomic_check might trigger a full modeset. As this affects the plane's damage handling, evaluate damage clips after running the atomic_check helpers. Examples can be found in a number of drivers, such as ast, gud, ingenic, mgag200 or vmwgfx, which all set mode_changed in the CRTC state to true. Ingenic even reevaluates damage information in its plane's atomic_check. Doing this after the atomic_check helpers ran benefits all drivers. There's already a damage evaluation before the calls to atomic_check. With a few fixes to drivers, this can be removed. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_atomic_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index a768398a1884..58edd122b922 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1065,6 +1065,10 @@ drm_atomic_helper_check_planes(struct drm_device *dev, } } + for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) { + drm_atomic_helper_check_plane_damage(state, new_plane_state); + } + return ret; } EXPORT_SYMBOL(drm_atomic_helper_check_planes); -- 2.54.0