drm/amdgpu: add contiguous flag in ucode bo create
Subsystems (2)
PATCH 1/1 drm/amdgpu: add contiguous flag in ucode bo create
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +2 -1
@@ -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;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1497015752-1327-1-git-send-email-horace.chen-5C7GfCeVMHo@public.gmane.org
Quoted 16 lines · 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 <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/ renamed from drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0
-0
amdgpu/amdgpu_ucode.c
index cd6d3d0..4f50eeb 100644
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c int amdgpu_ucode_init_bo(struct amdgpu_device *adev) · line 382
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0
-0@@ -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,
Horace, I remembered Daniel mentioned SRIOV also can used GTT to store firmwares. You can align with our side here.
But anyway, patch is Reviewed-by: Huang Rui <[email protected]>
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +2
-1- 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;--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Ray,
I have tried to use GTT to store firmware on VF, but the driver failed to load, so I still use VRAM in this change.
Regards,
Horace.
-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Friday, June 09, 2017 9:54 PM
To: Chen, Horace
Cc: Wang@hr-amur2; Wang, Daniel(Xiaowei); [email protected]
Subject: Re: [PATCH] drm/amdgpu: add contiguous flag in ucode bo create
Quoted 20 lines · 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 <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)(quoted diff) +0
-0b/drivers/gpu/drm/amd/
amdgpu/amdgpu_ucode.cindex cd6d3d0..4f50eeb 100644drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0
-0@@ -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) ?
Quoted 2 lines
AMDGPU_GEM_DOMAIN_VRAM
:AMDGPU_GEM_DOMAIN_GTT,
Horace, I remembered Daniel mentioned SRIOV also can used GTT to store firmwares. You can align with our side here.
But anyway, patch is Reviewed-by: Huang Rui <[email protected]>
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +2
-1- 0, NULL, NULL, bo); +AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS , + NULL, NULL, bo);if (err) { dev_err(adev->dev, "(%d) Firmware buffer allocatefailed\n", err); goto failed;--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx