mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 23:05:25 -04:00
drm/amdgpu: switch to cached fw flags for mem training cap
Check cached firmware_flags to determin whether two stage mem training is supported or not. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: John Clements <john.clements@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
698b101086
commit
82a5203016
@@ -1583,11 +1583,8 @@ static int amdgpu_ttm_reserve_tmr(struct amdgpu_device *adev)
|
||||
bool mem_train_support = false;
|
||||
|
||||
if (!amdgpu_sriov_vf(adev)) {
|
||||
ret = amdgpu_mem_train_support(adev);
|
||||
if (ret == 1)
|
||||
if (amdgpu_atomfirmware_mem_training_supported(adev))
|
||||
mem_train_support = true;
|
||||
else if (ret == -1)
|
||||
return -EINVAL;
|
||||
else
|
||||
DRM_DEBUG("memory training does not support!\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user