All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	<linux-kernel@vger.kernel.org>
Cc: Carlos Soriano Sanchez <csoriano@redhat.com>,
	<amd-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>,
	"David Airlie" <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>, <christian.koenig@amd.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>
Subject: [PATCH 2/2] drm/amd: Re-create firmware framebuffer on failure to probe
Date: Thu, 22 Dec 2022 12:30:11 -0600	[thread overview]
Message-ID: <20221222183012.1046-3-mario.limonciello@amd.com> (raw)
In-Reply-To: <20221222183012.1046-1-mario.limonciello@amd.com>

If the probe sequence fails then the user is stuck with a frozen
screen and can only really recover via SSH or by rebooting and
applying nomodeset to the kernel command line.

This is particularly problematic as newer GPUs are introduced because
distributions may take some time to land newer GPU firmware.

So when probe fails, re-create the system framebuffer so that the
user at least has basic graphics support.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index bf2d50c8c92a..8961c62ab29b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -40,6 +40,7 @@
 #include <linux/cc_platform.h>
 #include <linux/fb.h>
 #include <linux/dynamic_debug.h>
+#include <linux/sysfb.h>
 
 #include "amdgpu.h"
 #include "amdgpu_irq.h"
@@ -2187,6 +2188,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
 
 err_pci:
 	pci_disable_device(pdev);
+	sysfb_enable();
 	return ret;
 }
 
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Mario Limonciello <mario.limonciello@amd.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	<linux-kernel@vger.kernel.org>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	Carlos Soriano Sanchez <csoriano@redhat.com>,
	christian.koenig@amd.com,
	Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH 2/2] drm/amd: Re-create firmware framebuffer on failure to probe
Date: Thu, 22 Dec 2022 12:30:11 -0600	[thread overview]
Message-ID: <20221222183012.1046-3-mario.limonciello@amd.com> (raw)
In-Reply-To: <20221222183012.1046-1-mario.limonciello@amd.com>

If the probe sequence fails then the user is stuck with a frozen
screen and can only really recover via SSH or by rebooting and
applying nomodeset to the kernel command line.

This is particularly problematic as newer GPUs are introduced because
distributions may take some time to land newer GPU firmware.

So when probe fails, re-create the system framebuffer so that the
user at least has basic graphics support.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index bf2d50c8c92a..8961c62ab29b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -40,6 +40,7 @@
 #include <linux/cc_platform.h>
 #include <linux/fb.h>
 #include <linux/dynamic_debug.h>
+#include <linux/sysfb.h>
 
 #include "amdgpu.h"
 #include "amdgpu_irq.h"
@@ -2187,6 +2188,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
 
 err_pci:
 	pci_disable_device(pdev);
+	sysfb_enable();
 	return ret;
 }
 
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Mario Limonciello <mario.limonciello@amd.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	<linux-kernel@vger.kernel.org>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	Daniel Vetter <daniel@ffwll.ch>,
	Carlos Soriano Sanchez <csoriano@redhat.com>,
	David Airlie <airlied@gmail.com>,
	christian.koenig@amd.com,
	Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH 2/2] drm/amd: Re-create firmware framebuffer on failure to probe
Date: Thu, 22 Dec 2022 12:30:11 -0600	[thread overview]
Message-ID: <20221222183012.1046-3-mario.limonciello@amd.com> (raw)
In-Reply-To: <20221222183012.1046-1-mario.limonciello@amd.com>

If the probe sequence fails then the user is stuck with a frozen
screen and can only really recover via SSH or by rebooting and
applying nomodeset to the kernel command line.

This is particularly problematic as newer GPUs are introduced because
distributions may take some time to land newer GPU firmware.

So when probe fails, re-create the system framebuffer so that the
user at least has basic graphics support.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index bf2d50c8c92a..8961c62ab29b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -40,6 +40,7 @@
 #include <linux/cc_platform.h>
 #include <linux/fb.h>
 #include <linux/dynamic_debug.h>
+#include <linux/sysfb.h>
 
 #include "amdgpu.h"
 #include "amdgpu_irq.h"
@@ -2187,6 +2188,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
 
 err_pci:
 	pci_disable_device(pdev);
+	sysfb_enable();
 	return ret;
 }
 
-- 
2.34.1


  parent reply	other threads:[~2022-12-22 18:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 18:30 [PATCH 0/2] Recover from failure to probe GPU Mario Limonciello
2022-12-22 18:30 ` Mario Limonciello
2022-12-22 18:30 ` Mario Limonciello
2022-12-22 18:30 ` [PATCH 1/2] firmware: sysfb: Allow re-creating system framebuffer after init Mario Limonciello
2022-12-22 18:30   ` Mario Limonciello
2022-12-22 18:30   ` Mario Limonciello
2022-12-23  4:14   ` kernel test robot
2022-12-23  4:14     ` kernel test robot
2022-12-22 18:30 ` Mario Limonciello [this message]
2022-12-22 18:30   ` [PATCH 2/2] drm/amd: Re-create firmware framebuffer on failure to probe Mario Limonciello
2022-12-22 18:30   ` Mario Limonciello
2022-12-23 16:08   ` Ernst Sjöstrand
2022-12-23 16:08     ` Ernst Sjöstrand
2022-12-22 19:41 ` [PATCH 0/2] Recover from failure to probe GPU Javier Martinez Canillas
2022-12-22 19:41   ` Javier Martinez Canillas
2022-12-22 19:41   ` Javier Martinez Canillas
2022-12-23 15:51   ` Mario Limonciello
2022-12-23 15:51     ` Mario Limonciello
2022-12-23 15:51     ` Mario Limonciello
2022-12-24  9:34 ` Thomas Zimmermann
2022-12-24  9:34   ` Thomas Zimmermann
2022-12-25 15:30   ` Christian König
2022-12-25 15:30     ` Christian König
2022-12-27 15:40     ` Alex Deucher
2022-12-27 15:40       ` Alex Deucher
2022-12-27 17:04       ` Alex Deucher
2022-12-27 17:04         ` Alex Deucher
2022-12-27 19:23         ` Javier Martinez Canillas
2022-12-27 19:23           ` Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221222183012.1046-3-mario.limonciello@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=csoriano@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.