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(-) mode change 100644 => 100755 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
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_sriov_vf (adev) ?AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS :0 , +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): 1497005748-11979-1-git-send-email-horace.chen-5C7GfCeVMHo@public.gmane.org
Am 09.06.2017 um 12:55 schrieb horchen:
Quoted 10 lines
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(-)mode change 100644 => 100755
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
Please fix your editor and/or environment to avoid mode changes.
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c int amdgpu_ucode_init_bo(struct amdgpu_device *adev) · line 383
Quoted 6 lines
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_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.
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c int amdgpu_ucode_init_bo(struct amdgpu_device *adev) · line 386
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0
-0if (err) {dev_err (adev->dev,"(%d) Firmware buffer allocate failed\n" , err); goto failed;
_______________________________________________
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): f792ff85-5d59-7ddd-f4de-7b10fed0ad40-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Done it, thanks for the review.
Regards,
Horace.
-----Original Message-----
From: Christian König [mailto:[email protected]]
Sent: Friday, June 09, 2017 7:16 PM
To: Chen, Horace; [email protected]
Cc: Huang, Ray
Subject: Re: [PATCH] drm/amdgpu: add contiguous flag in ucode bo create
Am 09.06.2017 um 12:55 schrieb horchen:
Quoted 11 lines
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(-)mode change 100644 => 100755
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
Please fix your editor and/or environment to avoid mode changes.
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c int amdgpu_ucode_init_bo(struct amdgpu_device · line 384
Quoted 7 lines
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_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.
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +0
-0if (err) {dev_err (adev->dev,"(%d) Firmware buffer allocate failed\n" , err);goto failed;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx