drm/msm/gem: Unpin buffers earlier
authorRob Clark <robdclark@chromium.org>
Tue, 2 Aug 2022 15:51:44 +0000 (08:51 -0700)
committerRob Clark <robdclark@chromium.org>
Sat, 27 Aug 2022 16:32:45 +0000 (09:32 -0700)
commitf371bcc0c2ac57a237849487c9aacbae394e69d1
tree2ef544faf2bff07ab7dc539a5206238feb15544d
parentb352ba54a82072614f44c5ea352b5ea6e7f7b4c0
drm/msm/gem: Unpin buffers earlier

We've already attached the fences, so obj->resv (which shrinker checks)
tells us whether they are still active.  So we can unpin sooner, before
we drop the queue lock.

This also avoids the need to grab the obj lock in the retire path,
avoiding potential for lock contention between submit and retire.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/496132/
Link: https://lore.kernel.org/r/20220802155152.1727594-12-robdclark@gmail.com
drivers/gpu/drm/msm/msm_gem_submit.c