Displaying 20 results from an estimated 82 matches for "gem_prime_export".
2020 Aug 13
1
[PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...c
> +++ b/drivers/gpu/drm/drm_prime.c
> @@ -386,10 +386,6 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
>
> if (obj->funcs && obj->funcs->export)
> dmabuf = obj->funcs->export(obj, flags);
> - else if (dev->driver->gem_prime_export)
> - dmabuf = dev->driver->gem_prime_export(obj, flags);
> - else
> - dmabuf = drm_gem_prime_export(obj, flags);
> if (IS_ERR(dmabuf)) {
> /* normally the created dma-buf takes ownership of the ref,
> * but if that fails then drop the ref
> @@ -419,7 +415,7 @@...
2020 Aug 13
0
[PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -386,10 +386,6 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
if (obj->funcs && obj->funcs->export)
dmabuf = obj->funcs->export(obj, flags);
- else if (dev->driver->gem_prime_export)
- dmabuf = dev->driver->gem_prime_export(obj, flags);
- else
- dmabuf = drm_gem_prime_export(obj, flags);
if (IS_ERR(dmabuf)) {
/* normally the created dma-buf takes ownership of the ref,
* but if that fails then drop the ref
@@ -419,7 +415,7 @@ static struct dma_buf *export_and_r...
2020 Sep 15
0
[PATCH v2 21/21] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -386,10 +386,6 @@ static struct dma_buf *export_and_register_object(struct drm_device *dev,
if (obj->funcs && obj->funcs->export)
dmabuf = obj->funcs->export(obj, flags);
- else if (dev->driver->gem_prime_export)
- dmabuf = dev->driver->gem_prime_export(obj, flags);
- else
- dmabuf = drm_gem_prime_export(obj, flags);
if (IS_ERR(dmabuf)) {
/* normally the created dma-buf takes ownership of the ref,
* but if that fails then drop the ref
@@ -419,7 +415,7 @@ static struct dma_buf *export_and_r...
2020 Aug 13
28
[PATCH 00/20] Convert all remaining drivers to GEM object functions
The GEM and PRIME related callbacks in struct drm_driver are deprecated in
favor of GEM object functions in struct drm_gem_object_funcs. This patchset
converts the remaining drivers to object functions and removes most of the
obsolete interfaces.
Patches #1 to #18 convert DRM drivers to GEM object functions, one by one.
Each patch moves existing callbacks from struct drm_driver to an instance
of
2020 Sep 23
0
[PATCH v3 07/22] drm/imx/dcss: Initialize DRM driver instance with CMA helper macro
The i.MX DCSS driver uses CMA helpers with default callback functions.
Initialize the driver structure with the rsp CMA helper macro. The
driver is being converted to use GEM object functions as part of
this change.
Two callbacks, .gem_prime_export and .gem_prime_import, were initialized
to their default implementations, so they are just kept empty now.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Reported-by: kernel test robot <lkp at intel.com>
---
drivers/gpu/drm/imx/dcss/dcss-kms.c | 14 +-------------
1 file ch...
2019 Apr 26
3
[PATCH] Revert "drm/qxl: drop prime import/export callbacks"
...pu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -255,10 +255,14 @@ static struct drm_driver qxl_driver = {
#if defined(CONFIG_DEBUG_FS)
.debugfs_init = qxl_debugfs_init,
#endif
+ .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
+ .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_export = drm_gem_prime_export,
.gem_prime_import = drm_gem_prime_import,
.gem_prime_pin = qxl_gem_prime_pin,
.gem_prime_unpin = qxl_gem_prime_unpin,
+ .gem_prime_get_sg_table = qxl_gem_prime_get_sg_table,
+ .gem_prime_import_sg_table = qxl_gem_prime_import_sg_table,
.gem_prime_vmap = qxl_gem_prime...
2019 Apr 26
3
[PATCH] Revert "drm/qxl: drop prime import/export callbacks"
...pu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -255,10 +255,14 @@ static struct drm_driver qxl_driver = {
#if defined(CONFIG_DEBUG_FS)
.debugfs_init = qxl_debugfs_init,
#endif
+ .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
+ .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_export = drm_gem_prime_export,
.gem_prime_import = drm_gem_prime_import,
.gem_prime_pin = qxl_gem_prime_pin,
.gem_prime_unpin = qxl_gem_prime_unpin,
+ .gem_prime_get_sg_table = qxl_gem_prime_get_sg_table,
+ .gem_prime_import_sg_table = qxl_gem_prime_import_sg_table,
.gem_prime_vmap = qxl_gem_prime...
2020 Sep 15
1
[PATCH v2 20/21] drm/xlnx: Initialize DRM driver instance with CMA helper macro
...psub.c
> @@ -80,19 +80,7 @@ static struct drm_driver zynqmp_dpsub_drm_driver = {
> .driver_features = DRIVER_MODESET | DRIVER_GEM |
> DRIVER_ATOMIC,
>
> - .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
> - .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
> - .gem_prime_export = drm_gem_prime_export,
> - .gem_prime_import = drm_gem_prime_import,
> - .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
> - .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
> - .gem_prime_vmap = drm_gem_cma_prime_vmap,
> - .gem_prime_vunmap = drm_gem_...
2020 Aug 13
2
[PATCH 01/20] drm/amdgpu: Introduce GEM object functions
...amdgpu_gem_object_close,
> .dumb_create = amdgpu_mode_dumb_create,
> .dumb_map_offset = amdgpu_mode_dumb_mmap,
> .fops = &amdgpu_driver_kms_fops,
>
> .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
> .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
> - .gem_prime_export = amdgpu_gem_prime_export,
> .gem_prime_import = amdgpu_gem_prime_import,
> - .gem_prime_vmap = amdgpu_gem_prime_vmap,
> - .gem_prime_vunmap = amdgpu_gem_prime_vunmap,
> .gem_prime_mmap = amdgpu_gem_prime_mmap,
>
> .name = DRIVER_NAME,
> diff --git a/drivers/gpu/drm...
2020 Aug 13
1
[PATCH 19/20] drm/xlnx: Initialize DRM driver instance with CMA helper macro
...psub.c
> @@ -80,19 +80,7 @@ static struct drm_driver zynqmp_dpsub_drm_driver = {
> .driver_features = DRIVER_MODESET | DRIVER_GEM |
> DRIVER_ATOMIC,
>
> - .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
> - .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
> - .gem_prime_export = drm_gem_prime_export,
> - .gem_prime_import = drm_gem_prime_import,
> - .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
> - .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
> - .gem_prime_vmap = drm_gem_cma_prime_vmap,
> - .gem_prime_vunmap = drm_gem_...
2020 Sep 15
40
[PATCH v2 00/21] Convert all remaining drivers to GEM object functions
The GEM and PRIME related callbacks in struct drm_driver are deprecated in
favor of GEM object functions in struct drm_gem_object_funcs. This patchset
converts the remaining drivers to object functions and removes most of the
obsolete interfaces.
Patches #1 to #16 and #18 to #19 convert DRM drivers to GEM object functions,
one by one. Each patch moves existing callbacks from struct drm_driver to
2020 Sep 23
25
[PATCH v3 00/22] Convert all remaining drivers to GEM object functions
...ver and in the DRM core/helpers is being removed by patch
#22.
Further testing is welcome. I tested the drivers for which I have HW
available. These are gma500, i915, nouveau, radeon and vc4. The console,
Weston and Xorg apparently work with the patches applied.
v3:
* restore default call to drm_gem_prime_export() in
drm_gem_prime_handle_to_fd()
* return -ENOSYS if get_sg_table is not set
* drop all checks for obj->funcs
* clean up TODO list and documentation
v2:
* moved code in amdgpu and radeon
* made several functions static in various drivers
* updated TODO-list item
* fix virtgpu
Thomas...
2019 Apr 26
1
[PATCH] Revert "drm/qxl: drop prime import/export callbacks"
...tic struct drm_driver qxl_driver = {
>> #if defined(CONFIG_DEBUG_FS)
>> .debugfs_init = qxl_debugfs_init,
>> #endif
>> + .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
>> + .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
>> .gem_prime_export = drm_gem_prime_export,
>> .gem_prime_import = drm_gem_prime_import,
>> .gem_prime_pin = qxl_gem_prime_pin,
>> .gem_prime_unpin = qxl_gem_prime_unpin,
>> + .gem_prime_get_sg_table = qxl_gem_prime_get_sg_table,
>> + .gem_prime_impo...
2019 Apr 26
1
[PATCH] Revert "drm/qxl: drop prime import/export callbacks"
...tic struct drm_driver qxl_driver = {
>> #if defined(CONFIG_DEBUG_FS)
>> .debugfs_init = qxl_debugfs_init,
>> #endif
>> + .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
>> + .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
>> .gem_prime_export = drm_gem_prime_export,
>> .gem_prime_import = drm_gem_prime_import,
>> .gem_prime_pin = qxl_gem_prime_pin,
>> .gem_prime_unpin = qxl_gem_prime_unpin,
>> + .gem_prime_get_sg_table = qxl_gem_prime_get_sg_table,
>> + .gem_prime_impo...
2020 Aug 13
1
[PATCH 06/20] drm/i915: Introduce GEM object functions
...octl_desc i915_ioctls[] = {
> DRM_IOCTL_DEF_DRV(I915_GEM_VM_DESTROY, i915_gem_vm_destroy_ioctl, DRM_RENDER_ALLOW),
> };
>
> +const struct drm_gem_object_funcs i915_gem_object_funcs = {
> + .free = i915_gem_free_object,
> + .close = i915_gem_close_object,
> + .export = i915_gem_prime_export,
> +};
> +
Any reason not to make this static in i915_gem_object.c next to its only
user?
BR,
Jani.
> static struct drm_driver driver = {
> /* Don't use MTRRs here; the Xserver or userspace app should
> * deal with them for Intel hardware.
> @@ -1853,12 +1859,8 @@ st...
2020 Aug 13
2
[PATCH 12/20] drm/radeon: Introduce GEM object functions
...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 *vpos, int *hpos,
> ktime_t *stime, ktime_t *etime,
> @@ -145,14 +138,9 @@ int radeon_mode_dumb_mmap...
2020 Sep 15
1
[PATCH v2 12/21] drm/radeon: Introduce GEM object functions
...rq_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 *vpos, int *hpos,
ktime_t *stime, ktime_t *etime,
@@ -145,14 +138,9 @@ int radeon_mode_dumb_mmap(struct drm_file *filp,
int...
2020 Sep 15
1
[PATCH v2 01/21] drm/amdgpu: Introduce GEM object functions
...amdgpu_gem_object_close,
> .dumb_create = amdgpu_mode_dumb_create,
> .dumb_map_offset = amdgpu_mode_dumb_mmap,
> .fops = &amdgpu_driver_kms_fops,
>
> .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
> .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
> - .gem_prime_export = amdgpu_gem_prime_export,
> .gem_prime_import = amdgpu_gem_prime_import,
> - .gem_prime_vmap = amdgpu_gem_prime_vmap,
> - .gem_prime_vunmap = amdgpu_gem_prime_vunmap,
> .gem_prime_mmap = amdgpu_gem_prime_mmap,
>
> .name = DRIVER_NAME,
> diff --git a/drivers/gpu/drm...
2020 Jan 10
2
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...,
Jani.
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index f7385abdd74b..4a0a7fb85c53 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -2769,8 +2769,7 @@ static struct drm_driver driver = {
> .gem_prime_export = i915_gem_prime_export,
> .gem_prime_import = i915_gem_prime_import,
>
> - .get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
> - .get_scanout_position = i915_get_crtc_scanoutpos,
> + .get_vblank_timestamp = i915_calc_vbltimestamp_from_scanoutpos,
>
> .dumb...
2015 Sep 21
2
[PATCH v2 5/6] virtio-gpu: add basic prime support
...unload = virtio_gpu_driver_unload,
@@ -128,6 +128,17 @@ static struct drm_driver driver = {
.debugfs_init = virtio_gpu_debugfs_init,
.debugfs_cleanup = virtio_gpu_debugfs_takedown,
#endif
+ .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
+ .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
+ .gem_prime_export = drm_gem_prime_export,
+ .gem_prime_import = drm_gem_prime_import,
+ .gem_prime_pin = virtgpu_gem_prime_pin,
+ .gem_prime_unpin = virtgpu_gem_prime_unpin,
+ .gem_prime_get_sg_table = virtgpu_gem_prime_get_sg_table,
+ .gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table,
+ .gem_prime_vmap...