diff mbox

[1/3] drm/mxsfb: Use gem_free_object_unlocked

Message ID 20170717151045.4188-1-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter July 17, 2017, 3:10 p.m. UTC
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 :-)

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Marek Vasut <marex@denx.de>
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Anholt July 17, 2017, 6:01 p.m. UTC | #1
Daniel Vetter <daniel.vetter@ffwll.ch> writes:

> 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:

Reviewed-by: Eric Anholt <eric@anholt.net>
Daniel Vetter July 18, 2017, 6:31 a.m. UTC | #2
On Mon, Jul 17, 2017 at 11:01:33AM -0700, Eric Anholt wrote:
> Daniel Vetter <daniel.vetter@ffwll.ch> writes:
> 
> > 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:

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.

> Reviewed-by: Eric Anholt <eric@anholt.net>

Thanks for your review.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 1853557fef46..a34f41ce3599 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -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,