From: Boris Brezillon <boris.brezillon@collabora.com>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Steven Price" <steven.price@arm.com>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Rob Clark" <robin.clark@oss.qualcomm.com>,
"Rob Herring" <robh@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v2 3/3] gpuvm: remove gem.gpuva.lock_dep_map
Date: Fri, 22 Aug 2025 11:55:43 +0200 [thread overview]
Message-ID: <20250822115543.62094f53@fedora> (raw)
In-Reply-To: <20250822-gpuva-mutex-in-gem-v2-3-c41a10d1d3b9@google.com>
On Fri, 22 Aug 2025 09:28:26 +0000
Alice Ryhl <aliceryhl@google.com> wrote:
> diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
> index 5934d8dc267a65aaf62d2d025869221cd110b325..85a25bbb387c4590678e4ba243b51acd94b008ed 100644
> --- a/include/drm/drm_gem.h
> +++ b/include/drm/drm_gem.h
> @@ -402,17 +402,22 @@ struct drm_gem_object {
> *
> * Provides the list of GPU VAs attached to this GEM object.
> *
> - * Drivers should lock list accesses with the GEMs &dma_resv lock
> - * (&drm_gem_object.resv) or a custom lock if one is provided. The
> - * mutex inside this struct may be used as the custom lock.
> + * When DRM_GPUVM_IMMEDIATE_MODE is set, this list is protected by the
> + * mutex. Otherwise, the list is protected by the GEMs &dma_resv lock.
> + *
> + * Note that all entries in this list must agree on whether
> + * DRM_GPUVM_IMMEDIATE_MODE is set.
> */
> struct {
> struct list_head list;
>
> + /**
> + * @gpuva.lock: Only used when DRM_GPUVM_IMMEDIATE_MODE is set.
> + * It should be safe to take this mutex during the fence
> + * signalling path, so do not allocate memory while holding
> + * this lock.
> + */
To follow-up on my comment on patch 1: this makes
drm_gem_object::gpuva::list the only field to not have a proper doc.
This patch is
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
regardless.
Thanks,
Boris
next prev parent reply other threads:[~2025-08-22 9:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 9:28 [PATCH v2 0/3] Add mutex to drm_gem_object.gpuva list Alice Ryhl
2025-08-22 9:28 ` [PATCH v2 1/3] drm_gem: add mutex to drm_gem_object.gpuva Alice Ryhl
2025-08-22 9:52 ` Boris Brezillon
2025-08-22 10:57 ` Alice Ryhl
2025-08-22 11:09 ` Boris Brezillon
2025-08-22 11:09 ` Danilo Krummrich
2025-08-22 9:28 ` [PATCH v2 2/3] panthor: use drm_gem_object.gpuva.lock instead of gpuva_list_lock Alice Ryhl
2025-08-22 9:28 ` [PATCH v2 3/3] gpuvm: remove gem.gpuva.lock_dep_map Alice Ryhl
2025-08-22 9:55 ` Boris Brezillon [this message]
2025-08-22 10:25 ` Danilo Krummrich
2025-08-22 10:58 ` Alice Ryhl
2025-08-27 13:35 ` Alice Ryhl
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=20250822115543.62094f53@fedora \
--to=boris.brezillon@collabora.com \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=lossin@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=ojeda@kernel.org \
--cc=robh@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tmgross@umich.edu \
--cc=tzimmermann@suse.de \
/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