drm/amdgpu: use drm_gem_private_object_init
Subsystems (2)
PATCH 1/2 drm/amdgpu: use drm_gem_private_object_init
We use our own backing store and don't need the shmem file.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -5
@@ -371,11 +371,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo =kzalloc (sizeof (struct amdgpu_bo ),GFP_KERNEL );if (bo ==NULL )return -ENOMEM ; - r =drm_gem_object_init (adev->ddev, &bo->gem_base, size); -if (unlikely (r)) { -kfree (bo); -return r; - } +drm_gem_private_object_init (adev->ddev, &bo->gem_base, size);INIT_LIST_HEAD (&bo->shadow_list);INIT_LIST_HEAD (&bo->va); bo->preferred_domains = domain & (AMDGPU_GEM_DOMAIN_VRAM |
Signature · 6 lines
2.14.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): 20180216092635.64271-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/radeon: use drm_gem_private_object_init
We use our own backing store and don't need the shmem file.
--- drivers/gpu/drm/radeon/radeon_object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/radeon/radeon_object.c +1 -5
@@ -204,11 +204,7 @@ int radeon_bo_create(struct radeon_device *rdev, bo =kzalloc (sizeof (struct radeon_bo ),GFP_KERNEL );if (bo ==NULL )return -ENOMEM ; - r =drm_gem_object_init (rdev->ddev, &bo->gem_base, size); -if (unlikely (r)) { -kfree (bo); -return r; - } +drm_gem_private_object_init (rdev->ddev, &bo->gem_base, size); bo->rdev = rdev; bo->surface_reg =-1 ;INIT_LIST_HEAD (&bo->list);
Signature · 6 lines
2.14.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 3 lines · Christian König
We use our own backing store and don't need the shmem file.
Signed-off-by Christian König <[email protected]>
I thought ttm swaps to the shmem when under memory pressure. Or does it allocate it's own shmem file for that?
-Daniel
Quoted 28 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1
-5@@ -371,11 +371,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo =kzalloc (sizeof (struct amdgpu_bo ),GFP_KERNEL );if (bo ==NULL )return -ENOMEM ; - r =drm_gem_object_init (adev->ddev, &bo->gem_base, size); -if (unlikely (r)) { -kfree (bo); -return r; - } +drm_gem_private_object_init (adev->ddev, &bo->gem_base, size);INIT_LIST_HEAD (&bo->shadow_list);INIT_LIST_HEAD (&bo->va); bo->preferred_domains = domain & (AMDGPU_GEM_DOMAIN_VRAM |Signature · 6 lines
2.14.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 19.02.2018 um 16:32 schrieb Daniel Vetter:
Quoted 6 lines · Christian König
Quoted 3 lines
We use our own backing store and don't need the shmem file.
Signed-off-by Christian König <[email protected]>I thought ttm swaps to the shmem when under memory pressure. Or does it allocate it's own shmem file for that?
It allocates a separate shmem file for that.
Christian.
Quoted 26 lines
-Daniel
Quoted 24 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1
-5@@ -371,11 +371,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo =kzalloc (sizeof (struct amdgpu_bo ),GFP_KERNEL );if (bo ==NULL )return -ENOMEM ; - r =drm_gem_object_init (adev->ddev, &bo->gem_base, size); -if (unlikely (r)) { -kfree (bo); -return r; - } +drm_gem_private_object_init (adev->ddev, &bo->gem_base, size);INIT_LIST_HEAD (&bo->shadow_list);INIT_LIST_HEAD (&bo->va); bo->preferred_domains = domain & (AMDGPU_GEM_DOMAIN_VRAM |Signature · 1 line
2.14.1
Quoted 4 lines
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): 998b0171-35c3-31fd-52ab-3f730b40187f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 9 lines · Christian König
Am 19.02.2018 um 16:32 schrieb Daniel Vetter:
Quoted 6 lines · Christian König
Quoted 3 lines
We use our own backing store and don't need the shmem file.
Signed-off-by Christian König <[email protected]>I thought ttm swaps to the shmem when under memory pressure. Or does it allocate it's own shmem file for that?
It allocates a separate shmem file for that.
fwiw Acked-by: Daniel Vetter <[email protected]> on both. -Daniel
Quoted 34 lines
Christian.
Quoted 30 lines
-Daniel
Quoted 28 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1
-5@@ -371,11 +371,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo =kzalloc (sizeof (struct amdgpu_bo ),GFP_KERNEL );if (bo ==NULL )return -ENOMEM ; - r =drm_gem_object_init (adev->ddev, &bo->gem_base, size); -if (unlikely (r)) { -kfree (bo); -return r; - } +drm_gem_private_object_init (adev->ddev, &bo->gem_base, size);INIT_LIST_HEAD (&bo->shadow_list);INIT_LIST_HEAD (&bo->va); bo->preferred_domains = domain & (AMDGPU_GEM_DOMAIN_VRAM |Signature · 6 lines
2.14.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx