mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Bely <vlwwwwww@gmail.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>
Cc: Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 2/2] drm/msm/gem: use guard(gem_lock) in has_vma()
Date: Sat,  5 Dec 2026 02:10:58 +0300	[thread overview]
Message-ID: <20261204231058.699120-3-vlwwwwww@gmail.com> (raw)
In-Reply-To: <20261204231058.699120-1-vlwwwwww@gmail.com>

Convert has_vma() from explicit msm_gem_lock()/msm_gem_unlock() to
guard(gem_lock)(obj) to match the rest of msm_gem.c while keeping the
preceding fix easy to backport to stable trees without guard(gem_lock).

Signed-off-by: Vladimir Bely <vlwwwwww@gmail.com>
---
 drivers/gpu/drm/msm/msm_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index aac5926fb..06b8bc44b 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -57,10 +57,10 @@ static bool has_vma(struct drm_gem_object *obj, struct drm_gpuvm *vm)
 {
 	struct drm_gpuvm_bo *vm_bo;
 
-	msm_gem_lock(obj);
+	guard(gem_lock)(obj);
+
 	vm_bo = drm_gpuvm_bo_find(vm, obj);
 	drm_gpuvm_bo_put(vm_bo);
-	msm_gem_unlock(obj);
 
 	return !!vm_bo;
 }
-- 
2.43.0


      parent reply	other threads:[~2026-12-04 23:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 23:10 [PATCH v4 0/2] drm/msm/gem: defer shared GPU VM teardown until last VMA user Vladimir Bely
2026-12-04 23:10 ` [PATCH v4 1/2] " Vladimir Bely
2026-12-04 23:10 ` Vladimir Bely [this message]

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=20261204231058.699120-3-vlwwwwww@gmail.com \
    --to=vlwwwwww@gmail.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®