]> www.infradead.org Git - linux.git/commit
drm/xe: fix unbalanced rpm put() with fence_fini()
authorMatthew Auld <matthew.auld@intel.com>
Wed, 9 Oct 2024 08:48:09 +0000 (09:48 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Thu, 10 Oct 2024 08:15:58 +0000 (09:15 +0100)
commitcfcbc0520d5055825f0647ab922b655688605183
treea2262663c264c12c0465f529a9774c088f10cb03
parent8fb1da9f9bfb02f710a7f826d50781b0b030cf53
drm/xe: fix unbalanced rpm put() with fence_fini()

Currently we can call fence_fini() twice if something goes wrong when
sending the GuC CT for the tlb request, since we signal the fence and
return an error, leading to the caller also calling fini() on the error
path in the case of stack version of the flow, which leads to an extra
rpm put() which might later cause device to enter suspend when it
shouldn't. It looks like we can just drop the fini() call since the
fence signaller side will already call this for us.

There are known mysterious splats with device going to sleep even with
an rpm ref, and this could be one candidate.

v2 (Matt B):
  - Prefer warning if we detect double fini()

Fixes: 0a382f9bc5dc ("drm/xe: Hold a PM ref when GT TLB invalidations are inflight")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241009084808.204432-3-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h
drivers/gpu/drm/xe/xe_vm.c