drm/msm: Split out map/unmap ops
authorRob Clark <robdclark@chromium.org>
Sun, 29 Jun 2025 20:13:17 +0000 (13:13 -0700)
committerRob Clark <robin.clark@oss.qualcomm.com>
Sat, 5 Jul 2025 00:48:38 +0000 (17:48 -0700)
commitecfd9fa83fa03ba5e9e860189757d9761e72f31c
treee10695bb701e4b63acd67e0b26d28306912e8ebe
parente601ea31d66ba83d565cae9cfa45cbbcdd8286dd
drm/msm: Split out map/unmap ops

With async VM_BIND, the actual pgtable updates are deferred.
Synchronously, a list of map/unmap ops will be generated, but the
actual pgtable changes are deferred.  To support that, split out
op handlers and change the existing non-VM_BIND paths to use them.

Note in particular, the vma itself may already be destroyed/freed
by the time an UNMAP op runs (or even a MAP op if there is a later
queued UNMAP).  For this reason, the op handlers cannot reference
the vma pointer.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Tested-by: Antonino Maniscalco <antomani103@gmail.com>
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/661516/
drivers/gpu/drm/msm/msm_gem_vma.c