search for: drm_gem_prime_mmap

Displaying 20 results from an estimated 50 matches for "drm_gem_prime_mmap".

2019 Feb 04
1
[PATCH] drm/bochs: fix bochs_gem_prime_mmap
ttm_fbdev_mmap() just doesn't work. It appears to work fine, mmap() returns success, but any attempt to actually access the mapping causes a SIGBUS. We can just use drm_gem_prime_mmap() instead. Almost. We have to copy over the start offset from the ttm_buffer_object vm_node to the drm_gem_object vm_node so the offset math in drm_gem_prime_mmap() works correctly for us even though we use ttm to manage our objects. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> ---...
2019 Feb 27
1
[PATCH 1/3] drm/virtio: implement prime mmap
Sync gem vm_node.start with ttm vm_node.start, then we can just call drm_gem_prime_mmap(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_prime.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c index c59ec34c80a5..b4c9199349e7 10064...
2019 Sep 12
1
[PATCH] drm/virtio: enable prime mmap support
...9f3f..96c240dbf452 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -200,6 +200,7 @@ static struct drm_driver driver = { #endif .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, + .gem_prime_mmap = drm_gem_prime_mmap, .gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table, .gem_create_object = virtio_gpu_create_object, -- 2.18.1
2020 Aug 13
1
[PATCH 19/20] drm/xlnx: Initialize DRM driver instance with CMA helper macro
...RIVER_OPS_VMAP_WITH_DUMB_CREATE(zynqmp_dpsub_dumb_create), The only effective change here is - .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table, - .gem_prime_mmap = drm_gem_cma_prime_mmap, + .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table_vmap, + .gem_prime_mmap = drm_gem_prime_mmap, The change is significant, and I have a hard time following the code to verify that it's correct, or if it's an undesired side effect. If it's correct, could the change be mentioned in the commit message, with at least a brief explanation of why this is correct, and what the consequen...
2019 Jun 20
0
[PATCH 5/6] drm/ttm: use gem vma_node
...rm_gem_vram_driver_gem_prime_vunmap); int drm_gem_vram_driver_gem_prime_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma) { - struct drm_gem_vram_object *gbo = drm_gem_vram_of_gem(gem); - - gbo->bo.base.vma_node.vm_node.start = gbo->bo.vma_node.vm_node.start; return drm_gem_prime_mmap(gem, vma); } EXPORT_SYMBOL(drm_gem_vram_driver_gem_prime_mmap); diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 516eef3b76d5..1d91da85f399 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -672,7 +672,7 @@ static void ttm_bo_release(str...
2019 Jun 21
0
[PATCH v2 08/18] drm/ttm: use gem vma_node
...rm_gem_vram_driver_gem_prime_vunmap); int drm_gem_vram_driver_gem_prime_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma) { - struct drm_gem_vram_object *gbo = drm_gem_vram_of_gem(gem); - - gbo->bo.base.vma_node.vm_node.start = gbo->bo.vma_node.vm_node.start; return drm_gem_prime_mmap(gem, vma); } EXPORT_SYMBOL(drm_gem_vram_driver_gem_prime_mmap); diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index fc8f5bb73ca8..98afc50162e9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display....
2019 Jun 21
0
[PATCH v2 08/18] drm/ttm: use gem vma_node
...rm_gem_vram_driver_gem_prime_vunmap); int drm_gem_vram_driver_gem_prime_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma) { - struct drm_gem_vram_object *gbo = drm_gem_vram_of_gem(gem); - - gbo->bo.base.vma_node.vm_node.start = gbo->bo.vma_node.vm_node.start; return drm_gem_prime_mmap(gem, vma); } EXPORT_SYMBOL(drm_gem_vram_driver_gem_prime_mmap); diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index fc8f5bb73ca8..98afc50162e9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display....
2019 Jun 21
0
[PATCH v2 08/18] drm/ttm: use gem vma_node
...rm_gem_vram_driver_gem_prime_vunmap); int drm_gem_vram_driver_gem_prime_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma) { - struct drm_gem_vram_object *gbo = drm_gem_vram_of_gem(gem); - - gbo->bo.base.vma_node.vm_node.start = gbo->bo.vma_node.vm_node.start; return drm_gem_prime_mmap(gem, vma); } EXPORT_SYMBOL(drm_gem_vram_driver_gem_prime_mmap); diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index fc8f5bb73ca8..98afc50162e9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display....
2019 Jun 28
0
[PATCH v3 08/18] drm/ttm: use gem vma_node
...rm_gem_vram_driver_gem_prime_vunmap); int drm_gem_vram_driver_gem_prime_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma) { - struct drm_gem_vram_object *gbo = drm_gem_vram_of_gem(gem); - - gbo->bo.base.vma_node.vm_node.start = gbo->bo.vma_node.vm_node.start; return drm_gem_prime_mmap(gem, vma); } EXPORT_SYMBOL(drm_gem_vram_driver_gem_prime_mmap); diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index fc8f5bb73ca8..98afc50162e9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display....
2019 Jun 28
0
[PATCH v3 08/18] drm/ttm: use gem vma_node
...rm_gem_vram_driver_gem_prime_vunmap); int drm_gem_vram_driver_gem_prime_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma) { - struct drm_gem_vram_object *gbo = drm_gem_vram_of_gem(gem); - - gbo->bo.base.vma_node.vm_node.start = gbo->bo.vma_node.vm_node.start; return drm_gem_prime_mmap(gem, vma); } EXPORT_SYMBOL(drm_gem_vram_driver_gem_prime_mmap); diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index fc8f5bb73ca8..98afc50162e9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display....
2019 Jun 28
0
[PATCH v3 08/18] drm/ttm: use gem vma_node
...rm_gem_vram_driver_gem_prime_vunmap); int drm_gem_vram_driver_gem_prime_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma) { - struct drm_gem_vram_object *gbo = drm_gem_vram_of_gem(gem); - - gbo->bo.base.vma_node.vm_node.start = gbo->bo.vma_node.vm_node.start; return drm_gem_prime_mmap(gem, vma); } EXPORT_SYMBOL(drm_gem_vram_driver_gem_prime_mmap); diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index fc8f5bb73ca8..98afc50162e9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display....
2020 Sep 15
0
[PATCH v2 17/21] drm/virtgpu: Set PRIME export function in struct drm_gem_object_funcs
...b039f493bda9..1f8d6ed11d21 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -203,7 +203,6 @@ static struct drm_driver driver = { .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, .gem_prime_mmap = drm_gem_prime_mmap, - .gem_prime_export = virtgpu_gem_prime_export, .gem_prime_import = virtgpu_gem_prime_import, .gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table, diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 842f8b61aa89..4f7d7ea8194c 100644...
2020 May 13
0
[PATCH v3 4/4] drm/virtio: Support virtgpu exported resources
...> }; > static struct virtio_driver virtio_gpu_driver = { > .feature_table = features, > @@ -202,7 +203,9 @@ static struct drm_driver driver = { > .prime_handle_to_fd = drm_gem_prime_handle_to_fd, > .prime_fd_to_handle = drm_gem_prime_fd_to_handle, > .gem_prime_mmap = drm_gem_prime_mmap, > + .gem_prime_export = virtgpu_gem_prime_export, > .gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table, > + .gem_prime_get_uuid = virtgpu_gem_prime_get_uuid, > > .gem_create_object = virtio_gpu_create_object, > .fops = &virtio_gpu_driver_fops, > diff --...
2020 Mar 02
0
[virtio-dev] [PATCH v2 4/4] drm/virtio: Support virtgpu exported resources
...truct virtio_driver virtio_gpu_driver = { > .feature_table = features, > @@ -202,7 +203,9 @@ static struct drm_driver driver = { > .prime_handle_to_fd = drm_gem_prime_handle_to_fd, > .prime_fd_to_handle = drm_gem_prime_fd_to_handle, > .gem_prime_mmap = drm_gem_prime_mmap, > + .gem_prime_export = virtgpu_gem_prime_export, > .gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table, > + .gem_prime_get_uuid = virtgpu_gem_prime_get_uuid, > > .gem_create_object = virtio_gpu_create_object, > .fops = &virtio_g...
2020 Aug 18
2
[PATCH 1/2] drm: allow limiting the scatter list size.
...+ size_t max_segment; + /** * @name: * diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index 9af7422b44cf..2c3689435cb4 100644 --- a/include/drm/drm_prime.h +++ b/include/drm/drm_prime.h @@ -88,7 +88,8 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); -struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages); +struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr...
2020 Sep 07
2
[PATCH v4 1/1] drm: allow limiting the scatter list size.
...les changed, 29 insertions(+), 17 deletions(-) diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index 9af7422b44cf..bf141e74a1c2 100644 --- a/include/drm/drm_prime.h +++ b/include/drm/drm_prime.h @@ -88,7 +88,8 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); -struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages); +struct sg_table *drm_prime_pages_to_sg(struct drm_device *dev, +...
2020 Aug 18
2
[PATCH v2 1/2] drm: allow limiting the scatter list size.
...private: */ #if IS_ENABLED(CONFIG_DRM_LEGACY) diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index 9af7422b44cf..2c3689435cb4 100644 --- a/include/drm/drm_prime.h +++ b/include/drm/drm_prime.h @@ -88,7 +88,8 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); -struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages); +struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr...
2020 Aug 18
0
[PATCH 1/2] drm: allow limiting the scatter list size.
...name: > * > diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h > index 9af7422b44cf..2c3689435cb4 100644 > --- a/include/drm/drm_prime.h > +++ b/include/drm/drm_prime.h > @@ -88,7 +88,8 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); > int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); > int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); > > -struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages); > +struct sg_table *drm_prime_pages_to_sg(struct page **...
2020 Sep 07
0
[PATCH v3 1/2] drm: allow limiting the scatter list size.
...ory manager */ struct drm_vram_mm *vram_mm; diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index 9af7422b44cf..2c3689435cb4 100644 --- a/include/drm/drm_prime.h +++ b/include/drm/drm_prime.h @@ -88,7 +88,8 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); -struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages); +struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr...
2020 Sep 07
0
[PATCH v4 1/1] drm: allow limiting the scatter list size.
...deletions(-) > > diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h > index 9af7422b44cf..bf141e74a1c2 100644 > --- a/include/drm/drm_prime.h > +++ b/include/drm/drm_prime.h > @@ -88,7 +88,8 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); > int drm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); > int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); > > -struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_pages); > +struct sg_table *drm_prime_pages_to_sg(struct drm_device...