]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu:cleanup ucode_init_bo
authorMonk Liu <Monk.Liu@amd.com>
Tue, 17 Oct 2017 09:51:41 +0000 (17:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:41:31 +0000 (16:41 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c

index edc37cc806448bd1c7022a04b028db499de3c0be..ab9b2d4461a13582ceebc5496d69784f2ad29929 100644 (file)
@@ -370,10 +370,10 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
                return 0;
        }
 
-       if (!amdgpu_sriov_vf(adev) || !adev->in_gpu_reset) {
+       if (!adev->in_gpu_reset) {
                err = amdgpu_bo_create(adev, adev->firmware.fw_size, PAGE_SIZE, true,
                                        amdgpu_sriov_vf(adev) ? AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT,
-                                       AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
+                                       AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS|AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,
                                        NULL, NULL, 0, bo);
                if (err) {
                        dev_err(adev->dev, "(%d) Firmware buffer allocate failed\n", err);