Skip to contentSkip to conversation

drm/mxsfb: Use gem_free_object_unlocked

PATCH In review Daniel Vetter 4 participants 6 messages Jul 17, 2017 – Jul 18, 2017

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/mxsfb: Use gem_free_object_unlocked

CMA helpers are struct_mutex free, and so is the mxsfb itself. And that's the only valid reason for using gem_free_object. Please read the kerneldoc for this stuff :-)

---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +1 -1
index 1853557fef46..a34f41ce3599 100644
@@ -334,7 +334,7 @@ static struct drm_driver mxsfb_driver = {
 	.irq_uninstall		= mxsfb_irq_preinstall,
 	.enable_vblank		= mxsfb_enable_vblank,
 	.disable_vblank		= mxsfb_disable_vblank,
-	.gem_free_object	= drm_gem_cma_free_object,
+	.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,
Signature · 6 lines
2.13.2

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

PATCH 2/3 drm/pl111: Use gem_free_object_unlocked

CMA helpers are struct_mutex free, and so is the mxsfb itself. And that's the only valid reason for using gem_free_object. Please read the kerneldoc for this stuff :-)

---
 drivers/gpu/drm/pl111/pl111_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/pl111/pl111_drv.c +1 -1
index ac8771be70b0..8907bc261ab2 100644
@@ -161,7 +161,7 @@ static struct drm_driver pl111_drm_driver = {
 	.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 = drm_gem_cma_free_object,
+	.gem_free_object_unlocked = drm_gem_cma_free_object,
 	.gem_vm_ops = &drm_gem_cma_vm_ops,
 
 	.enable_vblank = pl111_enable_vblank,
Signature · 6 lines
2.13.2

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

PATCH 3/3 drm/zte: Use gem_free_object_unlocked

In reply to Daniel Vetter

CMA helpers are struct_mutex free, and so is the mxsfb itself. And that's the only valid reason for using gem_free_object. Please read the kerneldoc for this stuff :-)

---
 drivers/gpu/drm/zte/zx_drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/zte/zx_drm_drv.c +1 -1
index fe1aa5315e19..c983cdfa1e34 100644
@@ -59,7 +59,7 @@ static struct drm_driver zx_drm_driver = {
 	.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME |
 			   DRIVER_ATOMIC,
 	.lastclose = zx_drm_lastclose,
-	.gem_free_object = drm_gem_cma_free_object,
+	.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,
Signature · 6 lines
2.13.2

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

Re: [PATCH 3/3] drm/zte: Use gem_free_object_unlocked

Quoted 1 line · Daniel Vetter

CMA helpers are struct_mutex free, and so is the mxsfb itself. And

mxsfb copypasta

otherwise

Quoted 29 lines

that's the only valid reason for using gem_free_object. Please read the kerneldoc for this stuff :-)

---
 drivers/gpu/drm/zte/zx_drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/zte/zx_drm_drv.c +1 -1
index fe1aa5315e19..c983cdfa1e34 100644
@@ -59,7 +59,7 @@ static struct drm_driver zx_drm_driver = {
 	.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME |
 			   DRIVER_ATOMIC,
 	.lastclose = zx_drm_lastclose,
-	.gem_free_object = drm_gem_cma_free_object,
+	.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,
Signature · 6 lines
2.13.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/3
#4 lore raw
In reply to Daniel Vetter
Quoted 3 lines · Daniel Vetter

CMA helpers are struct_mutex free, and so is the mxsfb itself. And that's the only valid reason for using gem_free_object. Please read the kerneldoc for this stuff :-)

I'm sure all of these came from copy and paste, not the docs. That said, the CMA docs currently say:

* Drivers using the CMA helpers should set this as their
* &drm_driver.gem_free_object callback.

If you drop the complaint about us reading the docs, the series is:

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

#5 lore raw
Quoted 6 lines · Eric Anholt
Quoted 3 lines · Daniel Vetter

CMA helpers are struct_mutex free, and so is the mxsfb itself. And that's the only valid reason for using gem_free_object. Please read the kerneldoc for this stuff :-)

Quoted 7 lines

I'm sure all of these came from copy and paste, not the docs. That said, the CMA docs currently say:

* Drivers using the CMA helpers should set this as their
* &drm_driver.gem_free_object callback.

If you drop the complaint about us reading the docs, the series is:

I did double-check the docs for the two hooks to make sure they explain this, but forgot to check the one in the cma helpers. I'll follow-up with a patch to rectify that.

Quoted 1 line

Thanks for your review.
-Daniel

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