search for: drm_gem_vm_close

Displaying 20 results from an estimated 25 matches for "drm_gem_vm_close".

2020 Sep 16
2
[PATCH v2 04/21] drm/exynos: Introduce GEM object functions
...exynos/exynos_drm_drv.c > @@ -75,11 +75,6 @@ static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) > file->driver_priv = NULL; > } > > -static const struct vm_operations_struct exynos_drm_gem_vm_ops = { > - .open = drm_gem_vm_open, > - .close = drm_gem_vm_close, > -}; > - > static const struct drm_ioctl_desc exynos_ioctls[] = { > DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl, > DRM_RENDER_ALLOW), > @@ -124,16 +119,11 @@ static struct drm_driver exynos_drm_driver = { > .open = exynos_drm_open, > .last...
2020 Sep 23
1
[PATCH v3 03/22] drm/etnaviv: Introduce GEM object functions
...ivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -468,12 +468,6 @@ static const struct drm_ioctl_desc etnaviv_ioctls[] = { ETNA_IOCTL(PM_QUERY_SIG, pm_query_sig, DRM_RENDER_ALLOW), }; -static const struct vm_operations_struct vm_ops = { - .fault = etnaviv_gem_fault, - .open = drm_gem_vm_open, - .close = drm_gem_vm_close, -}; - static const struct file_operations fops = { .owner = THIS_MODULE, .open = drm_open, @@ -490,16 +484,9 @@ static struct drm_driver etnaviv_drm_driver = { .driver_features = DRIVER_GEM | DRIVER_RENDER, .open = etnaviv_open, .postclose...
2020 Aug 13
1
[PATCH 18/20] drm/xen: Introduce GEM object functions
...int idx; > @@ -481,22 +481,12 @@ static const struct file_operations xen_drm_dev_fops = { > .mmap = xen_drm_front_gem_mmap, > }; > > -static const struct vm_operations_struct xen_drm_drv_vm_ops = { > - .open = drm_gem_vm_open, > - .close = drm_gem_vm_close, > -}; > - > static struct drm_driver xen_drm_driver = { > .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, > .release = xen_drm_drv_release, > - .gem_vm_ops = &xen_drm_drv_vm_ops, > - .gem_free_object_unlock...
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 15
0
[PATCH v2 04/21] drm/exynos: Introduce GEM object functions
...os_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -75,11 +75,6 @@ static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) file->driver_priv = NULL; } -static const struct vm_operations_struct exynos_drm_gem_vm_ops = { - .open = drm_gem_vm_open, - .close = drm_gem_vm_close, -}; - static const struct drm_ioctl_desc exynos_ioctls[] = { DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl, DRM_RENDER_ALLOW), @@ -124,16 +119,11 @@ static struct drm_driver exynos_drm_driver = { .open = exynos_drm_open, .lastclose = drm_fb_helper_lastclose, .pos...
2020 Sep 15
0
[PATCH v2 18/21] drm/vkms: Introduce GEM object functions
...rs/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -51,12 +51,6 @@ static const struct file_operations vkms_driver_fops = { .release = drm_release, }; -static const struct vm_operations_struct vkms_gem_vm_ops = { - .fault = vkms_gem_fault, - .open = drm_gem_vm_open, - .close = drm_gem_vm_close, -}; - static void vkms_release(struct drm_device *dev) { struct vkms_device *vkms = container_of(dev, struct vkms_device, drm); @@ -98,8 +92,6 @@ static struct drm_driver vkms_driver = { .release = vkms_release, .fops = &vkms_driver_fops, .dumb_create = vkms_dumb_create, - .gem_v...
2020 Aug 13
0
[PATCH 18/20] drm/xen: Introduce GEM object functions
...m_info = obj->dev->dev_private; int idx; @@ -481,22 +481,12 @@ static const struct file_operations xen_drm_dev_fops = { .mmap = xen_drm_front_gem_mmap, }; -static const struct vm_operations_struct xen_drm_drv_vm_ops = { - .open = drm_gem_vm_open, - .close = drm_gem_vm_close, -}; - static struct drm_driver xen_drm_driver = { .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, .release = xen_drm_drv_release, - .gem_vm_ops = &xen_drm_drv_vm_ops, - .gem_free_object_unlocked = xen_drm_drv_free_object_unlocked...
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 Aug 13
0
[PATCH 10/20] drm/omapdrm: Introduce GEM object functions
...gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -521,12 +521,6 @@ static int dev_open(struct drm_device *dev, struct drm_file *file) return 0; } -static const struct vm_operations_struct omap_gem_vm_ops = { - .fault = omap_gem_fault, - .open = drm_gem_vm_open, - .close = drm_gem_vm_close, -}; - static const struct file_operations omapdriver_fops = { .owner = THIS_MODULE, .open = drm_open, @@ -549,10 +543,7 @@ static struct drm_driver omap_drm_driver = { #endif .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_...
2020 Sep 15
0
[PATCH v2 08/21] drm/msm: Introduce GEM object funcs
...sm/msm_drv.c @@ -978,12 +978,6 @@ static const struct drm_ioctl_desc msm_ioctls[] = { DRM_IOCTL_DEF_DRV(MSM_SUBMITQUEUE_QUERY, msm_ioctl_submitqueue_query, DRM_RENDER_ALLOW), }; -static const struct vm_operations_struct vm_ops = { - .fault = msm_gem_fault, - .open = drm_gem_vm_open, - .close = drm_gem_vm_close, -}; - static const struct file_operations fops = { .owner = THIS_MODULE, .open = drm_open, @@ -1009,18 +1003,11 @@ static struct drm_driver msm_driver = { .irq_preinstall = msm_irq_preinstall, .irq_postinstall = msm_irq_postinstall, .irq_uninstall...
2020 Sep 15
0
[PATCH v2 03/21] drm/etnaviv: Introduce GEM object functions
...ivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -468,12 +468,6 @@ static const struct drm_ioctl_desc etnaviv_ioctls[] = { ETNA_IOCTL(PM_QUERY_SIG, pm_query_sig, DRM_RENDER_ALLOW), }; -static const struct vm_operations_struct vm_ops = { - .fault = etnaviv_gem_fault, - .open = drm_gem_vm_open, - .close = drm_gem_vm_close, -}; - static const struct file_operations fops = { .owner = THIS_MODULE, .open = drm_open, @@ -490,16 +484,9 @@ static struct drm_driver etnaviv_drm_driver = { .driver_features = DRIVER_GEM | DRIVER_RENDER, .open = etnaviv_open, .postclose...
2020 Sep 16
0
[PATCH v2 04/21] drm/exynos: Introduce GEM object functions
...> @@ -75,11 +75,6 @@ static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) >> file->driver_priv = NULL; >> } >> >> -static const struct vm_operations_struct exynos_drm_gem_vm_ops = { >> - .open = drm_gem_vm_open, >> - .close = drm_gem_vm_close, >> -}; >> - >> static const struct drm_ioctl_desc exynos_ioctls[] = { >> DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl, >> DRM_RENDER_ALLOW), >> @@ -124,16 +119,11 @@ static struct drm_driver exynos_drm_driver = { >> .open = e...
2020 Sep 23
0
[PATCH v3 03/22] drm/etnaviv: Introduce GEM object functions
...@@ -468,12 +468,6 @@ static const struct drm_ioctl_desc etnaviv_ioctls[] = { > ETNA_IOCTL(PM_QUERY_SIG, pm_query_sig, DRM_RENDER_ALLOW), > }; > > -static const struct vm_operations_struct vm_ops = { > - .fault = etnaviv_gem_fault, > - .open = drm_gem_vm_open, > - .close = drm_gem_vm_close, > -}; > - > static const struct file_operations fops = { > .owner = THIS_MODULE, > .open = drm_open, > @@ -490,16 +484,9 @@ static struct drm_driver etnaviv_drm_driver = { > .driver_features = DRIVER_GEM | DRIVER_RENDER, > .open...
2020 Sep 16
0
[PATCH v2 04/21] drm/exynos: Introduce GEM object functions
...void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) > >> file->driver_priv = NULL; > >> } > >> > >> -static const struct vm_operations_struct exynos_drm_gem_vm_ops = { > >> - .open = drm_gem_vm_open, > >> - .close = drm_gem_vm_close, > >> -}; > >> - > >> static const struct drm_ioctl_desc exynos_ioctls[] = { > >> DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl, > >> DRM_RENDER_ALLOW), > >> @@ -124,16 +119,11 @@ static struct drm_driver exynos_drm_dri...
2020 Sep 23
25
[PATCH v3 00/22] 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. Version 3 of this patchset mostly fixes drm_gem_prime_handle_to_fd and updates i.MX's dcss driver. The driver was missing from earlier versions and
2020 Sep 15
0
[PATCH v2 05/21] drm/gma500: Introduce GEM object functions
...{ struct gtt_range *gtt = container_of(obj, struct gtt_range, gem); @@ -36,6 +38,17 @@ int psb_gem_get_aperture(struct drm_device *dev, void *data, return -EINVAL; } +static const struct vm_operations_struct psb_gem_vm_ops = { + .fault = psb_gem_fault, + .open = drm_gem_vm_open, + .close = drm_gem_vm_close, +}; + +const struct drm_gem_object_funcs psb_gem_object_funcs = { + .free = psb_gem_free_object, + .vm_ops = &psb_gem_vm_ops, +}; + /** * psb_gem_create - create a mappable object * @file: the DRM file of the client @@ -63,6 +76,7 @@ int psb_gem_create(struct drm_file *file, struct drm_d...
2020 Aug 13
1
[PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...> - dev->driver->gem_free_object_unlocked(obj); > + if (drm_WARN_ON_ONCE(obj->dev, !obj->funcs || !obj->funcs->free)) > + return; > + > + obj->funcs->free(obj); > } > EXPORT_SYMBOL(drm_gem_object_free); > > @@ -1049,9 +1041,9 @@ EXPORT_SYMBOL(drm_gem_vm_close); > * @obj_size: the object size to be mapped, in bytes > * @vma: VMA for the area to be mapped > * > - * Set up the VMA to prepare mapping of the GEM object using the gem_vm_ops > - * provided by the driver. Depending on their requirements, drivers can either > - * provide...
2020 Aug 13
0
[PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...dev->driver->gem_free_object_unlocked) - dev->driver->gem_free_object_unlocked(obj); + if (drm_WARN_ON_ONCE(obj->dev, !obj->funcs || !obj->funcs->free)) + return; + + obj->funcs->free(obj); } EXPORT_SYMBOL(drm_gem_object_free); @@ -1049,9 +1041,9 @@ EXPORT_SYMBOL(drm_gem_vm_close); * @obj_size: the object size to be mapped, in bytes * @vma: VMA for the area to be mapped * - * Set up the VMA to prepare mapping of the GEM object using the gem_vm_ops - * provided by the driver. Depending on their requirements, drivers can either - * provide a fault handler in their gem_v...
2020 Sep 15
0
[PATCH v2 21/21] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver
...dev->driver->gem_free_object_unlocked) - dev->driver->gem_free_object_unlocked(obj); + if (drm_WARN_ON_ONCE(obj->dev, !obj->funcs || !obj->funcs->free)) + return; + + obj->funcs->free(obj); } EXPORT_SYMBOL(drm_gem_object_free); @@ -1049,9 +1041,9 @@ EXPORT_SYMBOL(drm_gem_vm_close); * @obj_size: the object size to be mapped, in bytes * @vma: VMA for the area to be mapped * - * Set up the VMA to prepare mapping of the GEM object using the gem_vm_ops - * provided by the driver. Depending on their requirements, drivers can either - * provide a fault handler in their gem_v...
2020 Sep 15
0
[PATCH v2 02/21] drm/armada: Introduce GEM object functions
...t armada_gem_vm_fault(struct vm_fault *vmf) return vmf_insert_pfn(vmf->vma, vmf->address, pfn); } -const struct vm_operations_struct armada_gem_vm_ops = { +static const struct vm_operations_struct armada_gem_vm_ops = { .fault = armada_gem_vm_fault, .open = drm_gem_vm_open, .close = drm_gem_vm_close, @@ -184,6 +184,12 @@ armada_gem_map_object(struct drm_device *dev, struct armada_gem_object *dobj) return dobj->addr; } +static const struct drm_gem_object_funcs armada_gem_object_funcs = { + .free = armada_gem_free_object, + .export = armada_gem_prime_export, + .vm_ops = &armada_gem_v...