From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EE0E3358BC for ; Tue, 16 Dec 2025 08:25:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765873551; cv=none; b=urBNi1eic9RYlRKB0GHIvvqPedb90JbbvnXGSGrAlHJcgfJWgqflMnCQ1J+21Uh6UXpKPEmnoxJRl1jKvryzhXB8UeOg2VhlkTmQwD1f5RH7uOnG6L2iigPbeefihwBxtw9bk96ahhAZQwzckiXB4y7aex4EoSWthovfGvwFdvY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765873551; c=relaxed/simple; bh=Nfhz7aYRffGJYvw9DkHgKGkESBWoJRUnXk/8NMdEFog=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=lZbJlk0B5XEnr5yRynR8UqGC34SXznpWmLfnw7b7N9QRMXBnzMJsmtBRbU1JNx7r5VlzpuY8H62iAeQX9igzO0smtYxKtptJaeXZzKLlD+/2D1fjvLMZESMrsWRecsToUmwUjimdofwq1TVMaYfhLYXN67X0cwFuNXlfq59eXjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NmprSLvW; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NmprSLvW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765873547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=mI0vKOCPWPHjewJMSoLhgC3xnRJuy70Zi8RIvmWLjmw=; b=NmprSLvWW9rklf8Qrwh0KaFm6vJA2Hf/lfxo83FEO9skuHEKqrV1tb50Hd7DsxoQkjiwd+ RXfnzQDms39K/qig/HbUZVnZY9Sguk/+8No2MQ1lwc5PxOCxU5UeKeu/kgRMKa2ModhVTg e1eyWS/jZ600p0EqUxJ+/78JPMlD1Xc= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-546-TNoInskoOKCEbjmjWJ5_iA-1; Tue, 16 Dec 2025 03:25:44 -0500 X-MC-Unique: TNoInskoOKCEbjmjWJ5_iA-1 X-Mimecast-MFC-AGG-ID: TNoInskoOKCEbjmjWJ5_iA_1765873543 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D7C561800342; Tue, 16 Dec 2025 08:25:42 +0000 (UTC) Received: from hydra.redhat.com (unknown [10.45.224.146]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CAD5C18004D8; Tue, 16 Dec 2025 08:25:39 +0000 (UTC) From: Jocelyn Falempe To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jocelyn Falempe , Javier Martinez Canillas , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 0/2] drm/panic: Add kunit tests for drm_panic Date: Tue, 16 Dec 2025 09:20:37 +0100 Message-ID: <20251216082524.115980-1-jfalempe@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 This series adds some kunit tests to drm_panic, and a debugfs interface to easily test the panic screen rendering at different resolutions/pixel format. The kunit tests draws the panic screens to different framebuffer size and format, and ensure it doesn't crash or draw outside of the buffer. However it doesn't check the resulting image, because it depends on other Kconfig options, like logo, fonts, or panic colors. v2: * Use debugfs instead of sending the framebuffer through the kunit logs. (Thomas Zimmermann). * Add a few checks, and more comments in the kunit tests. (Maxime Ripard). v3: * Check the framebuffer content in drm_test_panic_screen_user_page(). * Fix memory leaks, when the test fails (Maxime Ripard). v4: * Run QR code test only if QR code panic screen is built. * Drop the last patch to add a draw_test debugfs. Jocelyn Falempe (2): drm/panic: Rename draw_panic_static_* to draw_panic_screen_* drm/panic: Add kunit tests for drm_panic MAINTAINERS | 1 + drivers/gpu/drm/drm_panic.c | 22 ++- drivers/gpu/drm/tests/drm_panic_test.c | 220 +++++++++++++++++++++++++ 3 files changed, 234 insertions(+), 9 deletions(-) create mode 100644 drivers/gpu/drm/tests/drm_panic_test.c base-commit: 20de1b0080b9889094d703927871da8f21fb624e -- 2.52.0