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 094F1435AAF; Wed, 2 Sep 2026 12:20:23 +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=1788351625; cv=none; b=eo7g3iqEJzWG9PFx1FmC5EhvagRiHkEETS/H1d5+iAc01At4yq0Be9iJTTPLARng7vXDO5P4oLVUcg5T2BQRFzddhw4h+nAKdcnk0Kof1SY03U0diF6R36zpRYAWslwvySVoQb6zry8rL/xJdygASniFNypbkNVr4q0Jhu5jhqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788351625; c=relaxed/simple; bh=QKFpTKbNH3Uy0z87eTJVT4KRJPm76dyv5sVpnij/AP8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GPtKuevmTbVPw5T1wExRaeSCtEhGkGJtGdf3hurHUzrljlBcm/h0KUyiu/WkGHibMCPc5SULY5HXuYPrnopsDOQIlOY9lHAmxbWCIwr6OQW5tZ4tPtukJ8tdVg5hqiPVXQgigLJPZQh6tof9HLc8xVFu5OD2tq00bpiBUQfBfBs= 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 45A581F7E4; Wed, 2 Sep 2026 12:19:43 +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 55EA01397A; Wed, 2 Sep 2026 12:19:40 +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 kF+JE1wUmGqxEAAAD6G6ig (envelope-from ); Wed, 02 Sep 2026 12:19:40 +0000 From: Thomas Zimmermann To: jfalempe@redhat.com, javierm@redhat.com, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, geert@linux-m68k.org, rdunlap@infradead.org Cc: dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, amd-gfx@lists.freedesktop.org, rust-for-linux@vger.kernel.org, linux-hyperv@vger.kernel.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, nouveau@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, virtualization@lists.linux.dev, sashiko-reviews@lists.linux.dev, Thomas Zimmermann Subject: [PATCH v3 10/14] drm/panic: Restrict to primary planes Date: Wed, 2 Sep 2026 14:13:18 +0200 Message-ID: <20260902121930.597222-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260902121930.597222-1-tzimmermann@suse.de> References: <20260902121930.597222-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: imx@lists.linux.dev 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-Rspamd-Queue-Id: 45A581F7E4 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Spam-Flag: NO X-Spam-Score: -4.00 X-Spam-Level: X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLqtkr6cif1ebgurukgmwdm7xc)] Restrict panic handling to primary displays. Overlays and cursors should not display panic output. If there are exceptions, they can be registered by the driver itself. v3: - also update drm_panic_is_enabled() (Sashiko) - still do some testing when unregistering (Sashiko) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index 624042c42a7f..381f8aab3661 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -1059,9 +1059,13 @@ bool drm_panic_is_enabled(struct drm_device *dev) if (!dev->mode_config.num_total_plane) return false; - drm_for_each_plane(plane, dev) - if (plane->helper_private && plane->helper_private->get_scanout_buffer) - return true; + drm_for_each_plane(plane, dev) { + if (plane->type != DRM_PLANE_TYPE_PRIMARY) + continue; + if (!plane->helper_private || !plane->helper_private->get_scanout_buffer) + continue; + return true; + } return false; } EXPORT_SYMBOL(drm_panic_is_enabled); @@ -1079,6 +1083,8 @@ void drm_panic_register(struct drm_device *dev) return; drm_for_each_plane(plane, dev) { + if (plane->type != DRM_PLANE_TYPE_PRIMARY) + continue; if (!plane->helper_private || !plane->helper_private->get_scanout_buffer) continue; plane->kmsg_panic.dump = drm_panic; @@ -1106,6 +1112,8 @@ void drm_panic_unregister(struct drm_device *dev) return; drm_for_each_plane(plane, dev) { + if (plane->type != DRM_PLANE_TYPE_PRIMARY) + continue; if (!plane->helper_private || !plane->helper_private->get_scanout_buffer) continue; kmsg_dump_unregister(&plane->kmsg_panic); -- 2.55.0