Displaying 10 results from an estimated 10 matches for "object_idr".
2023 Feb 14
3
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...ng idr. Preload and perform
- * allocation under our spinlock.
+ * Get the user-visible handle using idr as the _last_ step.
+ * Preload and perform allocation under our spinlock.
*/
idr_preload(GFP_KERNEL);
spin_lock(&file_priv->table_lock);
-
ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
-
spin_unlock(&file_priv->table_lock);
idr_preload_end();
- mutex_unlock(&dev->object_name_lock);
if (ret < 0)
- goto err_unref;
-
- handle = ret;
+ goto err_close;
- ret = drm_vma_node_allow(&obj->vma_node, file_priv);
- if (ret)
- goto...
2023 Feb 14
3
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...ng idr. Preload and perform
- * allocation under our spinlock.
+ * Get the user-visible handle using idr as the _last_ step.
+ * Preload and perform allocation under our spinlock.
*/
idr_preload(GFP_KERNEL);
spin_lock(&file_priv->table_lock);
-
ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
-
spin_unlock(&file_priv->table_lock);
idr_preload_end();
- mutex_unlock(&dev->object_name_lock);
if (ret < 0)
- goto err_unref;
-
- handle = ret;
+ goto err_close;
- ret = drm_vma_node_allow(&obj->vma_node, file_priv);
- if (ret)
- goto...
2023 Feb 20
2
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...the user-visible handle using idr as the _last_ step.
>> +???? * Preload and perform allocation under our spinlock.
>> ?????? */
>> ????? idr_preload(GFP_KERNEL);
>> ????? spin_lock(&file_priv->table_lock);
>> -
>> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
>> -
>> ????? spin_unlock(&file_priv->table_lock);
>> ????? idr_preload_end();
>> -??? mutex_unlock(&dev->object_name_lock);
>> ????? if (ret < 0)
>> -??????? goto err_unref;
>> -
>> -??? handle = ret;
>>...
2023 Feb 20
2
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...the user-visible handle using idr as the _last_ step.
>> +???? * Preload and perform allocation under our spinlock.
>> ?????? */
>> ????? idr_preload(GFP_KERNEL);
>> ????? spin_lock(&file_priv->table_lock);
>> -
>> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
>> -
>> ????? spin_unlock(&file_priv->table_lock);
>> ????? idr_preload_end();
>> -??? mutex_unlock(&dev->object_name_lock);
>> ????? if (ret < 0)
>> -??????? goto err_unref;
>> -
>> -??? handle = ret;
>>...
2023 Feb 20
1
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...step.
>>>> +???? * Preload and perform allocation under our spinlock.
>>>> ?????? */
>>>> ????? idr_preload(GFP_KERNEL);
>>>> ????? spin_lock(&file_priv->table_lock);
>>>> -
>>>> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
>>>> -
>>>> ????? spin_unlock(&file_priv->table_lock);
>>>> ????? idr_preload_end();
>>>> -??? mutex_unlock(&dev->object_name_lock);
>>>> ????? if (ret < 0)
>>>> -??????? goto err_unref...
2023 Feb 20
1
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...step.
>>>> +???? * Preload and perform allocation under our spinlock.
>>>> ?????? */
>>>> ????? idr_preload(GFP_KERNEL);
>>>> ????? spin_lock(&file_priv->table_lock);
>>>> -
>>>> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
>>>> -
>>>> ????? spin_unlock(&file_priv->table_lock);
>>>> ????? idr_preload_end();
>>>> -??? mutex_unlock(&dev->object_name_lock);
>>>> ????? if (ret < 0)
>>>> -??????? goto err_unref...
2023 Feb 14
0
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...ation under our spinlock.
> + * Get the user-visible handle using idr as the _last_ step.
> + * Preload and perform allocation under our spinlock.
> */
> idr_preload(GFP_KERNEL);
> spin_lock(&file_priv->table_lock);
> -
> ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
> -
> spin_unlock(&file_priv->table_lock);
> idr_preload_end();
>
> - mutex_unlock(&dev->object_name_lock);
> if (ret < 0)
> - goto err_unref;
> -
> - handle = ret;
> + goto err_close;
>
> - ret = drm_vma...
2023 Feb 14
0
[Nouveau] [PATCH] drm/gem: Expose the buffer object handle to userspace last
...ation under our spinlock.
> + * Get the user-visible handle using idr as the _last_ step.
> + * Preload and perform allocation under our spinlock.
> */
> idr_preload(GFP_KERNEL);
> spin_lock(&file_priv->table_lock);
> -
> ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
> -
> spin_unlock(&file_priv->table_lock);
> idr_preload_end();
>
> - mutex_unlock(&dev->object_name_lock);
> if (ret < 0)
> - goto err_unref;
> -
> - handle = ret;
> + goto err_close;
>
> - ret = drm_vma...
2023 Feb 20
0
[Nouveau] [PATCH] drm/gem: Expose the buffer object handle to userspace last
...using idr as the _last_ step.
>>> +???? * Preload and perform allocation under our spinlock.
>>> ?????? */
>>> ????? idr_preload(GFP_KERNEL);
>>> ????? spin_lock(&file_priv->table_lock);
>>> -
>>> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT);
>>> -
>>> ????? spin_unlock(&file_priv->table_lock);
>>> ????? idr_preload_end();
>>> -??? mutex_unlock(&dev->object_name_lock);
>>> ????? if (ret < 0)
>>> -??????? goto err_unref;
>>> -
>>...
2014 Apr 17
0
[PATCH] drm/nouveau: add some basic debugfs dumping for nouveau's clients and vm mappings
...;base.name);
+
+ if (!cli->base.vm)
+ return 0;
+
+ abi16 = cli->abi16;
+ if (!abi16)
+ return 0;
+
+ filp = abi16->file;
+ dump_channels_abi16(m, drm, cli, abi16);
+
+ seq_printf(m, " gem handles\n");
+ spin_lock(&filp->table_lock);
+ idr_for_each_entry(&filp->object_idr, entry, id) {
+ struct nouveau_bo *nvbo = nouveau_gem_object(entry);
+ struct ttm_buffer_object *bo = &nvbo->bo;
+
+ ttm_bo_reference(&nvbo->bo);
+ spin_unlock(&filp->table_lock);
+
+ ret = ww_mutex_lock_interruptible(&nvbo->bo.resv->lock, NULL);
+ if (ret) {
+...