diff options
author | Frank.Min <Frank.Min@amd.com> | 2019-08-21 17:20:34 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-08-22 17:15:06 -0500 |
commit | 81c274c473a25e7e86540cdeaa181421e7daafff (patch) | |
tree | 27bcf741979c35a947ae5d546a71528befe4f410 /drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | |
parent | c4e1da5e7d5fd32d00628ed0afd190e5cf891567 (diff) | |
download | lwn-81c274c473a25e7e86540cdeaa181421e7daafff.tar.gz lwn-81c274c473a25e7e86540cdeaa181421e7daafff.zip |
drm/amdgpu: disable agp for sriov
Since agp is not used for sriov, just disable it
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Frank.Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index 924d83e711ef..5790db61fa2c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c @@ -220,6 +220,14 @@ void amdgpu_gmc_agp_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc) const uint64_t sixteen_gb_mask = ~(sixteen_gb - 1); u64 size_af, size_bf; + if (amdgpu_sriov_vf(adev)) { + mc->agp_start = 0xffffffff; + mc->agp_end = 0x0; + mc->agp_size = 0; + + return; + } + if (mc->fb_start > mc->gart_start) { size_bf = (mc->fb_start & sixteen_gb_mask) - ALIGN(mc->gart_end + 1, sixteen_gb); |