<div dir="ltr">Thanks for fixing this, Mario! If this optional firmware file could be made available so that Linux distros could pick it up, this would be great.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Am Fr., 13. Juni 2025 um 23:56 Uhr schrieb Mario Limonciello <<a href="mailto:mario.limonciello@amd.com">mario.limonciello@amd.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 6/13/2025 4:41 PM, Mario Limonciello wrote:<br>
> From: Mario Limonciello <<a href="mailto:mario.limonciello@amd.com" target="_blank">mario.limonciello@amd.com</a>><br>
> <br>
> commit 017fbb6690c22 ("drm/amdgpu/discovery: check ip_discovery fw file<br>
> available") added support for reading an amdgpu IP discovery bin file<br>
> for some specific products. If it's not found then it will fallback to<br>
> hardcoded values. However if it's not found there is also a lot of noise<br>
> about missing files and errors.<br>
> <br>
> Adjust the error handling to decrease most messages to DEBUG and to show<br>
> at most one message to a user about the missing file at INFO level.<br>
> <br>
> Closes: <a href="https://gitlab.freedesktop.org/drm/amd/-/issues/4312" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/drm/amd/-/issues/4312</a><br>
Reported-and-tested-by Marcus Seyfarth <<a href="mailto:m.seyfarth@gmail.com" target="_blank">m.seyfarth@gmail.com</a>>?<br>
> Fixes: 017fbb6690c22 ("drm/amdgpu/discovery: check ip_discovery fw file available")<br>
> Signed-off-by: Mario Limonciello <<a href="mailto:mario.limonciello@amd.com" target="_blank">mario.limonciello@amd.com</a>><br>
> ---<br>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 17 ++++++-----------<br>
>   1 file changed, 6 insertions(+), 11 deletions(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
> index a0e9bf9b27108..8e4526a8c2600 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
> @@ -321,10 +321,9 @@ static int amdgpu_discovery_read_binary_from_file(struct amdgpu_device *adev,<br>
>       const struct firmware *fw;<br>
>       int r;<br>
>   <br>
> -     r = request_firmware(&fw, fw_name, adev->dev);<br>
> +     r = firmware_request_nowarn(&fw, fw_name, adev->dev);<br>
>       if (r) {<br>
> -             dev_err(adev->dev, "can't load firmware \"%s\"\n",<br>
> -                     fw_name);<br>
> +             drm_info(&adev->ddev, "Optional firmware \"%s\" was not found\n", fw_name);<br>
>               return r;<br>
>       }<br>
>   <br>
> @@ -459,16 +458,12 @@ static int amdgpu_discovery_init(struct amdgpu_device *adev)<br>
>       /* Read from file if it is the preferred option */<br>
>       fw_name = amdgpu_discovery_get_fw_name(adev);<br>
>       if (fw_name != NULL) {<br>
> -             dev_info(adev->dev, "use ip discovery information from file");<br>
> +             drm_dbg(&adev->ddev, "use ip discovery information from file");<br>
>               r = amdgpu_discovery_read_binary_from_file(adev, adev->mman.discovery_bin, fw_name);<br>
> -<br>
> -             if (r) {<br>
> -                     dev_err(adev->dev, "failed to read ip discovery binary from file\n");<br>
> -                     r = -EINVAL;<br>
> +             if (r)<br>
>                       goto out;<br>
> -             }<br>
> -<br>
>       } else {<br>
> +             drm_dbg(&adev->ddev, "use ip discovery information from memory");<br>
>               r = amdgpu_discovery_read_binary_from_mem(<br>
>                       adev, adev->mman.discovery_bin);<br>
>               if (r)<br>
> @@ -1339,7 +1334,7 @@ static int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)<br>
>   <br>
>       r = amdgpu_discovery_init(adev);<br>
>       if (r) {<br>
> -             DRM_ERROR("amdgpu_discovery_init failed\n");<br>
> +             drm_warn(&adev->ddev, "%s failed: %d\n", __func__, r);<br>
>               return r;<br>
>       }<br>
>   <br>
<br>
</blockquote></div>