[PATCH 2/2] drm/amdgpu: use GTT for uvd_get_create/destory_msg

Christian König christian.koenig at amd.com
Wed Dec 23 08:54:42 UTC 2020


Am 21.12.20 um 10:05 schrieb Chen Li:
> On modern gpus, GTT (system memory) works as well here, and this may
> also be a workaround for platforms which cannot map vram correctly.
>
> Signed-off-by: chenli <chenli at uniontech.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index 8b989670ed66..e2ed4689118a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -1170,7 +1170,7 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
>   	int r, i;
>   
>   	r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
> -				      AMDGPU_GEM_DOMAIN_VRAM,
> +				      AMDGPU_GEM_DOMAIN_GTT,
>   				      &bo, NULL, (void **)&msg);
>   	if (r)
>   		return r;
> @@ -1202,7 +1202,7 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
>   	int r, i;
>   
>   	r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
> -				      AMDGPU_GEM_DOMAIN_VRAM,
> +				      AMDGPU_GEM_DOMAIN_GTT,
>   				      &bo, NULL, (void **)&msg);
>   	if (r)
>   		return r;



More information about the dri-devel mailing list