[PATCH] drm/amdgpu: add contiguous flag in ucode bo create
Huang Rui
ray.huang at amd.com
Fri Jun 9 13:54:13 UTC 2017
On Fri, Jun 09, 2017 at 09:42:32PM +0800, horchen wrote:
> 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 at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/
> amdgpu/amdgpu_ucode.c
> index cd6d3d0..4f50eeb 100644
> --- 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,
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 <ray.huang at amd.com>
> - 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
>
More information about the amd-gfx
mailing list