[PATCH 01/10] drm/radeon/si: load special ucode for certain MC configs

Edward O'Callaghan funfunctor at folklore1984.net
Fri Jan 6 14:20:52 UTC 2017



On 01/06/2017 05:10 AM, Alex Deucher wrote:
> Required for certain MC configs.
> 
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/radeon/si.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
> index ad4d7b8..bbc239e 100644
> --- a/drivers/gpu/drm/radeon/si.c
> +++ b/drivers/gpu/drm/radeon/si.c
> @@ -116,6 +116,8 @@ MODULE_FIRMWARE("radeon/hainan_rlc.bin");
>  MODULE_FIRMWARE("radeon/hainan_smc.bin");
>  MODULE_FIRMWARE("radeon/hainan_k_smc.bin");
>  
> +MODULE_FIRMWARE("radeon/si58_mc.bin");
> +
>  static u32 si_get_cu_active_bitmap(struct radeon_device *rdev, u32 se, u32 sh);
>  static void si_pcie_gen3_enable(struct radeon_device *rdev);
>  static void si_program_aspm(struct radeon_device *rdev);
> @@ -1651,6 +1653,7 @@ static int si_init_microcode(struct radeon_device *rdev)
>  	int err;
>  	int new_fw = 0;
>  	bool new_smc = false;
> +	bool si58_fw = false;
>  
>  	DRM_DEBUG("\n");
>  
> @@ -1746,6 +1749,9 @@ static int si_init_microcode(struct radeon_device *rdev)
>  	default: BUG();
>  	}
>  

Hi Alex,

I suggest just a short one line comment above here and also in the
amdgpu patch too explaining what a 'si58_fw' actually means for a
non-AMD eng.

With that this series is,
Acked-by: Edward O'Callaghan <funfunctor at folklore1984.net>

> +	if (((RREG32(MC_SEQ_MISC0) & 0xff000000) >> 24) == 0x58)
> +		si58_fw = true;
> +
>  	DRM_INFO("Loading %s Microcode\n", new_chip_name);
>  
>  	snprintf(fw_name, sizeof(fw_name), "radeon/%s_pfp.bin", new_chip_name);
> @@ -1849,7 +1855,10 @@ static int si_init_microcode(struct radeon_device *rdev)
>  		}
>  	}
>  
> -	snprintf(fw_name, sizeof(fw_name), "radeon/%s_mc.bin", new_chip_name);
> +	if (si58_fw)
> +		snprintf(fw_name, sizeof(fw_name), "radeon/si58_mc.bin");
> +	else
> +		snprintf(fw_name, sizeof(fw_name), "radeon/%s_mc.bin", new_chip_name);
>  	err = request_firmware(&rdev->mc_fw, fw_name, rdev->dev);
>  	if (err) {
>  		snprintf(fw_name, sizeof(fw_name), "radeon/%s_mc2.bin", chip_name);
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170107/718d2541/attachment.sig>


More information about the amd-gfx mailing list