Skip to contentSkip to conversation

drm/dumb-buffers: Add defaults for .dumb_map_offset and .dumb_destroy

PATCH Superseded Noralf Trønnes 4 participants 39 messages Aug 6, 2017 – Aug 16, 2017

Subsystems (22)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover drm/dumb-buffers: Add defaults for .dumb_map_offset and .dumb_destroy

This is a follow up with the patches that haven't been reviewed. First version:
https://lists.freedesktop.org/archives/dri-devel/2017-July/148101.html

Changes since version 1
-----------------------
- Exynos can also use drm_gem_dumb_map_offset() (Emil Velikov)
- Remove drm_gem_cma_dumb_map_offset() (Philipp Zabel)

Noralf.

Noralf Trønnes (19):
drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults drm/meson: Use .dumb_map_offset and .dumb_destroy defaults drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults drm/sti: Use .dumb_map_offset and .dumb_destroy defaults drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults drm/cirrus: Use the drm_driver.dumb_destroy default drm/udl: Use the drm_driver.dumb_destroy default drm/qxl: Use the drm_driver.dumb_destroy default drm/ast: Use the drm_driver.dumb_destroy default drm/i915: Use the drm_driver.dumb_destroy default drm/msm: Use the drm_driver.dumb_destroy default drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults drm/mgag200: Use the drm_driver.dumb_destroy default drm/radeon: Use the drm_driver.dumb_destroy default drm/bochs: Use the drm_driver.dumb_destroy default drm/armada: Use the drm_driver.dumb_destroy default drm/virtio: Use the drm_driver.dumb_destroy default drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

 drivers/gpu/drm/armada/armada_drv.c             |  1 -
 drivers/gpu/drm/armada/armada_gem.c             |  6 -----
 drivers/gpu/drm/armada/armada_gem.h             |  2 --
 drivers/gpu/drm/ast/ast_drv.c                   |  1 -
 drivers/gpu/drm/bochs/bochs_drv.c               |  1 -
 drivers/gpu/drm/cirrus/cirrus_drv.c             |  1 -
 drivers/gpu/drm/drm_gem_cma_helper.c            | 35 -------------------------
 drivers/gpu/drm/exynos/exynos_drm_drv.c         |  2 --
 drivers/gpu/drm/exynos/exynos_drm_gem.c         | 30 ++-------------------
 drivers/gpu/drm/exynos/exynos_drm_gem.h         |  5 ----
 drivers/gpu/drm/gma500/gem.c                    | 30 ---------------------
 drivers/gpu/drm/gma500/psb_drv.c                |  2 --
 drivers/gpu/drm/gma500/psb_drv.h                |  2 --
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c |  2 --
 drivers/gpu/drm/i915/i915_drv.c                 |  1 -
 drivers/gpu/drm/meson/meson_drv.c               |  2 --
 drivers/gpu/drm/mgag200/mgag200_drv.c           |  1 -
 drivers/gpu/drm/msm/msm_drv.c                   |  1 -
 drivers/gpu/drm/mxsfb/mxsfb_drv.c               |  2 --
 drivers/gpu/drm/qxl/qxl_drv.c                   |  1 -
 drivers/gpu/drm/radeon/radeon_drv.c             |  1 -
 drivers/gpu/drm/sti/sti_drv.c                   |  2 --
 drivers/gpu/drm/tegra/drm.c                     |  2 --
 drivers/gpu/drm/tegra/gem.c                     | 21 ---------------
 drivers/gpu/drm/tegra/gem.h                     |  2 --
 drivers/gpu/drm/udl/udl_drv.c                   |  1 -
 drivers/gpu/drm/virtio/virtgpu_drv.c            |  1 -
 drivers/gpu/drm/virtio/virtgpu_drv.h            |  3 ---
 drivers/gpu/drm/virtio/virtgpu_gem.c            |  7 -----
 include/drm/drm_gem_cma_helper.h                |  5 ----
 30 files changed, 2 insertions(+), 171 deletions(-)
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH v2 1/19 drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them.

