search for: bo_ptr

Displaying 20 results from an estimated 56 matches for "bo_ptr".

2020 Sep 29
2
[PATCH v2 4/4] drm/qxl: use qxl pin function
.../drivers/gpu/drm/qxl/qxl_object.c index d3635e3e3267..eb45267d51db 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -145,7 +145,7 @@ int qxl_bo_create(struct qxl_device *qdev, return r; } if (pinned) - ttm_bo_pin(&bo->tbo); + qxl_bo_pin(bo); *bo_ptr = bo; return 0; } -- 2.27.0
2020 Sep 29
2
[PATCH v2 4/4] drm/qxl: use qxl pin function
.../drivers/gpu/drm/qxl/qxl_object.c index d3635e3e3267..eb45267d51db 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -145,7 +145,7 @@ int qxl_bo_create(struct qxl_device *qdev, return r; } if (pinned) - ttm_bo_pin(&bo->tbo); + qxl_bo_pin(bo); *bo_ptr = bo; return 0; } -- 2.27.0
2019 Mar 18
1
[PATCH v3 5/5] drm/virtio: rework resource creation workflow.
...emit(struct virtio_gpu_device *vgdev, @@ -356,7 +365,8 @@ void virtio_gpu_fence_event_process(struct virtio_gpu_device *vdev, /* virtio_gpu_object */ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_params *params, - struct virtio_gpu_object **bo_ptr); + struct virtio_gpu_object **bo_ptr, + struct virtio_gpu_fence *fence); void virtio_gpu_object_kunmap(struct virtio_gpu_object *bo); int virtio_gpu_object_kmap(struct virtio_gpu_object *bo); int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, diff --git a/drivers/g...
2019 Jun 28
1
[PATCH v5 09/12] drm/virtio: rework virtio_gpu_object_create fencing
..._object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 82bfbf983fd2..fa0ea22c68b0 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -97,7 +97,9 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object **bo_ptr, struct virtio_gpu_fence *fence) { + struct virtio_gpu_object_array *objs = NULL; struct virtio_gpu_object *bo; + struct ww_acquire_ctx ticket; size_t acc_size; int ret; @@ -123,12 +125,29 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, } bo->dumb = params-...
2020 Feb 07
1
[PATCH v2 4/4] drm/virtio: move virtio_gpu_mem_entry initialization to new function
...? sg_dma_address(sg) + : sg_phys(sg)); + (*ents)[si].length = cpu_to_le32(sg->length); + (*ents)[si].padding = 0; + } + return 0; +} + int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_params *params, struct virtio_gpu_object **bo_ptr, @@ -129,6 +174,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_array *objs = NULL; struct drm_gem_shmem_object *shmem_obj; struct virtio_gpu_object *bo; + struct virtio_gpu_mem_entry *ents; + unsigned int nents; int ret; *bo_ptr = NULL; @@ -1...
2019 Jun 20
1
[PATCH v4 09/12] drm/virtio: rework virtio_gpu_object_create fencing
..._object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 82bfbf983fd2..90642907aa5c 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -97,6 +97,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object **bo_ptr, struct virtio_gpu_fence *fence) { + struct virtio_gpu_object_array *objs = NULL; struct virtio_gpu_object *bo; size_t acc_size; int ret; @@ -123,10 +124,27 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, } bo->dumb = params->dumb; + if (fence) { + stru...
2018 Dec 19
0
[PATCH 05/10] drm/virtio: use struct to pass params to virtio_gpu_object_create()
...void virtio_gpu_fence_event_process(struct virtio_gpu_device *vdev, /* virtio_gpu_object */ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, - unsigned long size, bool kernel, bool pinned, + struct virtio_gpu_object_params *params, struct virtio_gpu_object **bo_ptr); void virtio_gpu_object_kunmap(struct virtio_gpu_object *bo); int virtio_gpu_object_kmap(struct virtio_gpu_object *bo); diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c index f065863939..384cd80bf3 100644 --- a/drivers/gpu/drm/virtio/virtgpu_gem.c +++ b/dr...
2020 Feb 13
1
[PATCH v3 3/4] drm/virtio: batch resource creation
...s/gpu/drm/virtio/virtgpu_object.c index 8870ee23ff2b..65d6834d3c74 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -224,6 +224,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, return ret; } + virtio_gpu_notify(vgdev); *bo_ptr = bo; return 0; diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 9d4ca0fafa5f..778b7acf2f7f 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -514,7 +514,6 @@ void virtio_gpu_cmd_create_resource(struct virti...
2019 Jun 18
1
[PATCH v2 08/12] drm/virtio: rework virtio_gpu_object_create fencing
...;lock, irq_flags); - if (signaled) - /* virtio create command finished */ - ttm_eu_backoff_reservation(&ticket, &validate_list); } - virtio_gpu_unref_list(&validate_list); + drm_gem_unlock_reservations(&obj, 1, &ticket); + drm_gem_object_put_unlocked(obj); } *bo_ptr = bo; -- 2.18.1
2019 Mar 18
1
[PATCH v3 2/5] drm/virtio: use struct to pass params to virtio_gpu_object_create()
...void virtio_gpu_fence_event_process(struct virtio_gpu_device *vdev, /* virtio_gpu_object */ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, - unsigned long size, bool kernel, bool pinned, + struct virtio_gpu_object_params *params, struct virtio_gpu_object **bo_ptr); void virtio_gpu_object_kunmap(struct virtio_gpu_object *bo); int virtio_gpu_object_kmap(struct virtio_gpu_object *bo); diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c index f06586393974..ffeb734003e4 100644 --- a/drivers/gpu/drm/virtio/virtgpu_gem.c +++...
2020 Aug 13
2
[PATCH 01/20] drm/amdgpu: Introduce GEM object functions
...ime_export, > + .vmap = amdgpu_gem_prime_vmap, > + .vunmap = amdgpu_gem_prime_vunmap, > +}; > + Wrong file, this belongs into amdgpu_gem.c > static int amdgpu_bo_do_create(struct amdgpu_device *adev, > struct amdgpu_bo_param *bp, > struct amdgpu_bo **bo_ptr) > @@ -552,6 +562,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, > bo = kzalloc(sizeof(struct amdgpu_bo), GFP_KERNEL); > if (bo == NULL) > return -ENOMEM; > + > + bo->tbo.base.funcs = &amdgpu_gem_object_funcs; And this should probably go into amd...
2019 Aug 02
0
[PATCH v7 09/18] drm/virtio: rework virtio_gpu_object_create fencing
..._object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 82bfbf983fd2..2902487f051a 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -97,6 +97,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object **bo_ptr, struct virtio_gpu_fence *fence) { + struct virtio_gpu_object_array *objs = NULL; struct virtio_gpu_object *bo; size_t acc_size; int ret; @@ -110,23 +111,34 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, if (bo == NULL) return -ENOMEM; ret = virtio_gpu_resou...
2019 Jul 02
0
[PATCH v6 09/18] drm/virtio: rework virtio_gpu_object_create fencing
..._object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 82bfbf983fd2..2902487f051a 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -97,6 +97,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object **bo_ptr, struct virtio_gpu_fence *fence) { + struct virtio_gpu_object_array *objs = NULL; struct virtio_gpu_object *bo; size_t acc_size; int ret; @@ -110,23 +111,34 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, if (bo == NULL) return -ENOMEM; ret = virtio_gpu_resou...
2020 Feb 05
2
[PATCH 4/4] drm/virtio: move virtio_gpu_mem_entry initialization to new function
...sg_dma_address(sg) + : sg_phys(sg)); + bo->ents[si].length = cpu_to_le32(sg->length); + bo->ents[si].padding = 0; + } + return 0; +} + int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_params *params, struct virtio_gpu_object **bo_ptr, @@ -165,6 +208,12 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, objs, fence); } + ret = virtio_gpu_object_shmem_init(vgdev, bo); + if (ret != 0) { + virtio_gpu_free_object(&shmem_obj->base); + return ret; + } + ret = virtio_gpu_object_attach(vgdev, bo...
2020 Feb 05
2
[PATCH 4/4] drm/virtio: move virtio_gpu_mem_entry initialization to new function
...sg_dma_address(sg) + : sg_phys(sg)); + bo->ents[si].length = cpu_to_le32(sg->length); + bo->ents[si].padding = 0; + } + return 0; +} + int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_params *params, struct virtio_gpu_object **bo_ptr, @@ -165,6 +208,12 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, objs, fence); } + ret = virtio_gpu_object_shmem_init(vgdev, bo); + if (ret != 0) { + virtio_gpu_free_object(&shmem_obj->base); + return ret; + } + ret = virtio_gpu_object_attach(vgdev, bo...
2019 Jun 18
0
[PATCH v2 10/12] drm/virtio: switch from ttm to gem shmem helpers
...vdev, u64 last_seq); /* virtio_gpu_object */ +struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev, + size_t size); int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_params *params, struct virtio_gpu_object **bo_ptr, struct virtio_gpu_fence *fence); -void virtio_gpu_object_kunmap(struct virtio_gpu_object *bo); -int virtio_gpu_object_kmap(struct virtio_gpu_object *bo); -int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, - struct virtio_gpu_object *bo); -void virtio_gpu_object_free...
2019 Jun 19
1
[PATCH v3 11/12] drm/virtio: switch from ttm to gem shmem helpers
...vdev, u64 last_seq); /* virtio_gpu_object */ +struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev, + size_t size); int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, struct virtio_gpu_object_params *params, struct virtio_gpu_object **bo_ptr, struct virtio_gpu_fence *fence); -void virtio_gpu_object_kunmap(struct virtio_gpu_object *bo); -int virtio_gpu_object_kmap(struct virtio_gpu_object *bo); -int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev, - struct virtio_gpu_object *bo); -void virtio_gpu_object_free...
2020 Aug 13
0
[PATCH 01/20] drm/amdgpu: Introduce GEM object functions
...dgpu_gem_object_open, + .close = amdgpu_gem_object_close, + .export = amdgpu_gem_prime_export, + .vmap = amdgpu_gem_prime_vmap, + .vunmap = amdgpu_gem_prime_vunmap, +}; + static int amdgpu_bo_do_create(struct amdgpu_device *adev, struct amdgpu_bo_param *bp, struct amdgpu_bo **bo_ptr) @@ -552,6 +562,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, bo = kzalloc(sizeof(struct amdgpu_bo), GFP_KERNEL); if (bo == NULL) return -ENOMEM; + + bo->tbo.base.funcs = &amdgpu_gem_object_funcs; drm_gem_private_object_init(adev->ddev, &bo->tbo.base, siz...
2020 Feb 14
0
[PATCH v4 4/6] drm/virtio: batch resource creation
...s/gpu/drm/virtio/virtgpu_object.c index 8870ee23ff2b..65d6834d3c74 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -224,6 +224,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, return ret; } + virtio_gpu_notify(vgdev); *bo_ptr = bo; return 0; diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 0bd1c51bbabd..4e9b2f2e71bd 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -515,7 +515,6 @@ void virtio_gpu_cmd_create_resource(struct virti...
2020 Sep 29
0
[PATCH v2 4/4] drm/qxl: use qxl pin function
...just incrementing the pin count alone. It's also I think a bit racy, since ttm_bo_init drops the lock, so someone might have snuck in and evicted the object already. I think what you need is to call ttm_bo_init_reserved, then ttm_bo_pin, then ttm_bo_unreserve, all explicitly. -Daniel > *bo_ptr = bo; > return 0; > } > -- > 2.27.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch