diff options
author | wentalou <Wentao.Lou@amd.com> | 2019-01-24 11:24:59 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-01-29 15:16:18 -0500 |
commit | cdba61daf55090430a3e1aa495fbbe8f6768af39 (patch) | |
tree | f84fc08c19347ef536262f8fec779a13eda4c6de /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |
parent | drm/amdgpu: csa_vaddr should not larger than AMDGPU_GMC_HOLE_START (diff) | |
download | linux-dev-cdba61daf55090430a3e1aa495fbbe8f6768af39.tar.xz linux-dev-cdba61daf55090430a3e1aa495fbbe8f6768af39.zip |
drm/amdgpu: sriov restrict max_pfn below AMDGPU_GMC_HOLE
sriov need to restrict max_pfn below AMDGPU_GMC_HOLE.
access the hole results in a range fault interrupt IIRC.
Signed-off-by: Wentao Lou <Wentao.Lou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 9c082f9aea1a..600259b4e291 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -965,7 +965,11 @@ static int gmc_v9_0_sw_init(void *handle) * vm size is 256TB (48bit), maximum size of Vega10, * block size 512 (9bit) */ - amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48); + /* sriov restrict max_pfn below AMDGPU_GMC_HOLE */ + if (amdgpu_sriov_vf(adev)) + amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 47); + else + amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48); break; default: break; |