RE: [PATCH] drm/amdgpu: fix pm_load_smu_firmware for SR-IOV

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

 



> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Trigger Huang
> Sent: Tuesday, June 11, 2019 12:09 PM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Liang, Prike <Prike.Liang@xxxxxxx>; Huang, Trigger
> <Trigger.Huang@xxxxxxx>
> Subject: [PATCH] drm/amdgpu: fix pm_load_smu_firmware for SR-IOV
> 
> For SR-IOV VF, powerplay may not be supported, in this case, error '-EINVAL'
> should not be returned.
> 
> Signed-off-by: Trigger Huang <Trigger.Huang@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index 21b5be1..4276d63 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -2709,7 +2709,10 @@ int amdgpu_pm_load_smu_firmware(struct
> amdgpu_device *adev, uint32_t *smu_versio
>  			return r;
>  		}
>  		*smu_version = adev->pm.fw_version;
> +	} else if (amdgpu_sriov_vf(adev)) {
> +		r = 0;

Could you please add the checking at the start of this function:

if (amdgpu_sriov_vf(adev))
	return 0;

The code looks better than adding a "else" here.

With that fixed, please add
Reviewed-by: Huang Rui <ray.huang@xxxxxxx>

>  	}
> +
>  	return r;
>  }
> 
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
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