search for: virtio_gpu_init_ttm_placement

Displaying 20 results from an estimated 36 matches for "virtio_gpu_init_ttm_placement".

2019 Jun 17
2
[PATCH 1/4] drm/virtio: pass gem reservation object to ttm init
...a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will cal...
2019 Jun 17
2
[PATCH 1/4] drm/virtio: pass gem reservation object to ttm init
...a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will cal...
2019 Mar 18
1
[PATCH v3 2/5] drm/virtio: use struct to pass params to virtio_gpu_object_create()
...ect.c b/drivers/gpu/drm/virtio/virtgpu_object.c index e7e946035027..538b93417f70 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -74,39 +74,33 @@ static void virtio_gpu_ttm_bo_destroy(struct ttm_buffer_object *tbo) kfree(bo); } -static void virtio_gpu_init_ttm_placement(struct virtio_gpu_object *vgbo, - bool pinned) +static void virtio_gpu_init_ttm_placement(struct virtio_gpu_object *vgbo) { u32 c = 1; - u32 pflag = pinned ? TTM_PL_FLAG_NO_EVICT : 0; vgbo->placement.placement = &vgbo->placement_code; vgbo->placement.busy_placement = &am...
2018 Dec 19
0
[PATCH 05/10] drm/virtio: use struct to pass params to virtio_gpu_object_create()
...R_ERR(qobj); obj = &qobj->gem_base; diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index f39a183d59..62367e3f80 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -79,21 +79,16 @@ static void virtio_gpu_init_ttm_placement(struct virtio_gpu_object *vgbo, } 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) { struct virtio_gpu_object *bo; - enum ttm_bo_t...
2019 Jun 28
1
[PATCH v5 09/12] drm/virtio: rework virtio_gpu_object_create fencing
...ate_3d(vgdev, bo, params, + objs, fence); } else { - virtio_gpu_cmd_create_resource(vgdev, bo, params, fence); + virtio_gpu_cmd_create_resource(vgdev, bo, params, + objs, fence); } + if (fence) + drm_gem_unlock_reservations(objs->objs, objs->nents, &ticket); + virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, @@ -139,38 +158,6 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, if (ret != 0) return ret; - if (fence) { - struct virtio_gpu_fence_driv...
2019 Jun 20
1
[PATCH v4 09/12] drm/virtio: rework virtio_gpu_object_create fencing
...virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, fence); + virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, + fence, objs); } else { - virtio_gpu_cmd_create_resource(vgdev, bo, params, fence); + virtio_gpu_cmd_create_resource(vgdev, bo, params, + fence, objs); } virtio_gpu_init_ttm_placement(bo); @@ -139,38 +157,6 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, if (ret != 0) return ret; - if (fence) { - struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; - struct list_head validate_list; - struct ttm_validate_buffer mainbuf; - struct ww_acquire_c...
2017 Apr 06
0
[PATCH] drm/virtio: don't leak bo on drm_gem_object_init failure
...@@ -81,8 +81,10 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, return -ENOMEM; size = roundup(size, PAGE_SIZE); ret = drm_gem_object_init(vgdev->ddev, &bo->gem_base, size); - if (ret != 0) + if (ret != 0) { + kfree(bo); return ret; + } bo->dumb = false; virtio_gpu_init_ttm_placement(bo, pinned); -- 2.9.3
2019 Jun 17
0
[PATCH 1/4] drm/virtio: pass gem reservation object to ttm init
...virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c > index b2da31310d24..242766d644a7 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_object.c > +++ b/drivers/gpu/drm/virtio/virtgpu_object.c > @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, > virtio_gpu_init_ttm_placement(bo); > ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, > ttm_bo_type_device, &bo->placement, 0, > - true, acc_size, NULL, NULL, > + true, acc_size, NULL, > + bo->gem_base.resv, > &virtio_gpu_ttm_bo_destroy); &gt...
2019 Jun 18
0
[PATCH v2 01/12] drm/virtio: pass gem reservation object to ttm init
...a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will cal...
2019 Jun 19
0
[PATCH v3 02/12] drm/virtio: pass gem reservation object to ttm init
...a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will cal...
2019 Jun 20
0
[PATCH v4 01/12] drm/virtio: pass gem reservation object to ttm init
...a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will cal...
2019 Jun 28
0
[PATCH v5 01/12] drm/virtio: pass gem reservation object to ttm init
...a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will cal...
2019 Jul 02
0
[PATCH v6 01/18] drm/virtio: pass gem reservation object to ttm init
...a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will cal...
2019 Aug 02
0
[PATCH v7 01/18] drm/virtio: pass gem reservation object to ttm init
...a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index b2da31310d24..242766d644a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -132,7 +132,8 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, virtio_gpu_init_ttm_placement(bo); ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, - true, acc_size, NULL, NULL, + true, acc_size, NULL, + bo->gem_base.resv, &virtio_gpu_ttm_bo_destroy); /* ttm_bo_init failure will cal...
2017 Apr 06
0
[PATCH] drm/virtio: don't leak bo on drm_gem_object_init failure
...@@ -81,8 +81,10 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, return -ENOMEM; size = roundup(size, PAGE_SIZE); ret = drm_gem_object_init(vgdev->ddev, &bo->gem_base, size); - if (ret != 0) + if (ret != 0) { + kfree(bo); return ret; + } bo->dumb = false; virtio_gpu_init_ttm_placement(bo, pinned); -- 2.9.3
2018 Dec 19
0
[PATCH 09/10] drm/virtio: move virtio_gpu_cmd_create_resource call into virtio_gpu_object_create
...o_gpu_object_create(struct virtio_gpu_device *vgdev, kfree(bo); return ret; } - bo->dumb = false; + bo->dumb = params->dumb; + + if (params->virgl) { + virtio_gpu_cmd_resource_create_3d(vgdev, bo, params); + } else { + virtio_gpu_cmd_create_resource(vgdev, bo, params); + } + virtio_gpu_init_ttm_placement(bo, params->pinned); - ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, params->size, ttm_bo_type_device, &bo->placement, 0, true, acc_size, NULL, NULL, -- 2.9.3
2019 Mar 18
1
[PATCH v3 5/5] drm/virtio: rework resource creation workflow.
...io/virtgpu_object.c @@ -23,6 +23,8 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <drm/ttm/ttm_execbuf_util.h> + #include "virtgpu_drv.h" static int virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev, @@ -92,7 +94,8 @@ static void virtio_gpu_init_ttm_placement(struct virtio_gpu_object *vgbo) 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) { struct virtio_gpu_...
2019 Jun 19
1
[PATCH v3 11/12] drm/virtio: switch from ttm to gem shmem helpers
..._res_handle); - if (bo->pages) - virtio_gpu_object_free_sg_table(bo); - if (bo->vmap) - virtio_gpu_object_kunmap(bo); - drm_gem_object_release(&bo->gem_base); virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle); - kfree(bo); + + drm_gem_shmem_free_object(obj); } -static void virtio_gpu_init_ttm_placement(struct virtio_gpu_object *vgbo) +static const struct drm_gem_object_funcs v3d_gem_funcs = { + .free = virtio_gpu_free_object, + .open = virtio_gpu_gem_object_open, + .close = virtio_gpu_gem_object_close, + + .print_info = drm_gem_shmem_print_info, + .pin = drm_gem_shmem_pin, + .unpin = drm_gem_shme...
2019 Jun 19
0
[PATCH v3 09/12] drm/virtio: rework virtio_gpu_object_create fencing
...virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, fence); + virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, + fence, objs); } else { - virtio_gpu_cmd_create_resource(vgdev, bo, params, fence); + virtio_gpu_cmd_create_resource(vgdev, bo, params, + fence, objs); } virtio_gpu_init_ttm_placement(bo); @@ -139,38 +157,6 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, if (ret != 0) return ret; - if (fence) { - struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; - struct list_head validate_list; - struct ttm_validate_buffer mainbuf; - struct ww_acquire_c...
2019 Aug 02
0
[PATCH v7 09/18] drm/virtio: rework virtio_gpu_object_create fencing
...virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, fence); + virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, + objs, fence); } else { - virtio_gpu_cmd_create_resource(vgdev, bo, params, fence); + virtio_gpu_cmd_create_resource(vgdev, bo, params, + objs, fence); } virtio_gpu_init_ttm_placement(bo); @@ -139,40 +151,16 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, if (ret != 0) return ret; - if (fence) { - struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; - struct list_head validate_list; - struct ttm_validate_buffer mainbuf; - struct ww_acquire_...