diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-10-17 05:51:41 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-04 16:41:31 -0500 |
commit | 503846e0836a62f6efd536a4c495917c1a50b345 (patch) | |
tree | 8692a75a86dbae7fdc5a4ad48068201296513663 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |
parent | 13a752e3a246493bfaba0cf0e0f376672ebb734c (diff) |
drm/amdgpu:cleanup ucode_init_bo
1,no sriov check since gpu recover is unified
2,need CPU_ACCESS_REQUIRED flag for VRAM if SRIOV
because otherwise after following PIN the first allocated
VRAM bo is wasted due to some TTM mgr reason.
Signed-off-by: Monk Liu <Monk.Liu@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/amdgpu_ucode.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index edc37cc80644..ab9b2d4461a1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |||
@@ -370,10 +370,10 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev) | |||
370 | return 0; | 370 | return 0; |
371 | } | 371 | } |
372 | 372 | ||
373 | if (!amdgpu_sriov_vf(adev) || !adev->in_gpu_reset) { | 373 | if (!adev->in_gpu_reset) { |
374 | err = amdgpu_bo_create(adev, adev->firmware.fw_size, PAGE_SIZE, true, | 374 | err = amdgpu_bo_create(adev, adev->firmware.fw_size, PAGE_SIZE, true, |
375 | amdgpu_sriov_vf(adev) ? AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT, | 375 | amdgpu_sriov_vf(adev) ? AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT, |
376 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, | 376 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS|AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, |
377 | NULL, NULL, 0, bo); | 377 | NULL, NULL, 0, bo); |
378 | if (err) { | 378 | if (err) { |
379 | dev_err(adev->dev, "(%d) Firmware buffer allocate failed\n", err); | 379 | dev_err(adev->dev, "(%d) Firmware buffer allocate failed\n", err); |