[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DF26WBIDPMPU.3E6XTUPMZTHW1@kernel.org>
Date: Fri, 19 Dec 2025 13:25:05 +0100
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Alice Ryhl" <aliceryhl@...gle.com>
Cc: "Daniel Almeida" <daniel.almeida@...labora.com>, "Matthew Brost"
<matthew.brost@...el.com>, Thomas Hellström
<thomas.hellstrom@...ux.intel.com>, "Maarten Lankhorst"
<maarten.lankhorst@...ux.intel.com>, "Maxime Ripard" <mripard@...nel.org>,
"Thomas Zimmermann" <tzimmermann@...e.de>, "David Airlie"
<airlied@...il.com>, "Simona Vetter" <simona@...ll.ch>, "Boris Brezillon"
<boris.brezillon@...labora.com>, "Steven Price" <steven.price@....com>,
"Liviu Dudau" <liviu.dudau@....com>, "Miguel Ojeda" <ojeda@...nel.org>,
"Boqun Feng" <boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>, "Benno Lossin"
<lossin@...nel.org>, "Andreas Hindborg" <a.hindborg@...nel.org>, "Trevor
Gross" <tmgross@...ch.edu>, "Frank Binns" <frank.binns@...tec.com>, "Matt
Coster" <matt.coster@...tec.com>, "Rob Clark"
<robin.clark@....qualcomm.com>, "Dmitry Baryshkov" <lumag@...nel.org>,
"Abhinav Kumar" <abhinav.kumar@...ux.dev>, "Jessica Zhang"
<jessica.zhang@....qualcomm.com>, "Sean Paul" <sean@...rly.run>, "Marijn
Suijten" <marijn.suijten@...ainline.org>, "Lyude Paul" <lyude@...hat.com>,
"Lucas De Marchi" <lucas.demarchi@...el.com>, "Rodrigo Vivi"
<rodrigo.vivi@...el.com>, "Sumit Semwal" <sumit.semwal@...aro.org>,
Christian König <christian.koenig@....com>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
<rust-for-linux@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
<freedreno@...ts.freedesktop.org>, <nouveau@...ts.freedesktop.org>,
<intel-xe@...ts.freedesktop.org>, <linux-media@...r.kernel.org>,
<linaro-mm-sig@...ts.linaro.org>
Subject: Re: [PATCH 2/4] drm/gpuvm: drm_gpuvm_bo_obtain() requires lock and
staged mode
On Fri Nov 28, 2025 at 3:14 PM CET, Alice Ryhl wrote:
> In the previous commit we updated drm_gpuvm_bo_obtain_prealloc() to take
> locks internally, which means that it's only usable in immediate mode.
> In this commit, we notice that drm_gpuvm_bo_obtain() requires you to use
> staged mode. This means that we now have one variant of obtain for each
> mode you might use gpuvm in.
>
> To reflect this information, we add a warning about using it in
> immediate mode, and to make the distinction clearer we rename the method
> with a _locked() suffix so that it's clear that it requires the caller
> to take the locks.
>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
Ultimately, the two different approaches of obtaining a VM_BO have always been
desinged for the two different modes of operation -- great to see this refined!
Given that, I think it would be great to update the "Locking" section of the
GPUVM's documentation and expand it with a new section "Modes of Operation".
Mind sending a follow-up patch / series for this?
Powered by blists - more mailing lists