From patchwork Mon Mar 11 17:42:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Noralf_Tr=C3=B8nnes?= X-Patchwork-Id: 10847901 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B01D1850 for ; Mon, 11 Mar 2019 17:42:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBA2B28A1F for ; Mon, 11 Mar 2019 17:42:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFDE628DD0; Mon, 11 Mar 2019 17:42:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9C3F228A1F for ; Mon, 11 Mar 2019 17:42:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4198989BF1; Mon, 11 Mar 2019 17:42:32 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 360DC89BF1; Mon, 11 Mar 2019 17:42:31 +0000 (UTC) Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:44760 helo=localhost.localdomain) by smtp.domeneshop.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1h3OwX-0007oa-6h; Mon, 11 Mar 2019 18:42:29 +0100 From: =?utf-8?q?Noralf_Tr=C3=B8nnes?= To: dri-devel@lists.freedesktop.org Date: Mon, 11 Mar 2019 18:42:15 +0100 Message-Id: <20190311174218.51899-1-noralf@tronnes.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tronnes.org; s=ds201810; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From; bh=5nEK58pVPDWiIrp65IIY6ARcTFCG921ehK0hsIxWEkM=; b=XFs2sMbH3KwgutToo4mSVkSlV+ZW8UojF22q0x6nW6KBrOfFt8X6k5wjl/LFUP/PJndxfkHo1zlcv6O9Ct+nGoBLWGHatmxXUaKpk2IG4otrYpXFZKwMjq5mJx4YMXwZR78pjdLZegXhLIEtVdklX+0LpEs0ZZZxapKl2QucpBkLzEr43Q0n4HUi/5JWpXF4NoGuxtiaTwA4MlgvTkbw03Ru1iJlmNc3JJxtm/PZUVT+2J8d538gvHjxoDPhxwI4Pli9bcAZF1VXITgNj4bXGxsBoY628j8uLz9fC2nPM0gYCLt+rKx5jkkL3U2z3vPcL/lJEyHdrkcVpESYaEMr7Q==; Subject: [Intel-gfx] [PATCH v2 0/3] drm: Add panic handling X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org, =?utf-8?q?Noral?= =?utf-8?q?f_Tr=C3=B8nnes?= , darwish.07@gmail.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This patchset adds a way for DRM drivers to display kernel messages during panic(). I had a Windows blue screen last year and remembered this patchset, so I did a new version that I never got around to put out. Now that panic handling came up on the ML, I'm sending it out as part of the discussion. TODO: Determine which part of the framebuffer that is actually visible. I don't know enough about KMS to do this. See drm_panic_kmsg_render_screen(). Testing: I have tested[1] using the formats and resolutions support by vc4 and modetest. I have even recorded it[2]. RG24 and BG24 gave an unexpected result, not sure what to make of it. Noralf. [1] https://gist.github.com/notro/b9fdff4c6a68a307091e970598f27ed0 [2] https://youtu.be/lZ80vL4dgpE Version 1 (Aug 2016): https://patchwork.freedesktop.org/series/10867/ Changes since version 1: - Use kernel message dumper - Add multicolumn support - Support some YUV formats - cma: vmap PRIME buffers on import to support that case Noralf Trønnes (3): drm: Add support for panic message output drm/cma-helper: Add support for panic screen drm/vc4: Support for panic screen drivers/gpu/drm/Kconfig | 3 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_drv.c | 3 + drivers/gpu/drm/drm_fb_cma_helper.c | 43 ++++ drivers/gpu/drm/drm_framebuffer.c | 117 +++++++++ drivers/gpu/drm/drm_gem_cma_helper.c | 3 + drivers/gpu/drm/drm_internal.h | 4 + drivers/gpu/drm/drm_panic.c | 363 +++++++++++++++++++++++++++ drivers/gpu/drm/vc4/vc4_kms.c | 3 +- include/drm/drm_fb_cma_helper.h | 4 +- include/drm/drm_framebuffer.h | 41 +++ 11 files changed, 583 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/drm_panic.c Signed-off-by: Ahmed S. Darwish