]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
Merge tag 'drm-next-2025-01-17' of https://gitlab.freedesktop.org/drm/kernel
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_ucode.c
index d3cd76c6dab3b7ce92d7a4416148dd6d4dfbb3fe..cf700824b960b7ace8aa43f677ee64f3490ecd23 100644 (file)
@@ -1434,6 +1434,7 @@ void amdgpu_ucode_ip_version_decode(struct amdgpu_device *adev, int block_type,
  *
  * @adev: amdgpu device
  * @fw: pointer to load firmware to
+ * @required: whether the firmware is required
  * @fmt: firmware name format string
  * @...: variable arguments
  *
@@ -1442,7 +1443,7 @@ void amdgpu_ucode_ip_version_decode(struct amdgpu_device *adev, int block_type,
  * the error code to -ENODEV, so that early_init functions will fail to load.
  */
 int amdgpu_ucode_request(struct amdgpu_device *adev, const struct firmware **fw,
-                        const char *fmt, ...)
+                        enum amdgpu_ucode_required required, const char *fmt, ...)
 {
        char fname[AMDGPU_UCODE_NAME_MAX];
        va_list ap;
@@ -1456,7 +1457,13 @@ int amdgpu_ucode_request(struct amdgpu_device *adev, const struct firmware **fw,
                return -EOVERFLOW;
        }
 
-       r = request_firmware(fw, fname, adev->dev);
+       if (required == AMDGPU_UCODE_REQUIRED)
+               r = request_firmware(fw, fname, adev->dev);
+       else {
+               r = firmware_request_nowarn(fw, fname, adev->dev);
+               if (r)
+                       drm_info(&adev->ddev, "Optional firmware \"%s\" was not found\n", fname);
+       }
        if (r)
                return -ENODEV;
 
This page took 0.034766 seconds and 4 git commands to generate.