[PATCH] drm/amd/powerplay: skip enable mgpu fan boost in SRIOV
Yin, ZhenGuo (Chris)
zhengyin at amd.com
Wed Sep 25 06:15:16 UTC 2024
On 9/24/2024 8:24 PM, Lazar, Lijo wrote:
>
> On 9/24/2024 9:10 AM, ZhenGuo Yin wrote:
>> SMU_MSG_SetMGpuFanBoostLimitRpm is unsupported for VF,
>> skip enabling mgpu fan boost in SRIOV.
>>
>> Signed-off-by: ZhenGuo Yin <zhenguo.yin at amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index dee57f15719e..49f320fc974a 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -3178,7 +3178,7 @@ static int amdgpu_device_enable_mgpu_fan_boost(void)
>> for (i = 0; i < mgpu_info.num_dgpu; i++) {
>> gpu_ins = &(mgpu_info.gpu_ins[i]);
>> adev = gpu_ins->adev;
>> - if (!(adev->flags & AMD_IS_APU) &&
>> + if (!(adev->flags & AMD_IS_APU) && !amdgpu_sriov_vf(adev) &&
>> !gpu_ins->mgpu_fan_enabled) {
>> ret = amdgpu_dpm_enable_mgpu_fan_boost(adev);
> Better to move the fix inside amdgpu_dpm_enable_mgpu_fan_boost() so that
> any other call to this coming from some other piece of code also doesn't
> do anything for this.
>
> Thanks,
> Lijo
If we move the fix inside, the driver will either break and report an
error message or set gpu_ins->mgpu_fan_enabled to 1.
I believe we should avoid both scenarios.
ret = amdgpu_dpm_enable_mgpu_fan_boost(adev);
if (ret)
break;
gpu_ins->mgpu_fan_enabled = 1;
>> if (ret)
More information about the amd-gfx
mailing list