Displaying 20 results from an estimated 379 matches for "file_priv".
2008 Mar 09
0
[PATCH 4/4] nouveau: clean up nouveau_mem_alloc function
...7,13 +567,91 @@ static int nouveau_addmap_agp(struct drm
return nouveau_addmap(dev, block, block->start, type);
}
+static struct mem_block *
+__nouveau_mem_alloc(struct drm_device *dev, int type, struct mem_block *heap,
+ uint64_t size, int alignment, int flags,
+ struct drm_file *file_priv)
+{
+ struct mem_block *block;
+ int err;
+
+ block = nouveau_mem_alloc_block(heap, size, alignment, file_priv);
+ if (!block)
+ return NULL;
+ block->flags = type;
+
+ /*
+ * Does the block need mapping?
+ */
+ if (!(flags & NOUVEAU_MEM_MAPPED))
+ return block;
+
+ switch (type) {
+ ca...
2023 Feb 14
3
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...----------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index aa15c52ae182..e3d897bca0f2 100644
--- a/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 e...
2023 Feb 14
3
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...----------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index aa15c52ae182..e3d897bca0f2 100644
--- a/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 e...
2023 Feb 20
2
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...gt;>
>> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
>> index aa15c52ae182..e3d897bca0f2 100644
>> --- a/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)
>> ????????? dr...
2023 Feb 20
2
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...gt;>
>> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
>> index aa15c52ae182..e3d897bca0f2 100644
>> --- a/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)
>> ????????? dr...
2017 Jul 31
2
[PATCH] Add drm ioctl DRM_IOCTL_MODE_GETFB2 & associated helpers.
...-- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -566,8 +566,9 @@ static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb)
}
static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb,
- struct drm_file *file_priv,
- unsigned int *handle)
+ unsigned int plane_index,
+ struct drm_file *file_priv,
+ unsigned int *handle)
{
struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb);
diff --git a/drivers/gpu/drm/armada/armada_fb.c b/drivers/gpu/drm/armada/armada_fb.c
index 2a7...
2023 Feb 20
1
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...u/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
>>>> index aa15c52ae182..e3d897bca0f2 100644
>>>> --- a/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 (...
2023 Feb 20
1
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...u/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
>>>> index aa15c52ae182..e3d897bca0f2 100644
>>>> --- a/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 (...
2023 Feb 14
0
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...4 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
> index aa15c52ae182..e3d897bca0f2 100644
> --- a/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_no...
2023 Feb 14
0
[Nouveau] [PATCH] drm/gem: Expose the buffer object handle to userspace last
...4 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
> index aa15c52ae182..e3d897bca0f2 100644
> --- a/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_no...
2023 Feb 20
0
[Nouveau] [PATCH] drm/gem: Expose the buffer object handle to userspace last
...f --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
>>> index aa15c52ae182..e3d897bca0f2 100644
>>> --- a/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)...
2020 Sep 15
1
[PATCH v2 12/21] drm/radeon: Introduce GEM object functions
...install_kms(struct drm_device *dev);
void radeon_driver_irq_uninstall_kms(struct drm_device *dev);
irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg);
-void radeon_gem_object_free(struct drm_gem_object *obj);
-int radeon_gem_object_open(struct drm_gem_object *obj,
- struct drm_file *file_priv);
-void radeon_gem_object_close(struct drm_gem_object *obj,
- struct drm_file *file_priv);
-struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
- int flags);
extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
unsigned int flags, int...
2019 Jun 21
0
[PATCH v2 06/18] drm/nouveau: use embedded gem object
...han->ntfy);
- drm_gem_object_put_unlocked(&chan->ntfy->gem);
+ drm_gem_object_put_unlocked(&chan->ntfy->bo.base);
}
if (chan->heap.block_size)
@@ -345,7 +345,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
goto done;
}
- ret = drm_gem_handle_create(file_priv, &chan->ntfy->gem,
+ ret = drm_gem_handle_create(file_priv, &chan->ntfy->bo.base,
&init->notifier_handle);
if (ret)
goto done;
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 34a998012bf6..376215b2206f 100644
--...
2019 Jun 28
0
[PATCH v3 06/18] drm/nouveau: use embedded gem object
...han->ntfy);
- drm_gem_object_put_unlocked(&chan->ntfy->gem);
+ drm_gem_object_put_unlocked(&chan->ntfy->bo.base);
}
if (chan->heap.block_size)
@@ -345,7 +345,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
goto done;
}
- ret = drm_gem_handle_create(file_priv, &chan->ntfy->gem,
+ ret = drm_gem_handle_create(file_priv, &chan->ntfy->bo.base,
&init->notifier_handle);
if (ret)
goto done;
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 6f1217b3e6b9..abbbabd12241 100644
--...
2019 Aug 02
0
[PATCH v4 06/17] drm/nouveau: use embedded gem object
...han->ntfy);
- drm_gem_object_put_unlocked(&chan->ntfy->gem);
+ drm_gem_object_put_unlocked(&chan->ntfy->bo.base);
}
if (chan->heap.block_size)
@@ -339,7 +339,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
goto done;
}
- ret = drm_gem_handle_create(file_priv, &chan->ntfy->gem,
+ ret = drm_gem_handle_create(file_priv, &chan->ntfy->bo.base,
&init->notifier_handle);
if (ret)
goto done;
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 6f1217b3e6b9..abbbabd12241 100644
--...
2019 Aug 05
0
[PATCH v5 06/18] drm/nouveau: use embedded gem object
...han->ntfy);
- drm_gem_object_put_unlocked(&chan->ntfy->gem);
+ drm_gem_object_put_unlocked(&chan->ntfy->bo.base);
}
if (chan->heap.block_size)
@@ -339,7 +339,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
goto done;
}
- ret = drm_gem_handle_create(file_priv, &chan->ntfy->gem,
+ ret = drm_gem_handle_create(file_priv, &chan->ntfy->bo.base,
&init->notifier_handle);
if (ret)
goto done;
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 6f1217b3e6b9..abbbabd12241 100644
--...
2019 Aug 05
0
[PATCH v6 06/17] drm/nouveau: use embedded gem object
...han->ntfy);
- drm_gem_object_put_unlocked(&chan->ntfy->gem);
+ drm_gem_object_put_unlocked(&chan->ntfy->bo.base);
}
if (chan->heap.block_size)
@@ -339,7 +339,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
goto done;
}
- ret = drm_gem_handle_create(file_priv, &chan->ntfy->gem,
+ ret = drm_gem_handle_create(file_priv, &chan->ntfy->bo.base,
&init->notifier_handle);
if (ret)
goto done;
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 6f1217b3e6b9..abbbabd12241 100644
--...
2020 Aug 13
2
[PATCH 12/20] drm/radeon: Introduce GEM object functions
...ce *dev);
> void radeon_driver_irq_uninstall_kms(struct drm_device *dev);
> irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg);
> -void radeon_gem_object_free(struct drm_gem_object *obj);
> -int radeon_gem_object_open(struct drm_gem_object *obj,
> - struct drm_file *file_priv);
> -void radeon_gem_object_close(struct drm_gem_object *obj,
> - struct drm_file *file_priv);
> -struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj,
> - int flags);
> extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
>...
2020 Sep 15
1
[PATCH v2 01/21] drm/amdgpu: Introduce GEM object functions
...eturn 0;
> }
> @@ -119,8 +123,8 @@ void amdgpu_gem_force_release(struct amdgpu_device *adev)
> * Call from drm_gem_handle_create which appear in both new and open ioctl
> * case.
> */
> -int amdgpu_gem_object_open(struct drm_gem_object *obj,
> - struct drm_file *file_priv)
> +static int amdgpu_gem_object_open(struct drm_gem_object *obj,
> + struct drm_file *file_priv)
> {
> struct amdgpu_bo *abo = gem_to_amdgpu_bo(obj);
> struct amdgpu_device *adev = amdgpu_ttm_adev(abo->tbo.bdev);
> @@ -152,8 +156,8 @@ int amdgpu_gem_object_open(st...
2019 Aug 21
2
[PATCH 2/3] drm/nouveau: slowpath for pushbuf ioctl
...iff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index c77302f969e8..60309b997951 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -482,12 +482,9 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
static int
validate_list(struct nouveau_channel *chan, struct nouveau_cli *cli,
- struct list_head *list, struct drm_nouveau_gem_pushbuf_bo *pbbo,
- uint64_t user_pbbo_ptr)
+ struct list_head *list, struct drm_nouveau_gem_pushbuf_bo *pbbo)
{
struct nouveau_drm *drm = chan-...