All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH 6/6] drm/omap: gem: Switch to gem_free_object_unlocked()
Date: Mon,  2 Apr 2018 21:50:38 +0300	[thread overview]
Message-ID: <20180402185038.18418-7-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20180402185038.18418-1-laurent.pinchart@ideasonboard.com>

From: Daniel Vetter <daniel.vetter@ffwll.ch>

The only thing that omap_gem_free_object does that might need the magic
protection of struct_mutex (of keeping all objects alive if that lock is
held, even if the last reference is gone) is the mm_list manipulation.
This is already protected by the separate omapdrm->list_lock, which
means that struct_mutex is not needed by omapdrm. We can switch to
gem_free_object_unlocked()

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
Changes since v2:

- Rebased on top of struct_mutex removal and rephrased commit message
accordingly
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 5fcf9eaf3eaf..5005ecc284d2 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -493,7 +493,7 @@ static struct drm_driver omap_drm_driver = {
 	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
 	.gem_prime_export = omap_gem_prime_export,
 	.gem_prime_import = omap_gem_prime_import,
-	.gem_free_object = omap_gem_free_object,
+	.gem_free_object_unlocked = omap_gem_free_object,
 	.gem_vm_ops = &omap_gem_vm_ops,
 	.dumb_create = omap_gem_dumb_create,
 	.dumb_map_offset = omap_gem_dumb_map_offset,
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-04-02 18:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02 18:50 [PATCH 0/6] omapdrm: struct_mutex removal Laurent Pinchart
2018-04-02 18:50 ` [PATCH 1/6] drm/omap: gem: Rename GEM function with omap_gem_* prefix Laurent Pinchart
2018-04-02 18:50 ` [PATCH 2/6] drm/omap: gem: Merge __omap_gem_get_pages() and omap_gem_attach_pages() Laurent Pinchart
2018-04-04 13:37   ` Lucas Stach
2018-04-04 16:18     ` Daniel Vetter
2018-04-24 11:42       ` Laurent Pinchart
2018-04-02 18:50 ` [PATCH 3/6] drm/omap: gem: Don't take struct_mutex to get GEM object mmap offset Laurent Pinchart
2018-04-03  8:55   ` Daniel Vetter
2018-04-02 18:50 ` [PATCH 4/6] drm/omap: gem: Replace struct_mutex usage with omap_obj private lock Laurent Pinchart
2018-04-02 18:50 ` [PATCH 5/6] drm/omap: gem: Fix mm_list locking Laurent Pinchart
2018-04-02 18:50 ` Laurent Pinchart [this message]
2018-05-23  9:42 ` [PATCH 0/6] omapdrm: struct_mutex removal Tomi Valkeinen
2018-05-25 11:15   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180402185038.18418-7-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.