> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf
> Of Aaron Liu
> Sent: Wednesday, December 05, 2018 11:12 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Aaron <aaron....@amd.com>
> Subject: [PATCH] drm/amdgpu: both support PCO real/fake rlc fw
> 
> For Picasso && AM4 SOCKET board, we use picasso_rlc_fake.bin For Picasso
> && FP5 SOCKET board, we use picasso_rlc.bin
> 
> Judgment method:
> PCO AM4: revision >= 0xC8 && revision <= 0xCF
>          or revision >= 0xD8 && revision <= 0xDF otherwise is PCO FP5
> 
> Change-Id: I359f0a3d1bc7d4d49c871cb3fb82797c7b91b259
> Signed-off-by: Aaron Liu <aaron....@amd.com>

Reviewed-by: Huang Rui <ray.hu...@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 94740ea..639a50d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -645,7 +645,20 @@ static int gfx_v9_0_init_microcode(struct
> amdgpu_device *adev)
>       adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr-
> >header.ucode_version);
>       adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr-
> >ucode_feature_version);
> 
> -     snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin",
> chip_name);
> +     /*
> +      * For Picasso && AM4 SOCKET board, we use picasso_rlc_fake.bin
> +      * instead of picasso_rlc.bin.
> +      * Judgment method:
> +      * PCO AM4: revision >= 0xC8 && revision <= 0xCF
> +      *          or revision >= 0xD8 && revision <= 0xDF
> +      * otherwise is PCO FP5
> +      */
> +     if (!strcmp(chip_name, "picasso") &&
> +             (((adev->pdev->revision >= 0xC8) && (adev->pdev->revision
> <= 0xCF)) ||
> +             ((adev->pdev->revision >= 0xD8) && (adev->pdev->revision
> <= 0xDF))))
> +             snprintf(fw_name, sizeof(fw_name),
> "amdgpu/%s_rlc_fake.bin", chip_name);
> +     else
> +             snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin",
> chip_name);
>       err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
>       if (err)
>               goto out;
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to