[PATCH] drm/amd/powerplay: Fix CZ SMU firmware load check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Tom St Denis
> Sent: Friday, August 26, 2016 10:35 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: StDenis, Tom
> Subject: [PATCH] drm/amd/powerplay: Fix CZ SMU firmware load check
> 
> Remove an errant return in the middle of the check
> function as well as check for success in the start
> function.
> 
> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
> b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
> index 87c023e518ab..654ffcf73769 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c
> @@ -195,9 +195,6 @@ static int cz_check_fw_load_finish(struct pp_smumgr
> *smumgr,
>  	if (smumgr == NULL || smumgr->device == NULL)
>  		return -EINVAL;
> 
> -	return cgs_read_register(smumgr->device,
> -					mmSMU_MP1_SRBM2P_ARG_0);
> -
>  	cgs_write_register(smumgr->device, mmMP0PUB_IND_INDEX,
> index);
> 
>  	for (i = 0; i < smumgr->usec_timeout; i++) {
> @@ -276,7 +273,9 @@ static int cz_start_smu(struct pp_smumgr *smumgr)
>  		fw_to_check &= ~(UCODE_ID_SDMA1_MASK |
> UCODE_ID_CP_MEC_JT2_MASK);
> 
>  	cz_request_smu_load_fw(smumgr);
> -	cz_check_fw_load_finish(smumgr, fw_to_check);
> +	ret = cz_check_fw_load_finish(smumgr, fw_to_check);
> +	if (ret)
> +		printk(KERN_ERR "[ powerplay] SMU firmware load
> failed\n");
> 
>  	ret = cz_load_mec_firmware(smumgr);
>  	if (ret)
> --
> 2.9.2
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux