From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 13DE341B37D; Mon, 24 Aug 2026 12:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787575951; cv=none; b=XuI9kPwn+2ejCVf3GzhW3cg4cMcU08ugKr7xHFyN4x4cefEQLQ7PB706gBaNGhBpY0fSLhGpNnkHUS/UyI3/uKFmgyi7e/SZxeu32KIdgWT8h6dLsVvMpt5w+EzPq1yGkzmspZhdVi5E+hq0vf/Z6R/PzrIx9YBhSJBRdOP3GVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787575951; c=relaxed/simple; bh=luquQq6fwsGGa1cit5g8Nb5t0xmCZxmWD8UU4ZH57cI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lBWiSAiSO+3LQCzj1VSfL7SYmlBdDIJ1zDz+ixQaBJvOnPLn6rGJCu7hKIazXey4kErgWhxO8oL6KZrdmcjZIe9Ef1eN5zEbVKI5TUdBru92IA/Zyb30Ga5JomKo9ei6UOHtJ/zrDl6arZXeddoRk9gC5miYRAdtRljIn2AYHJ4= 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.130 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-out1.suse.de (Postfix) with ESMTPS id 98D7D86833; Mon, 24 Aug 2026 12:52:11 +0000 (UTC) Authentication-Results: smtp-out1.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 76CE81340F; Mon, 24 Aug 2026 12:52:10 +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 YNnDG3o+jGpyNwAAD6G6ig (envelope-from ); Mon, 24 Aug 2026 12:52:10 +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 v2 09/13] drm/panic: Restrict to primary planes; unconditionally unregister Date: Mon, 24 Aug 2026 14:43:40 +0200 Message-ID: <20260824125201.218863-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260824125201.218863-1-tzimmermann@suse.de> References: <20260824125201.218863-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-doc@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: 98D7D86833 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Flag: NO X-Spam-Score: -4.00 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action 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. For cleanup, unregister each plane unconditionally. The kmsg dumper already keeps track of the registration status so DRM doesn't have to. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index 2048a3bf736f..7dbbcc1c219f 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -1079,6 +1079,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; @@ -1105,11 +1107,8 @@ void drm_panic_unregister(struct drm_device *dev) if (!dev->mode_config.num_total_plane) return; - drm_for_each_plane(plane, dev) { - if (!plane->helper_private || !plane->helper_private->get_scanout_buffer) - continue; + drm_for_each_plane(plane, dev) kmsg_dump_unregister(&plane->kmsg_panic); - } } /** -- 2.55.0