Displaying 13 results from an estimated 13 matches for "handle_count".
2023 Feb 14
3
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -356,52 +356,52 @@ drm_gem_handle_create_tail(struct drm_file *file_priv,
u32 *handlep)
{
struct drm_device *dev = obj->dev;
- u32 handle;
int ret;
WARN_ON(!mutex_is_locked(&dev->object_name_lock));
if (obj->handle_count++ == 0)
drm_gem_object_get(obj);
+ ret = drm_vma_node_allow(&obj->vma_node, file_priv);
+ if (ret)
+ goto err_put;
+
+ if (obj->funcs->open) {
+ ret = obj->funcs->open(obj, file_priv);
+ if (ret)
+ goto err_revoke;
+ }
+
/*
- * Get the user-visible handle using idr....
2023 Feb 14
3
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -356,52 +356,52 @@ drm_gem_handle_create_tail(struct drm_file *file_priv,
u32 *handlep)
{
struct drm_device *dev = obj->dev;
- u32 handle;
int ret;
WARN_ON(!mutex_is_locked(&dev->object_name_lock));
if (obj->handle_count++ == 0)
drm_gem_object_get(obj);
+ ret = drm_vma_node_allow(&obj->vma_node, file_priv);
+ if (ret)
+ goto err_put;
+
+ if (obj->funcs->open) {
+ ret = obj->funcs->open(obj, file_priv);
+ if (ret)
+ goto err_revoke;
+ }
+
/*
- * Get the user-visible handle using idr....
2023 Feb 20
2
[PATCH] drm/gem: Expose the buffer object handle to userspace last
..._tail(struct drm_file
>> *file_priv,
>> ???????????????? u32 *handlep)
>> ? {
>> ????? struct drm_device *dev = obj->dev;
>> -??? u32 handle;
>> ????? int ret;
>> ????? WARN_ON(!mutex_is_locked(&dev->object_name_lock));
>> ????? if (obj->handle_count++ == 0)
>> ????????? drm_gem_object_get(obj);
>> +??? ret = drm_vma_node_allow(&obj->vma_node, file_priv);
>> +??? if (ret)
>> +??????? goto err_put;
>> +
>> +??? if (obj->funcs->open) {
>> +??????? ret = obj->funcs->open(obj, file_priv);...
2023 Feb 20
2
[PATCH] drm/gem: Expose the buffer object handle to userspace last
..._tail(struct drm_file
>> *file_priv,
>> ???????????????? u32 *handlep)
>> ? {
>> ????? struct drm_device *dev = obj->dev;
>> -??? u32 handle;
>> ????? int ret;
>> ????? WARN_ON(!mutex_is_locked(&dev->object_name_lock));
>> ????? if (obj->handle_count++ == 0)
>> ????????? drm_gem_object_get(obj);
>> +??? ret = drm_vma_node_allow(&obj->vma_node, file_priv);
>> +??? if (ret)
>> +??????? goto err_put;
>> +
>> +??? if (obj->funcs->open) {
>> +??????? ret = obj->funcs->open(obj, file_priv);...
2023 Feb 20
1
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...t;>> ???????????????? u32 *handlep)
>>>> ? {
>>>> ????? struct drm_device *dev = obj->dev;
>>>> -??? u32 handle;
>>>> ????? int ret;
>>>> WARN_ON(!mutex_is_locked(&dev->object_name_lock));
>>>> ????? if (obj->handle_count++ == 0)
>>>> ????????? drm_gem_object_get(obj);
>>>> +??? ret = drm_vma_node_allow(&obj->vma_node, file_priv);
>>>> +??? if (ret)
>>>> +??????? goto err_put;
>>>> +
>>>> +??? if (obj->funcs->open) {
>>>>...
2023 Feb 20
1
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...t;>> ???????????????? u32 *handlep)
>>>> ? {
>>>> ????? struct drm_device *dev = obj->dev;
>>>> -??? u32 handle;
>>>> ????? int ret;
>>>> WARN_ON(!mutex_is_locked(&dev->object_name_lock));
>>>> ????? if (obj->handle_count++ == 0)
>>>> ????????? drm_gem_object_get(obj);
>>>> +??? ret = drm_vma_node_allow(&obj->vma_node, file_priv);
>>>> +??? if (ret)
>>>> +??????? goto err_put;
>>>> +
>>>> +??? if (obj->funcs->open) {
>>>>...
2023 Feb 14
0
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...gem.c
> @@ -356,52 +356,52 @@ drm_gem_handle_create_tail(struct drm_file *file_priv,
> u32 *handlep)
> {
> struct drm_device *dev = obj->dev;
> - u32 handle;
> int ret;
>
> WARN_ON(!mutex_is_locked(&dev->object_name_lock));
> if (obj->handle_count++ == 0)
> drm_gem_object_get(obj);
>
> + ret = drm_vma_node_allow(&obj->vma_node, file_priv);
> + if (ret)
> + goto err_put;
> +
> + if (obj->funcs->open) {
> + ret = obj->funcs->open(obj, file_priv);
> + if (ret)
> + goto err_revoke;
>...
2023 Feb 14
0
[Nouveau] [PATCH] drm/gem: Expose the buffer object handle to userspace last
...gem.c
> @@ -356,52 +356,52 @@ drm_gem_handle_create_tail(struct drm_file *file_priv,
> u32 *handlep)
> {
> struct drm_device *dev = obj->dev;
> - u32 handle;
> int ret;
>
> WARN_ON(!mutex_is_locked(&dev->object_name_lock));
> if (obj->handle_count++ == 0)
> drm_gem_object_get(obj);
>
> + ret = drm_vma_node_allow(&obj->vma_node, file_priv);
> + if (ret)
> + goto err_put;
> +
> + if (obj->funcs->open) {
> + ret = obj->funcs->open(obj, file_priv);
> + if (ret)
> + goto err_revoke;
>...
2023 Feb 20
0
[Nouveau] [PATCH] drm/gem: Expose the buffer object handle to userspace last
...;>> *file_priv,
>>> ???????????????? u32 *handlep)
>>> ? {
>>> ????? struct drm_device *dev = obj->dev;
>>> -??? u32 handle;
>>> ????? int ret;
>>> WARN_ON(!mutex_is_locked(&dev->object_name_lock));
>>> ????? if (obj->handle_count++ == 0)
>>> ????????? drm_gem_object_get(obj);
>>> +??? ret = drm_vma_node_allow(&obj->vma_node, file_priv);
>>> +??? if (ret)
>>> +??????? goto err_put;
>>> +
>>> +??? if (obj->funcs->open) {
>>> +??????? ret = obj->fun...
2019 Aug 14
2
[Intel-gfx] [PATCH v6 08/17] drm/ttm: use gem vma_node
.../**
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index afc38cece3f5..0a75d8cf7ac7 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -159,11 +159,13 @@ void drm_gem_private_object_init(struct drm_device *dev,
kref_init(&obj->refcount);
obj->handle_count = 0;
obj->size = size;
- reservation_object_init(&obj->_resv);
if (!obj->resv)
obj->resv = &obj->_resv;
- drm_vma_node_reset(&obj->vma_node);
+ if (!obj->ttm_init) {
+ reservation_object_init(&obj->_resv);
+ drm_vma_node_reset(&obj->vma_node...
2019 Aug 05
2
[PATCH v6 08/17] drm/ttm: use gem vma_node
Drop vma_node from ttm_buffer_object, use the gem struct
(base.vma_node) instead.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
Reviewed-by: Christian K?nig <christian.koenig at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +-
drivers/gpu/drm/qxl/qxl_object.h | 2 +-
drivers/gpu/drm/radeon/radeon_object.h | 2 +-
drivers/gpu/drm/virtio/virtgpu_drv.h
2019 Aug 05
2
[PATCH v6 08/17] drm/ttm: use gem vma_node
Drop vma_node from ttm_buffer_object, use the gem struct
(base.vma_node) instead.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
Reviewed-by: Christian K?nig <christian.koenig at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +-
drivers/gpu/drm/qxl/qxl_object.h | 2 +-
drivers/gpu/drm/radeon/radeon_object.h | 2 +-
drivers/gpu/drm/virtio/virtgpu_drv.h
2019 Aug 05
2
[PATCH v6 08/17] drm/ttm: use gem vma_node
Drop vma_node from ttm_buffer_object, use the gem struct
(base.vma_node) instead.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
Reviewed-by: Christian K?nig <christian.koenig at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +-
drivers/gpu/drm/qxl/qxl_object.h | 2 +-
drivers/gpu/drm/radeon/radeon_object.h | 2 +-
drivers/gpu/drm/virtio/virtgpu_drv.h