Displaying 20 results from an estimated 492 matches for "drm_gem_object".
2019 Jul 16
1
[PATCH v3 2/3] drm: plumb attaching dev thru to prime_pin/unpin
...rm/drm_gem.c
index 84689ccae885..af2549c45027 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -1215,22 +1215,22 @@ void drm_gem_print_info(struct drm_printer *p, unsigned int indent,
obj->dev->driver->gem_print_info(p, indent, obj);
}
-int drm_gem_pin(struct drm_gem_object *obj)
+int drm_gem_pin(struct drm_gem_object *obj, struct device *dev)
{
if (obj->funcs && obj->funcs->pin)
return obj->funcs->pin(obj);
else if (obj->dev->driver->gem_prime_pin)
- return obj->dev->driver->gem_prime_pin(obj);
+ return obj->dev-&...
2019 Jul 16
1
[PATCH v3 2/3] drm: plumb attaching dev thru to prime_pin/unpin
...rm/drm_gem.c
index 84689ccae885..af2549c45027 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -1215,22 +1215,22 @@ void drm_gem_print_info(struct drm_printer *p, unsigned int indent,
obj->dev->driver->gem_print_info(p, indent, obj);
}
-int drm_gem_pin(struct drm_gem_object *obj)
+int drm_gem_pin(struct drm_gem_object *obj, struct device *dev)
{
if (obj->funcs && obj->funcs->pin)
return obj->funcs->pin(obj);
else if (obj->dev->driver->gem_prime_pin)
- return obj->dev->driver->gem_prime_pin(obj);
+ return obj->dev-&...
2019 Jul 16
1
[PATCH v3 2/3] drm: plumb attaching dev thru to prime_pin/unpin
...rm/drm_gem.c
index 84689ccae885..af2549c45027 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -1215,22 +1215,22 @@ void drm_gem_print_info(struct drm_printer *p, unsigned int indent,
obj->dev->driver->gem_print_info(p, indent, obj);
}
-int drm_gem_pin(struct drm_gem_object *obj)
+int drm_gem_pin(struct drm_gem_object *obj, struct device *dev)
{
if (obj->funcs && obj->funcs->pin)
return obj->funcs->pin(obj);
else if (obj->dev->driver->gem_prime_pin)
- return obj->dev->driver->gem_prime_pin(obj);
+ return obj->dev-&...
2019 Jul 16
1
[PATCH v2 2/3] drm: plumb attaching dev thru to prime_pin/unpin
...gned int indent,
/**
* drm_gem_pin - Pin backing buffer in memory
* @obj: GEM object
+ * @dev: the device the buffer is being pinned for
*
* Make sure the backing buffer is pinned in memory.
*
* Returns:
* 0 on success or a negative error code on failure.
*/
-int drm_gem_pin(struct drm_gem_object *obj)
+int drm_gem_pin(struct drm_gem_object *obj, struct device *dev)
{
if (obj->funcs && obj->funcs->pin)
return obj->funcs->pin(obj);
else if (obj->dev->driver->gem_prime_pin)
- return obj->dev->driver->gem_prime_pin(obj);
+ return obj->dev-&...
2019 Jul 16
1
[PATCH v2 2/3] drm: plumb attaching dev thru to prime_pin/unpin
...gned int indent,
/**
* drm_gem_pin - Pin backing buffer in memory
* @obj: GEM object
+ * @dev: the device the buffer is being pinned for
*
* Make sure the backing buffer is pinned in memory.
*
* Returns:
* 0 on success or a negative error code on failure.
*/
-int drm_gem_pin(struct drm_gem_object *obj)
+int drm_gem_pin(struct drm_gem_object *obj, struct device *dev)
{
if (obj->funcs && obj->funcs->pin)
return obj->funcs->pin(obj);
else if (obj->dev->driver->gem_prime_pin)
- return obj->dev->driver->gem_prime_pin(obj);
+ return obj->dev-&...
2019 Jul 16
1
[PATCH v2 2/3] drm: plumb attaching dev thru to prime_pin/unpin
...gned int indent,
/**
* drm_gem_pin - Pin backing buffer in memory
* @obj: GEM object
+ * @dev: the device the buffer is being pinned for
*
* Make sure the backing buffer is pinned in memory.
*
* Returns:
* 0 on success or a negative error code on failure.
*/
-int drm_gem_pin(struct drm_gem_object *obj)
+int drm_gem_pin(struct drm_gem_object *obj, struct device *dev)
{
if (obj->funcs && obj->funcs->pin)
return obj->funcs->pin(obj);
else if (obj->dev->driver->gem_prime_pin)
- return obj->dev->driver->gem_prime_pin(obj);
+ return obj->dev-&...
2020 Sep 15
1
[PATCH v2 12/21] drm/radeon: Introduce GEM object functions
...+124,6 @@ void radeon_driver_irq_preinstall_kms(struct drm_device *dev);
int radeon_driver_irq_postinstall_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...
2020 Aug 13
2
[PATCH 12/20] drm/radeon: Introduce GEM object functions
...river_irq_preinstall_kms(struct drm_device *dev);
> int radeon_driver_irq_postinstall_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...
2020 Sep 29
0
[PATCH v3 3/7] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...@obj: GEM BO
+ * @map: The virtual address of the mapping.
*
* Sets up an in-kernel virtual mapping of the BO's memory.
*
* Returns:
- * The virtual address of the mapping or an error pointer.
+ * 0 on success, or a negative errno code otherwise.
*/
-void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj)
+int amdgpu_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
{
struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
int ret;
@@ -58,19 +59,20 @@ void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj)
ret = ttm_bo_kmap(&bo->tbo, 0, bo->tbo.num_pages,
&bo...
2020 Sep 15
0
[PATCH v2 12/21] drm/radeon: Introduce GEM object functions
...river_irq_preinstall_kms(struct drm_device *dev);
> int radeon_driver_irq_postinstall_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...
2020 Oct 15
1
[PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...;linux/pci-p2pdma.h>
-/**
- * amdgpu_gem_prime_vmap - &dma_buf_ops.vmap implementation
- * @obj: GEM BO
- *
- * Sets up an in-kernel virtual mapping of the BO's memory.
- *
- * Returns:
- * The virtual address of the mapping or an error pointer.
- */
-void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj)
-{
- struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
- int ret;
-
- ret = ttm_bo_kmap(&bo->tbo, 0, bo->tbo.num_pages,
- &bo->dma_buf_vmap);
- if (ret)
- return ERR_PTR(ret);
-
- return bo->dma_buf_vmap.virtual;
-}
-
-/**
- * amdgpu_gem_prime_vunmap - &dma_buf_ops.vu...
2023 Aug 20
3
[PATCH drm-misc-next 0/3] [RFC] DRM GPUVA Manager GPU-VM features
...make use of the DRM GPUVA managers basic
functionality and opt-in for other features without setting any feature
flags, just by making use of the corresponding functions.
The implementation introduces struct drm_gpuva_gem, which serves as abstraction
combining a struct drm_gpuva_manager and struct drm_gem_object, similar to what
amdgpu does with struct amdgpu_bo_vm. While this adds a bit of complexity it
improves the efficiency of tracking evicted GEM objects. [1] provides an
alternative implementation using a maple_tree, resulting into a fairly simpler
API. [2] points to the full patch series providing th...
2020 Oct 15
0
[PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
...u_gem_prime_vmap - &dma_buf_ops.vmap implementation
> - * @obj: GEM BO
> - *
> - * Sets up an in-kernel virtual mapping of the BO's memory.
> - *
> - * Returns:
> - * The virtual address of the mapping or an error pointer.
> - */
> -void *amdgpu_gem_prime_vmap(struct drm_gem_object *obj)
> -{
> - struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
> - int ret;
> -
> - ret = ttm_bo_kmap(&bo->tbo, 0, bo->tbo.num_pages,
> - &bo->dma_buf_vmap);
> - if (ret)
> - return ERR_PTR(ret);
> -
> - return bo->dma_buf_vmap.virtual;
> -}
&...
2020 Sep 29
14
[PATCH v3 0/7] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update
framebuffer memory. The bochs driver on sparc64 requires the use of
I/O-specific load and store operations. We have a workaround, but need
a long-term solution to the problem.
This patchset changes GEM's vmap/vunmap interfaces to forward pointers
of type struct dma_buf_map and updates the generic fbdev emulation to
use
2020 Sep 29
14
[PATCH v3 0/7] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update
framebuffer memory. The bochs driver on sparc64 requires the use of
I/O-specific load and store operations. We have a workaround, but need
a long-term solution to the problem.
This patchset changes GEM's vmap/vunmap interfaces to forward pointers
of type struct dma_buf_map and updates the generic fbdev emulation to
use
2020 Aug 13
0
[PATCH 12/20] drm/radeon: Introduce GEM object functions
...+124,6 @@ void radeon_driver_irq_preinstall_kms(struct drm_device *dev);
int radeon_driver_irq_postinstall_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...
2020 Aug 13
0
[PATCH 12/20] drm/radeon: Introduce GEM object functions
...struct
>> drm_device *dev);
>> ? int radeon_driver_irq_postinstall_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(...
2020 Aug 13
1
[PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...een deprecated in favor of
> per-instance GEM object functions. Remove the callbacks as they are
> now unused. The only exception is .gem_prime_mmap, which is still
> in use by several drivers.
>
> What is also gone is gem_vm_ops in struct drm_driver. All drivers now
> use struct drm_gem_object_funcs.vm_ops instead.
>
> While at it, the patch also improves error handling around calls
> to .free and .get_sg_table callbacks.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
After this following entry in todo.rst is done?
"
struct drm_gem_object_func...
2015 Sep 21
2
[PATCH v2 5/6] virtio-gpu: add basic prime support
...tgpu_drv.h
@@ -359,6 +359,18 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev,
void virtio_gpu_object_free_sg_table(struct virtio_gpu_object *bo);
int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait);
+/* virtgpu_prime.c */
+int virtgpu_gem_prime_pin(struct drm_gem_object *obj);
+void virtgpu_gem_prime_unpin(struct drm_gem_object *obj);
+struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj);
+struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
+ struct drm_device *dev, struct dma_buf_attachment *attach,
+ struct sg_table *sg...
2015 Sep 21
2
[PATCH v2 5/6] virtio-gpu: add basic prime support
...tgpu_drv.h
@@ -359,6 +359,18 @@ int virtio_gpu_object_get_sg_table(struct virtio_gpu_device *qdev,
void virtio_gpu_object_free_sg_table(struct virtio_gpu_object *bo);
int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait);
+/* virtgpu_prime.c */
+int virtgpu_gem_prime_pin(struct drm_gem_object *obj);
+void virtgpu_gem_prime_unpin(struct drm_gem_object *obj);
+struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj);
+struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
+ struct drm_device *dev, struct dma_buf_attachment *attach,
+ struct sg_table *sg...