Cc Xinliang Liu <[email protected]>
Cc Rongrong Zou <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Chen Feng <[email protected]>
---
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +0 -2
index 79fcce7..e27352c 100644
@@ -157,8 +157,6 @@ static struct drm_driver kirin_drm_driver = {
 	.gem_free_object_unlocked = drm_gem_cma_free_object,
 	.gem_vm_ops		= &drm_gem_cma_vm_ops,
 	.dumb_create		= kirin_gem_cma_dumb_create,
-	.dumb_map_offset	= drm_gem_cma_dumb_map_offset,
-	.dumb_destroy		= drm_gem_dumb_destroy,
 
 	.prime_handle_to_fd	= drm_gem_prime_handle_to_fd,
 	.prime_fd_to_handle	= drm_gem_prime_fd_to_handle,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

PATCH v2 2/19 drm/meson: Use .dumb_map_offset and .dumb_destroy defaults

In reply to Noralf Trønnes

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them.

---
 drivers/gpu/drm/meson/meson_drv.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/meson/meson_drv.c +0 -2
index 5375e6d..7742c7d 100644
@@ -116,8 +116,6 @@ static struct drm_driver meson_driver = {
 
 	/* GEM Ops */
 	.dumb_create		= drm_gem_cma_dumb_create,
-	.dumb_destroy		= drm_gem_dumb_destroy,
-	.dumb_map_offset	= drm_gem_cma_dumb_map_offset,
 	.gem_free_object_unlocked = drm_gem_cma_free_object,
 	.gem_vm_ops		= &drm_gem_cma_vm_ops,
 
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

PATCH v2 3/19 drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults

In reply to Noralf Trønnes

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them.

---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +0 -2
index 93c38eb..7fbad9c 100644
@@ -337,8 +337,6 @@ static struct drm_driver mxsfb_driver = {
 	.gem_free_object_unlocked = drm_gem_cma_free_object,
 	.gem_vm_ops		= &drm_gem_cma_vm_ops,
 	.dumb_create		= drm_gem_cma_dumb_create,
-	.dumb_map_offset	= drm_gem_cma_dumb_map_offset,
-	.dumb_destroy		= drm_gem_dumb_destroy,
 	.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,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH v2 4/19 drm/sti: Use .dumb_map_offset and .dumb_destroy defaults

In reply to Noralf Trønnes

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them.

Cc Benjamin Gaignard <[email protected]>
Cc Vincent Abriou <[email protected]>
---
 drivers/gpu/drm/sti/sti_drv.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/sti/sti_drv.c +0 -2
index 06ef1e38..1700c54 100644
@@ -175,8 +175,6 @@ static struct drm_driver sti_driver = {
 	.gem_free_object_unlocked = drm_gem_cma_free_object,
 	.gem_vm_ops = &drm_gem_cma_vm_ops,
 	.dumb_create = drm_gem_cma_dumb_create,
-	.dumb_map_offset = drm_gem_cma_dumb_map_offset,
-	.dumb_destroy = drm_gem_dumb_destroy,
 	.fops = &sti_driver_fops,
 
 	.enable_vblank = sti_crtc_enable_vblank,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v2 4/19
#5 lore raw

Re: [PATCH v2 04/19] drm/sti: Use .dumb_map_offset and .dumb_destroy defaults

Hi Noralf,

Thanks for the patch.

Quoted 16 lines · Noralf Trønnes

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them.

Cc Benjamin Gaignard <[email protected]>
Cc Vincent Abriou <[email protected]>
---
  drivers/gpu/drm/sti/sti_drv.c | 2 --
  1 file changed, 2 deletions(-)
drivers/gpu/drm/sti/sti_drv.c +0 -0
index 06ef1e38..1700c54 100644

drivers/gpu/drm/sti/sti_drv.c static struct drm_driver sti_driver = { · line 180

Quoted 8 lines
drivers/gpu/drm/sti/sti_drv.c +0 -2
@@ -175,8 +175,6 @@ static struct drm_driver sti_driver = {
  	.gem_free_object_unlocked = drm_gem_cma_free_object,
  	.gem_vm_ops = &drm_gem_cma_vm_ops,
  	.dumb_create = drm_gem_cma_dumb_create,
-	.dumb_map_offset = drm_gem_cma_dumb_map_offset,
-	.dumb_destroy = drm_gem_dumb_destroy,
  	.fops = &sti_driver_fops,
 
  	.enable_vblank = sti_crtc_enable_vblank,

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author Applied
#6 lore raw

Re: [PATCH v2 04/19] drm/sti: Use .dumb_map_offset and .dumb_destroy defaults

Den 07.08.2017 15.29, skrev Vincent ABRIOU:

Quoted 4 lines

Hi Noralf,

Thanks for the patch.

Thanks, applied to drm-misc.

Noralf.

Quoted 23 lines · Noralf Trønnes
Quoted 22 lines

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them.

Cc Benjamin Gaignard <[email protected]>
Cc Vincent Abriou <[email protected]>
---
   drivers/gpu/drm/sti/sti_drv.c | 2 --
   1 file changed, 2 deletions(-)
drivers/gpu/drm/sti/sti_drv.c +0 -2
index 06ef1e38..1700c54 100644
@@ -175,8 +175,6 @@ static struct drm_driver sti_driver = {
   	.gem_free_object_unlocked = drm_gem_cma_free_object,
   	.gem_vm_ops = &drm_gem_cma_vm_ops,
   	.dumb_create = drm_gem_cma_dumb_create,
-	.dumb_map_offset = drm_gem_cma_dumb_map_offset,
-	.dumb_destroy = drm_gem_dumb_destroy,
   	.fops = &sti_driver_fops,
 
Quoted 2 lines

drivers/gpu/drm/sti/sti_drv.c static struct drm_driver sti_driver = { · line 180

Quoted 2 lines
drivers/gpu/drm/sti/sti_drv.c +0 -0
   	.enable_vblank = sti_crtc_enable_vblank,

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

PATCH v2 5/19 drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults

In reply to Noralf Trønnes

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them.

Cc Patrik Jakobsson <[email protected]>
---
 drivers/gpu/drm/gma500/gem.c     | 30 ------------------------------
 drivers/gpu/drm/gma500/psb_drv.c |  2 --
 drivers/gpu/drm/gma500/psb_drv.h |  2 --
 3 files changed, 34 deletions(-)
drivers/gpu/drm/gma500/gem.c +0 -30
index 7da061a..1312397 100644
@@ -48,36 +48,6 @@ int psb_gem_get_aperture(struct drm_device *dev, void *data,
 }
 
 /**
- *	psb_gem_dumb_map_gtt	-	buffer mapping for dumb interface
- *	@file: our drm client file
- *	@dev: drm device
- *	@handle: GEM handle to the object (from dumb_create)
- *
- *	Do the necessary setup to allow the mapping of the frame buffer
- *	into user memory. We don't have to do much here at the moment.
- */
-int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
-			 uint32_t handle, uint64_t *offset)
-{
-	int ret = 0;
-	struct drm_gem_object *obj;
-
-	/* GEM does all our handle to object mapping */
-	obj = drm_gem_object_lookup(file, handle);
-	if (obj == NULL)
-		return -ENOENT;
-
-	/* Make it mmapable */
-	ret = drm_gem_create_mmap_offset(obj);
-	if (ret)
-		goto out;
-	*offset = drm_vma_node_offset_addr(&obj->vma_node);
-out:
-	drm_gem_object_unreference_unlocked(obj);
-	return ret;
-}
-
-/**
  *	psb_gem_create		-	create a mappable object
  *	@file: the DRM file of the client
  *	@dev: our device
drivers/gpu/drm/gma500/psb_drv.c +0 -2
index 747c06b..37a3be7 100644
@@ -494,8 +494,6 @@ static struct drm_driver driver = {
 	.gem_vm_ops = &psb_gem_vm_ops,
 
 	.dumb_create = psb_gem_dumb_create,
-	.dumb_map_offset = psb_gem_dumb_map_gtt,
-	.dumb_destroy = drm_gem_dumb_destroy,
 	.ioctls = psb_ioctls,
 	.fops = &psb_gem_fops,
 	.name = DRIVER_NAME,
drivers/gpu/drm/gma500/psb_drv.h +0 -2
index 8366708..821497d 100644
@@ -750,8 +750,6 @@ extern int psb_gem_get_aperture(struct drm_device *dev, void *data,
 			struct drm_file *file);
 extern int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
 			struct drm_mode_create_dumb *args);
-extern int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
-			uint32_t handle, uint64_t *offset);
 extern int psb_gem_fault(struct vm_fault *vmf);
 
 /* psb_device.c */
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#8 lore raw

PATCH v2 6/19 drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults

In reply to Noralf Trønnes

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them.

---
 drivers/gpu/drm/tegra/drm.c |  2 --
 drivers/gpu/drm/tegra/gem.c | 21 ---------------------
 drivers/gpu/drm/tegra/gem.h |  2 --
 3 files changed, 25 deletions(-)
drivers/gpu/drm/tegra/drm.c +0 -2
index 3ba659a..224ce1d 100644
@@ -1077,8 +1077,6 @@ static struct drm_driver tegra_drm_driver = {
 	.gem_prime_import = tegra_gem_prime_import,
 
 	.dumb_create = tegra_bo_dumb_create,
-	.dumb_map_offset = tegra_bo_dumb_map_offset,
-	.dumb_destroy = drm_gem_dumb_destroy,
 
 	.ioctls = tegra_drm_ioctls,
 	.num_ioctls = ARRAY_SIZE(tegra_drm_ioctls),
drivers/gpu/drm/tegra/gem.c +0 -21
index 7a39a35..c6079af 100644
@@ -423,27 +423,6 @@ int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm,
 	return 0;
 }
 
-int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,
-			     u32 handle, u64 *offset)
-{
-	struct drm_gem_object *gem;
-	struct tegra_bo *bo;
-
-	gem = drm_gem_object_lookup(file, handle);
-	if (!gem) {
-		dev_err(drm->dev, "failed to lookup GEM object\n");
-		return -EINVAL;
-	}
-
-	bo = to_tegra_bo(gem);
-
-	*offset = drm_vma_node_offset_addr(&bo->gem.vma_node);
-
-	drm_gem_object_unreference_unlocked(gem);
-
-	return 0;
-}
-
 static int tegra_bo_fault(struct vm_fault *vmf)
 {
 	struct vm_area_struct *vma = vmf->vma;
drivers/gpu/drm/tegra/gem.h +0 -2
index 8b32a6f..8eb9fd2 100644
@@ -67,8 +67,6 @@ struct tegra_bo *tegra_bo_create_with_handle(struct drm_file *file,
 void tegra_bo_free_object(struct drm_gem_object *gem);
 int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm,
 			 struct drm_mode_create_dumb *args);
-int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,
-			     u32 handle, u64 *offset);
 
 int tegra_drm_mmap(struct file *file, struct vm_area_struct *vma);
 
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#9 lore raw

PATCH v2 7/19 drm/cirrus: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Dave Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 drivers/gpu/drm/cirrus/cirrus_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/cirrus/cirrus_drv.c +0 -1
index 910c300..69c4e35 100644
@@ -142,7 +142,6 @@ static struct drm_driver driver = {
 	.gem_free_object_unlocked = cirrus_gem_free_object,
 	.dumb_create = cirrus_dumb_create,
 	.dumb_map_offset = cirrus_dumb_mmap_offset,
-	.dumb_destroy = drm_gem_dumb_destroy,
 };
 
 static const struct dev_pm_ops cirrus_pm_ops = {
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#10 lore raw

Re: [PATCH v2 07/19] drm/cirrus: Use the drm_driver.dumb_destroy default

Quoted 15 lines · Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Dave Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 drivers/gpu/drm/cirrus/cirrus_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/cirrus/cirrus_drv.c +0 -0
index 910c300..69c4e35 100644

drivers/gpu/drm/cirrus/cirrus_drv.c static struct drm_driver driver = { · line 144

Quoted 3 lines
drivers/gpu/drm/cirrus/cirrus_drv.c +0 -0
@@ -142,7 +142,6 @@ static struct drm_driver driver = {
 	.gem_free_object_unlocked = cirrus_gem_free_object,
 	.dumb_create = cirrus_dumb_create,
 	.dumb_map_offset = cirrus_dumb_mmap_offset,

I think the cirrus mmap_offset could be replaced too, it's just written slightly differently from what I can tell with the separate helper function.
-Daniel

Quoted 11 lines
drivers/gpu/drm/cirrus/cirrus_drv.c +0 -1
-	.dumb_destroy = drm_gem_dumb_destroy,
 };
 
 static const struct dev_pm_ops cirrus_pm_ops = {
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#11 lore raw

Re: [PATCH v2 07/19] drm/cirrus: Use the drm_driver.dumb_destroy default

Den 16.08.2017 09.38, skrev Daniel Vetter:

Quoted 11 lines · Noralf Trønnes
Quoted 10 lines

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Dave Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
  drivers/gpu/drm/cirrus/cirrus_drv.c | 1 -
  1 file changed, 1 deletion(-)
Quoted 11 lines

drivers/gpu/drm/cirrus/cirrus_drv.c static struct drm_driver driver = { · line 144

Quoted 8 lines
drivers/gpu/drm/cirrus/cirrus_drv.c +0 -0
index 910c300..69c4e35 100644
@@ -142,7 +142,6 @@ static struct drm_driver driver = {
  	.gem_free_object_unlocked = cirrus_gem_free_object,
  	.dumb_create = cirrus_dumb_create,
  	.dumb_map_offset = cirrus_dumb_mmap_offset,

I think the cirrus mmap_offset could be replaced too, it's just written slightly differently from what I can tell with the separate helper function.

Emil asked about the same, but cirrus uses ttm_buffer_object.vma_node to get the offset and not drm_gem_object.vma_node.
He couldn't answer whether they're the same vma_node or not.

Noralf.

Quoted 5 lines

-Daniel

Quoted 3 lines
drivers/gpu/drm/cirrus/cirrus_drv.c +0 -1
-	.dumb_destroy = drm_gem_dumb_destroy,
  };
 
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/cirrus/cirrus_drv.c +0 -0
  static const struct dev_pm_ops cirrus_pm_ops = {
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw

Re: [PATCH v2 07/19] drm/cirrus: Use the drm_driver.dumb_destroy default

Quoted 30 lines · Noralf Trønnes

Den 16.08.2017 09.38, skrev Daniel Vetter:

Quoted 13 lines · Noralf Trønnes
Quoted 11 lines

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Dave Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
  drivers/gpu/drm/cirrus/cirrus_drv.c | 1 -
  1 file changed, 1 deletion(-)
Quoted 13 lines

drivers/gpu/drm/cirrus/cirrus_drv.c static struct drm_driver driver = { · line 144

Quoted 9 lines
drivers/gpu/drm/cirrus/cirrus_drv.c +0 -0
index 910c300..69c4e35 100644
@@ -142,7 +142,6 @@ static struct drm_driver driver = {
        .gem_free_object_unlocked = cirrus_gem_free_object,
        .dumb_create = cirrus_dumb_create,
        .dumb_map_offset = cirrus_dumb_mmap_offset,

I think the cirrus mmap_offset could be replaced too, it's just written slightly differently from what I can tell with the separate helper function.

Quoted 3 lines

Emil asked about the same, but cirrus uses ttm_buffer_object.vma_node to get the offset and not drm_gem_object.vma_node.
He couldn't answer whether they're the same vma_node or not.

Indeed I misread them all, this is using ttm. In reality we could replace it all with the gem mmap stuff, but that also means we need to changed drm_driver->fops->mmap to drm_gem_mmap. Across all drivers this would delete impressive amounts of code, but quite a bit of work too. The only drivers which probably should keep the ttm way of mmap are those who's ttm_bo_driver->very_access is not implemented through drm_vma_node_verify_access().
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#13 lore raw

PATCH v2 8/19 drm/udl: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/udl/udl_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/udl/udl_drv.c +0 -1
index 0f02e1ac..0b71865 100644
@@ -54,7 +54,6 @@ static struct drm_driver driver = {
 
 	.dumb_create = udl_dumb_create,
 	.dumb_map_offset = udl_gem_mmap,
-	.dumb_destroy = drm_gem_dumb_destroy,
 	.fops = &udl_driver_fops,
 
 	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#14 lore raw

PATCH v2 9/19 drm/qxl: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Dave Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 drivers/gpu/drm/qxl/qxl_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/qxl/qxl_drv.c +0 -1
index 403e135..2445e75 100644
@@ -263,7 +263,6 @@ static struct drm_driver qxl_driver = {
 
 	.dumb_create = qxl_mode_dumb_create,
 	.dumb_map_offset = qxl_mode_dumb_mmap,
-	.dumb_destroy = drm_gem_dumb_destroy,
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = qxl_debugfs_init,
 #endif
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#15 lore raw

Re: [PATCH v2 09/19] drm/qxl: Use the drm_driver.dumb_destroy default

Quoted 15 lines · Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Dave Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 drivers/gpu/drm/qxl/qxl_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/qxl/qxl_drv.c +0 -0
index 403e135..2445e75 100644

drivers/gpu/drm/qxl/qxl_drv.c static struct drm_driver qxl_driver = { · line 265

Quoted 3 lines
drivers/gpu/drm/qxl/qxl_drv.c +0 -0
@@ -263,7 +263,6 @@ static struct drm_driver qxl_driver = {
 
 	.dumb_create = qxl_mode_dumb_create,
 	.dumb_map_offset = qxl_mode_dumb_mmap,

Like cirrus, this simple seems put into a few functions all over, but matches the generic implementation for dumb_map_offset. -Daniel

Quoted 11 lines
drivers/gpu/drm/qxl/qxl_drv.c +0 -1
-	.dumb_destroy = drm_gem_dumb_destroy,
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = qxl_debugfs_init,
 #endif
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#16 lore raw

PATCH v2 10/19 drm/ast: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/ast/ast_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/ast/ast_drv.c +0 -1
index 3022b39..69dab82 100644
@@ -209,7 +209,6 @@ static struct drm_driver driver = {
 	.gem_free_object_unlocked = ast_gem_free_object,
 	.dumb_create = ast_dumb_create,
 	.dumb_map_offset = ast_dumb_mmap_offset,
-	.dumb_destroy = drm_gem_dumb_destroy,
 
 };
 
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#17 lore raw

Re: [PATCH v2 10/19] drm/ast: Use the drm_driver.dumb_destroy default

Quoted 14 lines · Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/ast/ast_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/ast/ast_drv.c +0 -0
index 3022b39..69dab82 100644

drivers/gpu/drm/ast/ast_drv.c static struct drm_driver driver = { · line 211

Quoted 3 lines
drivers/gpu/drm/ast/ast_drv.c +0 -0
@@ -209,7 +209,6 @@ static struct drm_driver driver = {
 	.gem_free_object_unlocked = ast_gem_free_object,
 	.dumb_create = ast_dumb_create,
 	.dumb_map_offset = ast_dumb_mmap_offset,

Like cirrus&qxl, I think the mmap hook could be dropped too. -Daniel

Quoted 11 lines
drivers/gpu/drm/ast/ast_drv.c +0 -1
-	.dumb_destroy = drm_gem_dumb_destroy,
 
 };
 
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#18 lore raw

PATCH v2 11/19 drm/i915: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Daniel Vetter <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +0 -1
index d310d82..4c96a72 100644
@@ -2755,7 +2755,6 @@ static struct drm_driver driver = {
 
 	.dumb_create = i915_gem_dumb_create,
 	.dumb_map_offset = i915_gem_mmap_gtt,
-	.dumb_destroy = drm_gem_dumb_destroy,
 	.ioctls = i915_ioctls,
 	.num_ioctls = ARRAY_SIZE(i915_ioctls),
 	.fops = &i915_driver_fops,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v2 11/19
#19 lore raw

Re: [PATCH v2 11/19] drm/i915: Use the drm_driver.dumb_destroy default

Quoted 6 lines · Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Daniel Vetter <[email protected]>
Cc Jani Nikula <[email protected]>

We haven't pulled drm-misc into drm-intel yet, so easier to merge to drm-misc. Can you pls push it there?

Thanks for doing this.
-Daniel

Quoted 23 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +0 -1
index d310d82..4c96a72 100644
@@ -2755,7 +2755,6 @@ static struct drm_driver driver = {
 
 	.dumb_create = i915_gem_dumb_create,
 	.dumb_map_offset = i915_gem_mmap_gtt,
-	.dumb_destroy = drm_gem_dumb_destroy,
 	.ioctls = i915_ioctls,
 	.num_ioctls = ARRAY_SIZE(i915_ioctls),
 	.fops = &i915_driver_fops,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author Applied
#20 lore raw

Re: [PATCH v2 11/19] drm/i915: Use the drm_driver.dumb_destroy default

Den 07.08.2017 17.02, skrev Daniel Vetter:

Quoted 11 lines · Noralf Trønnes
Quoted 6 lines

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Daniel Vetter <[email protected]>
Cc Jani Nikula <[email protected]>

We haven't pulled drm-misc into drm-intel yet, so easier to merge to drm-misc. Can you pls push it there?

Applied to drm-misc.
I do hope that people will tell me if they want to take a patch through another tree than drm-misc rather than assume that I should know.

Noralf.

Quoted 22 lines

Thanks for doing this.
-Daniel

Quoted 19 lines
---
  drivers/gpu/drm/i915/i915_drv.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +0 -1
index d310d82..4c96a72 100644
@@ -2755,7 +2755,6 @@ static struct drm_driver driver = {
 
  	.dumb_create = i915_gem_dumb_create,
  	.dumb_map_offset = i915_gem_mmap_gtt,
-	.dumb_destroy = drm_gem_dumb_destroy,
  	.ioctls = i915_ioctls,
  	.num_ioctls = ARRAY_SIZE(i915_ioctls),
  	.fops = &i915_driver_fops,
Signature · 1 line
2.7.4
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#21 lore raw

PATCH v2 12/19 drm/msm: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/msm/msm_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/msm/msm_drv.c +0 -1
index f49f6ac..b0129e7 100644
@@ -832,7 +832,6 @@ static struct drm_driver msm_driver = {
 	.gem_vm_ops         = &vm_ops,
 	.dumb_create        = msm_gem_dumb_create,
 	.dumb_map_offset    = msm_gem_dumb_map_offset,
-	.dumb_destroy       = drm_gem_dumb_destroy,
 	.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,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#22 lore raw

Re: [PATCH v2 12/19] drm/msm: Use the drm_driver.dumb_destroy default

Quoted 14 lines · Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/msm/msm_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/msm/msm_drv.c +0 -0
index f49f6ac..b0129e7 100644

drivers/gpu/drm/msm/msm_drv.c static struct drm_driver msm_driver = { · line 834

Quoted 3 lines
drivers/gpu/drm/msm/msm_drv.c +0 -0
@@ -832,7 +832,6 @@ static struct drm_driver msm_driver = {
 	.gem_vm_ops         = &vm_ops,
 	.dumb_create        = msm_gem_dumb_create,
 	.dumb_map_offset    = msm_gem_dumb_map_offset,

This one is a bit more complicated because it throws it's own locking in for fun. But the vma manger already has all the locking it needs, so this is redundant. We could first simplify msm_gem_mmap_offset and drop the locking, racy check and just call the vma offset helper directly, then replace the dumb mmap function with the generic one.
-Daniel

Quoted 11 lines
drivers/gpu/drm/msm/msm_drv.c +0 -1
-	.dumb_destroy       = drm_gem_dumb_destroy,
 	.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,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#23 lore raw

PATCH v2 13/19 drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults

In reply to Noralf Trønnes

This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them. Use drm_gem_dumb_map_offset() in exynos_drm_gem_map_ioctl() and remove exynos_drm_gem_dumb_map_offset().

Cc Joonyoung Shim <[email protected]>
Cc Seung-Woo Kim <[email protected]>
Cc Kyungmin Park <[email protected]>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c |  2 --
 drivers/gpu/drm/exynos/exynos_drm_gem.c | 30 ++----------------------------
 drivers/gpu/drm/exynos/exynos_drm_gem.h |  5 -----
 3 files changed, 2 insertions(+), 35 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +0 -2
index cab9e12..d99b429 100644
@@ -145,8 +145,6 @@ static struct drm_driver exynos_drm_driver = {
 	.gem_free_object_unlocked = exynos_drm_gem_free_object,
 	.gem_vm_ops		= &exynos_drm_gem_vm_ops,
 	.dumb_create		= exynos_drm_gem_dumb_create,
-	.dumb_map_offset	= exynos_drm_gem_dumb_map_offset,
-	.dumb_destroy		= drm_gem_dumb_destroy,
 	.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,
drivers/gpu/drm/exynos/exynos_drm_gem.c +2 -28
index c23479b..077de01 100644
@@ -286,8 +286,8 @@ int exynos_drm_gem_map_ioctl(struct drm_device *dev, void *data,
 {
 	struct drm_exynos_gem_map *args = data;
 
-	return exynos_drm_gem_dumb_map_offset(file_priv, dev, args->handle,
-					      &args->offset);
+	return drm_gem_dumb_map_offset(file_priv, dev, args->handle,
+				       &args->offset);
 }
 
 dma_addr_t *exynos_drm_gem_get_dma_addr(struct drm_device *dev,
@@ -422,32 +422,6 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
 	return 0;
 }
 
-int exynos_drm_gem_dumb_map_offset(struct drm_file *file_priv,
-				   struct drm_device *dev, uint32_t handle,
-				   uint64_t *offset)
-{
-	struct drm_gem_object *obj;
-	int ret = 0;
-
-	/*
-	 * get offset of memory allocated for drm framebuffer.
-	 * - this callback would be called by user application
-	 *	with DRM_IOCTL_MODE_MAP_DUMB command.
-	 */
-
-	obj = drm_gem_object_lookup(file_priv, handle);
-	if (!obj) {
-		DRM_ERROR("failed to lookup gem object.\n");
-		return -EINVAL;
-	}
-
-	*offset = drm_vma_node_offset_addr(&obj->vma_node);
-	DRM_DEBUG_KMS("offset = 0x%lx\n", (unsigned long)*offset);
-
-	drm_gem_object_unreference_unlocked(obj);
-	return ret;
-}
-
 int exynos_drm_gem_fault(struct vm_fault *vmf)
 {
 	struct vm_area_struct *vma = vmf->vma;
drivers/gpu/drm/exynos/exynos_drm_gem.h +0 -5
index 8545725..e86d1a9 100644
@@ -110,11 +110,6 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
 			       struct drm_device *dev,
 			       struct drm_mode_create_dumb *args);
 
-/* map memory region for drm framebuffer to user space. */
-int exynos_drm_gem_dumb_map_offset(struct drm_file *file_priv,
-				   struct drm_device *dev, uint32_t handle,
-				   uint64_t *offset);
-
 /* page fault handler and mmap fault address(virtual) to physical memory. */
 int exynos_drm_gem_fault(struct vm_fault *vmf);
 
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#24 lore raw

PATCH v2 14/19 drm/mgag200: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/mgag200/mgag200_drv.c +0 -1
index 4189160..74cdde2 100644
@@ -102,7 +102,6 @@ static struct drm_driver driver = {
 	.gem_free_object_unlocked = mgag200_gem_free_object,
 	.dumb_create = mgag200_dumb_create,
 	.dumb_map_offset = mgag200_dumb_mmap_offset,
-	.dumb_destroy = drm_gem_dumb_destroy,
 };
 
 static struct pci_driver mgag200_pci_driver = {
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#25 lore raw

Re: [PATCH v2 14/19] drm/mgag200: Use the drm_driver.dumb_destroy default

Quoted 14 lines · Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/mgag200/mgag200_drv.c +0 -0
index 4189160..74cdde2 100644

drivers/gpu/drm/mgag200/mgag200_drv.c static struct drm_driver driver = { · line 104

Quoted 3 lines
drivers/gpu/drm/mgag200/mgag200_drv.c +0 -0
@@ -102,7 +102,6 @@ static struct drm_driver driver = {
 	.gem_free_object_unlocked = mgag200_gem_free_object,
 	.dumb_create = mgag200_dumb_create,
 	.dumb_map_offset = mgag200_dumb_mmap_offset,

Like with cirrus and qxl and ast, this could be removed too. -Daniel

Quoted 11 lines
drivers/gpu/drm/mgag200/mgag200_drv.c +0 -1
-	.dumb_destroy = drm_gem_dumb_destroy,
 };
 
 static struct pci_driver mgag200_pci_driver = {
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#26 lore raw

PATCH v2 15/19 drm/radeon: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Alex Deucher <[email protected]>
Cc Christian König <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/radeon/radeon_drv.c +0 -1
index b401f16..f4becad 100644
@@ -583,7 +583,6 @@ static struct drm_driver kms_driver = {
 	.gem_close_object = radeon_gem_object_close,
 	.dumb_create = radeon_mode_dumb_create,
 	.dumb_map_offset = radeon_mode_dumb_mmap,
-	.dumb_destroy = drm_gem_dumb_destroy,
 	.fops = &radeon_driver_kms_fops,
 
 	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v2 15/19
#27 lore raw

Re: [PATCH v2 15/19] drm/radeon: Use the drm_driver.dumb_destroy default

Quoted 6 lines · Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Alex Deucher <[email protected]>
Cc Christian König <[email protected]>
Quoted 19 lines
---
 drivers/gpu/drm/radeon/radeon_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/radeon/radeon_drv.c +0 -2
index b401f16..f4becad 100644
@@ -583,7 +583,6 @@ static struct drm_driver kms_driver = {
        .gem_close_object = radeon_gem_object_close,
        .dumb_create = radeon_mode_dumb_create,
        .dumb_map_offset = radeon_mode_dumb_mmap,
-       .dumb_destroy = drm_gem_dumb_destroy,
        .fops = &radeon_driver_kms_fops,
 
        .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
--

2.7.4

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author Applied
#28 lore raw

Re: [PATCH v2 15/19] drm/radeon: Use the drm_driver.dumb_destroy default

Den 07.08.2017 22.12, skrev Alex Deucher:

Quoted 8 lines · Noralf Trønnes
Quoted 6 lines

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

Cc Alex Deucher <[email protected]>
Cc Christian König <[email protected]>

Thanks, applied to drm-misc.

Noralf.

Quoted 15 lines
Quoted 15 lines
---
  drivers/gpu/drm/radeon/radeon_drv.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/radeon/radeon_drv.c +0 -1
index b401f16..f4becad 100644
@@ -583,7 +583,6 @@ static struct drm_driver kms_driver = {
         .gem_close_object = radeon_gem_object_close,
         .dumb_create = radeon_mode_dumb_create,
         .dumb_map_offset = radeon_mode_dumb_mmap,
-       .dumb_destroy = drm_gem_dumb_destroy,
         .fops = &radeon_driver_kms_fops,
 
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/radeon/radeon_drv.c +0 -1
         .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
--

2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#29 lore raw

PATCH v2 16/19 drm/bochs: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/bochs/bochs_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/bochs/bochs_drv.c +0 -1
index a1d2884..7b203184 100644
@@ -93,7 +93,6 @@ static struct drm_driver bochs_driver = {
 	.gem_free_object_unlocked = bochs_gem_free_object,
 	.dumb_create            = bochs_dumb_create,
 	.dumb_map_offset        = bochs_dumb_mmap_offset,
-	.dumb_destroy           = drm_gem_dumb_destroy,
 };
 
 /* ---------------------------------------------------------------------- */
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#30 lore raw

Re: [PATCH v2 16/19] drm/bochs: Use the drm_driver.dumb_destroy default

Quoted 14 lines · Noralf Trønnes

drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/bochs/bochs_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/bochs/bochs_drv.c +0 -0
index a1d2884..7b203184 100644

drivers/gpu/drm/bochs/bochs_drv.c static struct drm_driver bochs_driver = { · line 95

Quoted 3 lines
drivers/gpu/drm/bochs/bochs_drv.c +0 -0
@@ -93,7 +93,6 @@ static struct drm_driver bochs_driver = {
 	.gem_free_object_unlocked = bochs_gem_free_object,
 	.dumb_create            = bochs_dumb_create,
 	.dumb_map_offset        = bochs_dumb_mmap_offset,

Same as with cirrus&co, this can be removed too.
-Daniel

Quoted 11 lines
drivers/gpu/drm/bochs/bochs_drv.c +0 -1
-	.dumb_destroy           = drm_gem_dumb_destroy,
 };
 
 /* ---------------------------------------------------------------------- */
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#31 lore raw

PATCH v2 17/19 drm/armada: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

armada_gem_dumb_destroy() is the same as drm_gem_dumb_destroy() which is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/armada/armada_drv.c | 1 -
 drivers/gpu/drm/armada/armada_gem.c | 6 ------
 drivers/gpu/drm/armada/armada_gem.h | 2 --
 3 files changed, 9 deletions(-)
drivers/gpu/drm/armada/armada_drv.c +0 -1
index 0b3227c..8a37b9a 100644
@@ -71,7 +71,6 @@ static struct drm_driver armada_drm_driver = {
 	.gem_prime_import	= armada_gem_prime_import,
 	.dumb_create		= armada_gem_dumb_create,
 	.dumb_map_offset	= armada_gem_dumb_map_offset,
-	.dumb_destroy		= armada_gem_dumb_destroy,
 	.gem_vm_ops		= &armada_gem_vm_ops,
 	.major			= 1,
 	.minor			= 0,
drivers/gpu/drm/armada/armada_gem.c +0 -6
index a76ca21..9d69132 100644
@@ -300,12 +300,6 @@ int armada_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev,
 	return ret;
 }
 
-int armada_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev,
-	uint32_t handle)
-{
-	return drm_gem_handle_delete(file, handle);
-}
-
 /* Private driver gem ioctls */
 int armada_gem_create_ioctl(struct drm_device *dev, void *data,
 	struct drm_file *file)
drivers/gpu/drm/armada/armada_gem.h +0 -2
index 6e524e0..78d5690 100644
@@ -37,8 +37,6 @@ int armada_gem_dumb_create(struct drm_file *, struct drm_device *,
 	struct drm_mode_create_dumb *);
 int armada_gem_dumb_map_offset(struct drm_file *, struct drm_device *,
 	uint32_t, uint64_t *);
-int armada_gem_dumb_destroy(struct drm_file *, struct drm_device *,
-	uint32_t);
 struct dma_buf *armada_gem_prime_export(struct drm_device *dev,
 	struct drm_gem_object *obj, int flags);
 struct drm_gem_object *armada_gem_prime_import(struct drm_device *,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#32 lore raw

Re: [PATCH v2 17/19] drm/armada: Use the drm_driver.dumb_destroy default

Quoted 16 lines · Noralf Trønnes

armada_gem_dumb_destroy() is the same as drm_gem_dumb_destroy() which is the drm_driver.dumb_destroy default, so no need to set it.

---
 drivers/gpu/drm/armada/armada_drv.c | 1 -
 drivers/gpu/drm/armada/armada_gem.c | 6 ------
 drivers/gpu/drm/armada/armada_gem.h | 2 --
 3 files changed, 9 deletions(-)
drivers/gpu/drm/armada/armada_drv.c +0 -0
index 0b3227c..8a37b9a 100644

drivers/gpu/drm/armada/armada_drv.c static struct drm_driver armada_drm_driver = { · line 73

Quoted 3 lines
drivers/gpu/drm/armada/armada_drv.c +0 -0
@@ -71,7 +71,6 @@ static struct drm_driver armada_drm_driver = {
 	.gem_prime_import	= armada_gem_prime_import,
 	.dumb_create		= armada_gem_dumb_create,
 	.dumb_map_offset	= armada_gem_dumb_map_offset,

Looking at this I noticed how we reject the mapping of imported dma-bufs in the dumb ioctl. I think that's a pretty good idea to do in generic code (it is an invalid use-case). If we'd put that check into the core helpers, we could also switch the armada dumb_map_offset to the generic one. -Daniel

Quoted 41 lines
drivers/gpu/drm/armada/armada_drv.c +0 -1
-	.dumb_destroy		= armada_gem_dumb_destroy,
 	.gem_vm_ops		= &armada_gem_vm_ops,
 	.major			= 1,
 	.minor			= 0,
drivers/gpu/drm/armada/armada_gem.c +0 -6
index a76ca21..9d69132 100644
@@ -300,12 +300,6 @@ int armada_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev,
 	return ret;
 }
 
-int armada_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev,
-	uint32_t handle)
-{
-	return drm_gem_handle_delete(file, handle);
-}
-
 /* Private driver gem ioctls */
 int armada_gem_create_ioctl(struct drm_device *dev, void *data,
 	struct drm_file *file)
drivers/gpu/drm/armada/armada_gem.h +0 -2
index 6e524e0..78d5690 100644
@@ -37,8 +37,6 @@ int armada_gem_dumb_create(struct drm_file *, struct drm_device *,
 	struct drm_mode_create_dumb *);
 int armada_gem_dumb_map_offset(struct drm_file *, struct drm_device *,
 	uint32_t, uint64_t *);
-int armada_gem_dumb_destroy(struct drm_file *, struct drm_device *,
-	uint32_t);
 struct dma_buf *armada_gem_prime_export(struct drm_device *dev,
 	struct drm_gem_object *obj, int flags);
 struct drm_gem_object *armada_gem_prime_import(struct drm_device *,
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#33 lore raw

PATCH v2 18/19 drm/virtio: Use the drm_driver.dumb_destroy default

In reply to Noralf Trønnes

virtio_gpu_mode_dumb_destroy() is the same as drm_gem_dumb_destroy() which is the drm_driver.dumb_destroy default, so no need to set it.

Cc David Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 drivers/gpu/drm/virtio/virtgpu_drv.c | 1 -
 drivers/gpu/drm/virtio/virtgpu_drv.h | 3 ---
 drivers/gpu/drm/virtio/virtgpu_gem.c | 7 -------
 3 files changed, 11 deletions(-)
drivers/gpu/drm/virtio/virtgpu_drv.c +0 -1
index 63d35c7..49a3d8d 100644
@@ -122,7 +122,6 @@ static struct drm_driver driver = {
 
 	.dumb_create = virtio_gpu_mode_dumb_create,
 	.dumb_map_offset = virtio_gpu_mode_dumb_mmap,
-	.dumb_destroy = virtio_gpu_mode_dumb_destroy,
 
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = virtio_gpu_debugfs_init,
drivers/gpu/drm/virtio/virtgpu_drv.h +0 -3
index 3a66abb..da2fb58 100644
@@ -236,9 +236,6 @@ struct virtio_gpu_object *virtio_gpu_alloc_object(struct drm_device *dev,
 int virtio_gpu_mode_dumb_create(struct drm_file *file_priv,
 				struct drm_device *dev,
 				struct drm_mode_create_dumb *args);
-int virtio_gpu_mode_dumb_destroy(struct drm_file *file_priv,
-				 struct drm_device *dev,
-				 uint32_t handle);
 int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv,
 			      struct drm_device *dev,
 			      uint32_t handle, uint64_t *offset_p);
drivers/gpu/drm/virtio/virtgpu_gem.c +0 -7
index cc025d8..72ad7b1 100644
@@ -118,13 +118,6 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv,
 	return ret;
 }
 
-int virtio_gpu_mode_dumb_destroy(struct drm_file *file_priv,
-				 struct drm_device *dev,
-				 uint32_t handle)
-{
-	return drm_gem_handle_delete(file_priv, handle);
-}
-
 int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv,
 			      struct drm_device *dev,
 			      uint32_t handle, uint64_t *offset_p)
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#34 lore raw

Re: [PATCH v2 18/19] drm/virtio: Use the drm_driver.dumb_destroy default

Quoted 17 lines · Noralf Trønnes

virtio_gpu_mode_dumb_destroy() is the same as drm_gem_dumb_destroy() which is the drm_driver.dumb_destroy default, so no need to set it.

Cc David Airlie <[email protected]>
Cc Gerd Hoffmann <[email protected]>
---
 drivers/gpu/drm/virtio/virtgpu_drv.c | 1 -
 drivers/gpu/drm/virtio/virtgpu_drv.h | 3 ---
 drivers/gpu/drm/virtio/virtgpu_gem.c | 7 -------
 3 files changed, 11 deletions(-)
drivers/gpu/drm/virtio/virtgpu_drv.c +0 -0
index 63d35c7..49a3d8d 100644

drivers/gpu/drm/virtio/virtgpu_drv.c static struct drm_driver driver = { · line 124

Quoted 3 lines
drivers/gpu/drm/virtio/virtgpu_drv.c +0 -0
@@ -122,7 +122,6 @@ static struct drm_driver driver = {
 
 	.dumb_create = virtio_gpu_mode_dumb_create,
 	.dumb_map_offset = virtio_gpu_mode_dumb_mmap,

Like cirrus&co (they're all copypasted from each another) the map_offset one could be replaced by the generic one too.
-Daniel

Quoted 43 lines
drivers/gpu/drm/virtio/virtgpu_drv.c +0 -1
-	.dumb_destroy = virtio_gpu_mode_dumb_destroy,
 
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = virtio_gpu_debugfs_init,
drivers/gpu/drm/virtio/virtgpu_drv.h +0 -3
index 3a66abb..da2fb58 100644
@@ -236,9 +236,6 @@ struct virtio_gpu_object *virtio_gpu_alloc_object(struct drm_device *dev,
 int virtio_gpu_mode_dumb_create(struct drm_file *file_priv,
 				struct drm_device *dev,
 				struct drm_mode_create_dumb *args);
-int virtio_gpu_mode_dumb_destroy(struct drm_file *file_priv,
-				 struct drm_device *dev,
-				 uint32_t handle);
 int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv,
 			      struct drm_device *dev,
 			      uint32_t handle, uint64_t *offset_p);
drivers/gpu/drm/virtio/virtgpu_gem.c +0 -7
index cc025d8..72ad7b1 100644
@@ -118,13 +118,6 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv,
 	return ret;
 }
 
-int virtio_gpu_mode_dumb_destroy(struct drm_file *file_priv,
-				 struct drm_device *dev,
-				 uint32_t handle)
-{
-	return drm_gem_handle_delete(file_priv, handle);
-}
-
 int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv,
 			      struct drm_device *dev,
 			      uint32_t handle, uint64_t *offset_p)
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#35 lore raw

PATCH v2 19/19 drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

In reply to Noralf Trønnes

There are no more users of drm_gem_cma_dumb_map_offset(), so remove it.

---
 drivers/gpu/drm/drm_gem_cma_helper.c | 35 -----------------------------------
 include/drm/drm_gem_cma_helper.h     |  5 -----
 2 files changed, 40 deletions(-)
drivers/gpu/drm/drm_gem_cma_helper.c +0 -35
index 275ab87..1f4c394 100644
@@ -264,41 +264,6 @@ int drm_gem_cma_dumb_create(struct drm_file *file_priv,
 }
 EXPORT_SYMBOL_GPL(drm_gem_cma_dumb_create);
 
-/**
- * drm_gem_cma_dumb_map_offset - return the fake mmap offset for a CMA GEM
- *     object
- * @file_priv: DRM file-private structure containing the GEM object
- * @drm: DRM device
- * @handle: GEM object handle
- * @offset: return location for the fake mmap offset
- *
- * This function look up an object by its handle and returns the fake mmap
- * offset associated with it. Drivers using the CMA helpers should set this
- * as their &drm_driver.dumb_map_offset callback.
- *
- * Returns:
- * 0 on success or a negative error code on failure.
- */
-int drm_gem_cma_dumb_map_offset(struct drm_file *file_priv,
-				struct drm_device *drm, u32 handle,
-				u64 *offset)
-{
-	struct drm_gem_object *gem_obj;
-
-	gem_obj = drm_gem_object_lookup(file_priv, handle);
-	if (!gem_obj) {
-		dev_err(drm->dev, "failed to lookup GEM object\n");
-		return -EINVAL;
-	}
-
-	*offset = drm_vma_node_offset_addr(&gem_obj->vma_node);
-
-	drm_gem_object_put_unlocked(gem_obj);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(drm_gem_cma_dumb_map_offset);
-
 const struct vm_operations_struct drm_gem_cma_vm_ops = {
 	.open = drm_gem_vm_open,
 	.close = drm_gem_vm_close,
include/drm/drm_gem_cma_helper.h +0 -5
index b42529e..58a739b 100644
@@ -73,11 +73,6 @@ int drm_gem_cma_dumb_create(struct drm_file *file_priv,
 			    struct drm_device *drm,
 			    struct drm_mode_create_dumb *args);
 
-/* map memory region for DRM framebuffer to user space */
-int drm_gem_cma_dumb_map_offset(struct drm_file *file_priv,
-				struct drm_device *drm, u32 handle,
-				u64 *offset);
-
 /* set vm_flags and we can change the VM attribute to other one at here */
 int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma);
 
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#36 lore raw
In reply to Noralf Trønnes

Den 06.08.2017 17.40, skrev Noralf Trønnes:

Quoted 9 lines

This is a follow up with the patches that haven't been reviewed. First version:
https://lists.freedesktop.org/archives/dri-devel/2017-July/148101.html

Changes since version 1
-----------------------
- Exynos can also use drm_gem_dumb_map_offset() (Emil Velikov)
- Remove drm_gem_cma_dumb_map_offset() (Philipp Zabel)

Quoted 6 lines

Noralf.

Noralf Trønnes (19):
drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults drm/meson: Use .dumb_map_offset and .dumb_destroy defaults drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults

I'd appreciate if someone could ack the remaining cma specific patches to get the function out of the way:

[v2,01/19] drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults [v2,02/19] drm/meson: Use .dumb_map_offset and .dumb_destroy defaults [v2,03/19] drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults [v2,19/19] drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

Noralf.

Quoted 40 lines

drm/sti: Use .dumb_map_offset and .dumb_destroy defaults drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults drm/cirrus: Use the drm_driver.dumb_destroy default drm/udl: Use the drm_driver.dumb_destroy default drm/qxl: Use the drm_driver.dumb_destroy default drm/ast: Use the drm_driver.dumb_destroy default drm/i915: Use the drm_driver.dumb_destroy default drm/msm: Use the drm_driver.dumb_destroy default drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults drm/mgag200: Use the drm_driver.dumb_destroy default drm/radeon: Use the drm_driver.dumb_destroy default drm/bochs: Use the drm_driver.dumb_destroy default drm/armada: Use the drm_driver.dumb_destroy default drm/virtio: Use the drm_driver.dumb_destroy default drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

  drivers/gpu/drm/armada/armada_drv.c             |  1 -
  drivers/gpu/drm/armada/armada_gem.c             |  6 -----
  drivers/gpu/drm/armada/armada_gem.h             |  2 --
  drivers/gpu/drm/ast/ast_drv.c                   |  1 -
  drivers/gpu/drm/bochs/bochs_drv.c               |  1 -
  drivers/gpu/drm/cirrus/cirrus_drv.c             |  1 -
  drivers/gpu/drm/drm_gem_cma_helper.c            | 35 -------------------------
  drivers/gpu/drm/exynos/exynos_drm_drv.c         |  2 --
  drivers/gpu/drm/exynos/exynos_drm_gem.c         | 30 ++-------------------
  drivers/gpu/drm/exynos/exynos_drm_gem.h         |  5 ----
  drivers/gpu/drm/gma500/gem.c                    | 30 ---------------------
  drivers/gpu/drm/gma500/psb_drv.c                |  2 --
  drivers/gpu/drm/gma500/psb_drv.h                |  2 --
  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c |  2 --
  drivers/gpu/drm/i915/i915_drv.c                 |  1 -
  drivers/gpu/drm/meson/meson_drv.c               |  2 --
  drivers/gpu/drm/mgag200/mgag200_drv.c           |  1 -
  drivers/gpu/drm/msm/msm_drv.c                   |  1 -
  drivers/gpu/drm/mxsfb/mxsfb_drv.c               |  2 --
  drivers/gpu/drm/qxl/qxl_drv.c                   |  1 -
  drivers/gpu/drm/radeon/radeon_drv.c             |  1 -
  drivers/gpu/drm/sti/sti_drv.c                   |  2 --
  drivers/gpu/drm/tegra/drm.c                     |  2 --
Quoted 9 lines
  drivers/gpu/drm/tegra/gem.c                     | 21 ---------------
  drivers/gpu/drm/tegra/gem.h                     |  2 --
  drivers/gpu/drm/udl/udl_drv.c                   |  1 -
  drivers/gpu/drm/virtio/virtgpu_drv.c            |  1 -
  drivers/gpu/drm/virtio/virtgpu_drv.h            |  3 ---
  drivers/gpu/drm/virtio/virtgpu_gem.c            |  7 -----
  include/drm/drm_gem_cma_helper.h                |  5 ----
  30 files changed, 2 insertions(+), 171 deletions(-)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by
#37 lore raw
Quoted 18 lines · Noralf Trønnes

Den 06.08.2017 17.40, skrev Noralf Trønnes:

Quoted 9 lines

This is a follow up with the patches that haven't been reviewed. First version:
https://lists.freedesktop.org/archives/dri-devel/2017-July/148101.html

Changes since version 1
-----------------------
- Exynos can also use drm_gem_dumb_map_offset() (Emil Velikov)
- Remove drm_gem_cma_dumb_map_offset() (Philipp Zabel)

Quoted 6 lines

Noralf.

Noralf Trønnes (19):
drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults drm/meson: Use .dumb_map_offset and .dumb_destroy defaults drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults

Quoted 7 lines

I'd appreciate if someone could ack the remaining cma specific patches to get the function out of the way:

[v2,01/19] drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults [v2,02/19] drm/meson: Use .dumb_map_offset and .dumb_destroy defaults [v2,03/19] drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults [v2,19/19] drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

I did a bit more and looked at all the patches which don't have a reply from a maintainer yet. I've found a few more things to delete I think, but the patches are all

as-is. Feel free to do the additional removing (assuming I didn't miss anything) if you have time, but no worries if not.

Great work!

Cheers, Daniel

Quoted 57 lines

Noralf.

Quoted 40 lines

drm/sti: Use .dumb_map_offset and .dumb_destroy defaults drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults drm/cirrus: Use the drm_driver.dumb_destroy default drm/udl: Use the drm_driver.dumb_destroy default drm/qxl: Use the drm_driver.dumb_destroy default drm/ast: Use the drm_driver.dumb_destroy default drm/i915: Use the drm_driver.dumb_destroy default drm/msm: Use the drm_driver.dumb_destroy default drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults drm/mgag200: Use the drm_driver.dumb_destroy default drm/radeon: Use the drm_driver.dumb_destroy default drm/bochs: Use the drm_driver.dumb_destroy default drm/armada: Use the drm_driver.dumb_destroy default drm/virtio: Use the drm_driver.dumb_destroy default drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

  drivers/gpu/drm/armada/armada_drv.c             |  1 -
  drivers/gpu/drm/armada/armada_gem.c             |  6 -----
  drivers/gpu/drm/armada/armada_gem.h             |  2 --
  drivers/gpu/drm/ast/ast_drv.c                   |  1 -
  drivers/gpu/drm/bochs/bochs_drv.c               |  1 -
  drivers/gpu/drm/cirrus/cirrus_drv.c             |  1 -
  drivers/gpu/drm/drm_gem_cma_helper.c            | 35 -------------------------
  drivers/gpu/drm/exynos/exynos_drm_drv.c         |  2 --
  drivers/gpu/drm/exynos/exynos_drm_gem.c         | 30 ++-------------------
  drivers/gpu/drm/exynos/exynos_drm_gem.h         |  5 ----
  drivers/gpu/drm/gma500/gem.c                    | 30 ---------------------
  drivers/gpu/drm/gma500/psb_drv.c                |  2 --
  drivers/gpu/drm/gma500/psb_drv.h                |  2 --
  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c |  2 --
  drivers/gpu/drm/i915/i915_drv.c                 |  1 -
  drivers/gpu/drm/meson/meson_drv.c               |  2 --
  drivers/gpu/drm/mgag200/mgag200_drv.c           |  1 -
  drivers/gpu/drm/msm/msm_drv.c                   |  1 -
  drivers/gpu/drm/mxsfb/mxsfb_drv.c               |  2 --
  drivers/gpu/drm/qxl/qxl_drv.c                   |  1 -
  drivers/gpu/drm/radeon/radeon_drv.c             |  1 -
  drivers/gpu/drm/sti/sti_drv.c                   |  2 --
  drivers/gpu/drm/tegra/drm.c                     |  2 --
Quoted 9 lines
  drivers/gpu/drm/tegra/gem.c                     | 21 ---------------
  drivers/gpu/drm/tegra/gem.h                     |  2 --
  drivers/gpu/drm/udl/udl_drv.c                   |  1 -
  drivers/gpu/drm/virtio/virtgpu_drv.c            |  1 -
  drivers/gpu/drm/virtio/virtgpu_drv.h            |  3 ---
  drivers/gpu/drm/virtio/virtgpu_gem.c            |  7 -----
  include/drm/drm_gem_cma_helper.h                |  5 ----
  30 files changed, 2 insertions(+), 171 deletions(-)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#38 lore raw

Den 16.08.2017 09.49, skrev Daniel Vetter:

Quoted 28 lines · Noralf Trønnes
Quoted 16 lines

Den 06.08.2017 17.40, skrev Noralf Trønnes:

Quoted 9 lines

This is a follow up with the patches that haven't been reviewed. First version:
https://lists.freedesktop.org/archives/dri-devel/2017-July/148101.html

Changes since version 1
-----------------------
- Exynos can also use drm_gem_dumb_map_offset() (Emil Velikov)
- Remove drm_gem_cma_dumb_map_offset() (Philipp Zabel)

Quoted 6 lines

Noralf.

Noralf Trønnes (19):
drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults drm/meson: Use .dumb_map_offset and .dumb_destroy defaults drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults

Quoted 7 lines

I'd appreciate if someone could ack the remaining cma specific patches to get the function out of the way:

[v2,01/19] drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults [v2,02/19] drm/meson: Use .dumb_map_offset and .dumb_destroy defaults [v2,03/19] drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults [v2,19/19] drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

I did a bit more and looked at all the patches which don't have a reply from a maintainer yet. I've found a few more things to delete I think, but the patches are all

Quoted 6 lines

as-is. Feel free to do the additional removing (assuming I didn't miss anything) if you have time, but no worries if not.

Great work!

Thanks Daniel, I've applied all but armada. I'll respin it with the dma-buf check added to drm_gem_dumb_map_offset().

Noralf.

Quoted 57 lines

Cheers, Daniel

Quoted 55 lines

Noralf.

Quoted 40 lines

drm/sti: Use .dumb_map_offset and .dumb_destroy defaults drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults drm/cirrus: Use the drm_driver.dumb_destroy default drm/udl: Use the drm_driver.dumb_destroy default drm/qxl: Use the drm_driver.dumb_destroy default drm/ast: Use the drm_driver.dumb_destroy default drm/i915: Use the drm_driver.dumb_destroy default drm/msm: Use the drm_driver.dumb_destroy default drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults drm/mgag200: Use the drm_driver.dumb_destroy default drm/radeon: Use the drm_driver.dumb_destroy default drm/bochs: Use the drm_driver.dumb_destroy default drm/armada: Use the drm_driver.dumb_destroy default drm/virtio: Use the drm_driver.dumb_destroy default drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()

   drivers/gpu/drm/armada/armada_drv.c             |  1 -
   drivers/gpu/drm/armada/armada_gem.c             |  6 -----
   drivers/gpu/drm/armada/armada_gem.h             |  2 --
   drivers/gpu/drm/ast/ast_drv.c                   |  1 -
   drivers/gpu/drm/bochs/bochs_drv.c               |  1 -
   drivers/gpu/drm/cirrus/cirrus_drv.c             |  1 -
   drivers/gpu/drm/drm_gem_cma_helper.c            | 35 -------------------------
   drivers/gpu/drm/exynos/exynos_drm_drv.c         |  2 --
   drivers/gpu/drm/exynos/exynos_drm_gem.c         | 30 ++-------------------
   drivers/gpu/drm/exynos/exynos_drm_gem.h         |  5 ----
   drivers/gpu/drm/gma500/gem.c                    | 30 ---------------------
   drivers/gpu/drm/gma500/psb_drv.c                |  2 --
   drivers/gpu/drm/gma500/psb_drv.h                |  2 --
   drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c |  2 --
   drivers/gpu/drm/i915/i915_drv.c                 |  1 -
   drivers/gpu/drm/meson/meson_drv.c               |  2 --
   drivers/gpu/drm/mgag200/mgag200_drv.c           |  1 -
   drivers/gpu/drm/msm/msm_drv.c                   |  1 -
   drivers/gpu/drm/mxsfb/mxsfb_drv.c               |  2 --
   drivers/gpu/drm/qxl/qxl_drv.c                   |  1 -
   drivers/gpu/drm/radeon/radeon_drv.c             |  1 -
   drivers/gpu/drm/sti/sti_drv.c                   |  2 --
   drivers/gpu/drm/tegra/drm.c                     |  2 --
Quoted 9 lines
   drivers/gpu/drm/tegra/gem.c                     | 21 ---------------
   drivers/gpu/drm/tegra/gem.h                     |  2 --
   drivers/gpu/drm/udl/udl_drv.c                   |  1 -
   drivers/gpu/drm/virtio/virtgpu_drv.c            |  1 -
   drivers/gpu/drm/virtio/virtgpu_drv.h            |  3 ---
   drivers/gpu/drm/virtio/virtgpu_gem.c            |  7 -----
   include/drm/drm_gem_cma_helper.h                |  5 ----
   30 files changed, 2 insertions(+), 171 deletions(-)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel