From f4deda4b25789e4afbd20bdd11e6f26cf37e529f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 12 Mar 2018 01:14:03 +0000 Subject: [PATCH] firmware_class: Refer to Debian wiki page when logging missing firmware Bug-Debian: https://bugs.debian.org/888405 Forwarded: not-needed If firmware loading fails due to a missing file, log a second error message referring to our wiki page about firmware. This will explain why some firmware is in non-free, or can't be packaged at all. Only do this once per boot. Do something similar in the radeon and amdgpu drivers, where we have an early check to avoid failing at a point where we cannot display anything. Gbp-Pq: Topic debian Gbp-Pq: Name firmware_class-refer-to-debian-wiki-firmware-page.patch --- drivers/base/firmware_loader/main.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu/drm/radeon/radeon_drv.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c index c56dfe12bbd..18c8500eba4 100644 --- a/drivers/base/firmware_loader/main.c +++ b/drivers/base/firmware_loader/main.c @@ -566,9 +566,12 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv, } __putname(path); - if (rc) + if (rc) { dev_err(device, "firmware: failed to load %s (%d)\n", fw_priv->fw_name, rc); + if (rc == -ENOENT) + pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n"); + } return rc; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 5a8fb922422..1ba7cbbf0c9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1202,6 +1202,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, if (!amdgpu_firmware_installed()) { DRM_ERROR("amdgpu requires firmware installed\n"); + pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n"); return -ENODEV; } diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 8c16f84c2fc..f0ed1e4cf85 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -381,6 +381,7 @@ static int radeon_pci_probe(struct pci_dev *pdev, if ((ent->driver_data & RADEON_FAMILY_MASK) >= CHIP_R600 && !radeon_firmware_installed()) { DRM_ERROR("radeon kernel modesetting for R600 or later requires firmware installed\n"); + pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n"); return -ENODEV; } -- 2.30.2