[PATCH v4 01/40] drm/gpuvm: Don't require obj lock in destructor path

Danilo Krummrich dakr at kernel.org
Fri May 16 09:01:35 UTC 2025


On Thu, May 15, 2025 at 02:57:46PM -0700, Rob Clark wrote:
> On Thu, May 15, 2025 at 10:55 AM Danilo Krummrich <dakr at kernel.org> wrote:
> > Anyways, I don't agree with that. Even if you can tweak your driver to not run
> > into trouble with this, we can't introduce a mode that violates GOUVM's internal
> > lifetimes and subsequently fix it up with WARN_ON() or BUG_ON().
> >
> > I still don't see a real technical reason why msm can't be reworked to follow
> > those lifetime rules.
> 
> The basic issue is that (a) it would be really awkward to have two
> side-by-side VM/VMA management/tracking systems.  But in legacy mode,
> we have the opposite direction of reference holding.  (But at the same
> time, don't need/use most of the features of gpuvm.)

Ok, let's try to move this forward; I see three options (in order of descending
preference):

  1) Rework the legacy code to properly work with GPUVM.
  2) Don't use GPUVM for the legacy mode.
  .
  .
  .
  3) Get an ACK from Dave / Sima to implement those workarounds for MSM in
     GPUVM.

If you go for 3), the code introduced by those two patches should be guarded
with a flag that makes it very clear that this is a workaround specifically
for MSM legacy mode and does not give any guarantees in terms of correctness
regarding lifetimes etc., e.g. DRM_GPUVM_MSM_LEGACY_QUIRK.

- Danilo


More information about the dri-devel mailing list