Am 09.06.2017 um 12:55 schrieb horchen:
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.c...@amd.com>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
  mode change 100644 => 100755 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c

Please fix your editor and/or environment to avoid mode changes.


diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
old mode 100644
new mode 100755
index cd6d3d0..3b1ee05
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
@@ -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_sriov_vf(adev) ? 
AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS : 0,
+                               NULL, NULL, bo);

You can use the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag unconditionally here. E.g. specifying it when the domain is GTT doesn't hurt us.

Apart from that the patch looks good to me,
Christian.

        if (err) {
                dev_err(adev->dev, "(%d) Firmware buffer allocate failed\n", 
err);
                goto failed;


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to