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 C7DB6CD98DB for ; Wed, 10 Jun 2026 15:25:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3194B10EA89; Wed, 10 Jun 2026 15:25:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="lmPGu+Ys"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RIOnc1xz"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="lmPGu+Ys"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RIOnc1xz"; dkim-atps=neutral Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1F22910EA7F for ; Wed, 10 Jun 2026 15:25:29 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (unknown [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-out1.suse.de (Postfix) with ESMTPS id F19D46AEA6; Wed, 10 Jun 2026 15:25:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1781105119; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mxql3716pXqWQmEE2LeoKEN1xwiz6N2JV4+1RCYfKw0=; b=lmPGu+YsH6vuslQO3NcxMiJCOgCfsBTiLtq7CIKTjIiUM86f++StXUdrsBJFtg0PwuRx7w k67FvJRDe5jVJna5FGo0mYqLXAb7XCMmlkFC0BHH2PdQ1+45F9p0o2FPAYH9GqQ9SxOZGz uY5mqP/uvtmkQo7WeDuCbxwQ4TF2vBg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1781105119; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mxql3716pXqWQmEE2LeoKEN1xwiz6N2JV4+1RCYfKw0=; b=RIOnc1xzz9T+R2qdG/VOw252ZL/cinH1eb7Ns1BAL0cfGO/r1DUlc+zqs6gMPdLv0yMmg3 TFT7v7EtFZDaMpBQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1781105119; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mxql3716pXqWQmEE2LeoKEN1xwiz6N2JV4+1RCYfKw0=; b=lmPGu+YsH6vuslQO3NcxMiJCOgCfsBTiLtq7CIKTjIiUM86f++StXUdrsBJFtg0PwuRx7w k67FvJRDe5jVJna5FGo0mYqLXAb7XCMmlkFC0BHH2PdQ1+45F9p0o2FPAYH9GqQ9SxOZGz uY5mqP/uvtmkQo7WeDuCbxwQ4TF2vBg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1781105119; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mxql3716pXqWQmEE2LeoKEN1xwiz6N2JV4+1RCYfKw0=; b=RIOnc1xzz9T+R2qdG/VOw252ZL/cinH1eb7Ns1BAL0cfGO/r1DUlc+zqs6gMPdLv0yMmg3 TFT7v7EtFZDaMpBQ== 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 230CA779A7; Wed, 10 Jun 2026 15:25:18 +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 UEgpB96BKWr3HwAAD6G6ig (envelope-from ); Wed, 10 Jun 2026 15:25:18 +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, jani.nikula@linux.intel.com, mhklkml@zohomail.com, zack.rusin@broadcom.com, bcm-kernel-feedback-list@broadcom.com, harry.wentland@amd.com, sunpeng.li@amd.com, siqueira@igalia.com, alexander.deucher@amd.com, rodrigo.vivi@intel.com, joonas.lahtinen@linux.intel.com, tursulin@ursulin.net, javierm@redhat.com, dmitry.osipenko@collabora.com, gurchetansingh@chromium.org, olvaffe@gmail.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, amd-gfx@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH v5 08/15] drm/atomic-helpers: Evaluate plane damage after atomic_check Date: Wed, 10 Jun 2026 17:18:24 +0200 Message-ID: <20260610152505.260172-9-tzimmermann@suse.de> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260610152505.260172-1-tzimmermann@suse.de> References: <20260610152505.260172-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-6.79 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.19)[-0.936]; MIME_GOOD(-0.10)[text/plain]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linux.intel.com,redhat.com,gmail.com,ffwll.ch,kodeit.net,proton.me,crapouillou.net,zohomail.com,broadcom.com,amd.com,igalia.com,intel.com,ursulin.net,collabora.com,chromium.org]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWELVE(0.00)[31]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; R_RATELIMIT(0.00)[to_ip_from(RLq3cifbxyhc6qbbynzfc6amns)]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com] 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" 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 re-evaluates 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 Reviewed-by: Javier Martinez Canillas Acked-by: Zack Rusin --- 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 285aac3554df..8e080a42aec4 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1071,6 +1071,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