drm/amdgpu: add contiguous flag in ucode bo create
authorhorchen <horace.chen@amd.com>
Fri, 9 Jun 2017 11:56:48 +0000 (04:56 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Jun 2017 15:50:26 +0000 (11:50 -0400)
Under VF environment, the ucode would be settled to the visible VRAM,
As it would be pinned to the visible VRAM, it's better to add
contiguous flag,otherwise it need to move gpu address during the pin
process. This movement is not necessary.

Signed-off-by: horchen <horace.chen@amd.com>
Reviewed-by: Huang Rui <ray.huang@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 cd6d3d091152e740e0a0b493e080a00938cf8f41..4f50eeb6585534b54a5408360611798ccd2e447f 100644 (file)
@@ -379,7 +379,8 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
 
        err = amdgpu_bo_create(adev, adev->firmware.fw_size, PAGE_SIZE, true,
                                amdgpu_sriov_vf(adev) ? AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT,
-                               0, NULL, NULL, bo);
+                               AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
+                               NULL, NULL, bo);
        if (err) {
                dev_err(adev->dev, "(%d) Firmware buffer allocate failed\n", err);
                goto failed;