drm/xe: don't allocate under ct->lock
authorMatthew Auld <matthew.auld@intel.com>
Wed, 24 May 2023 17:56:53 +0000 (18:56 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:34:09 +0000 (18:34 -0500)
commit565ce72e1c2d540d36ade02e6a7479c4c6a7f2d4
treed0ba64cc274b1080fbe01145049af44c7fab7cad
parenta2f9f4ff07aac81e80ff1e0913fdbfdde6ba6665
drm/xe: don't allocate under ct->lock

Seems to be a sensitive lock, where ct->lock looks to be primed with
fs_reclaim, so holding that and then allocating memory will cause
lockdep to complain. We need to change the ordering wrt to grabbing the
ct->lock and potentially grabbing the runtime_pm, since some of the
runtime_pm routines can allocate memory (or at least that's what lockdep
seems to suggest).

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
drivers/gpu/drm/xe/xe_guc_ct.c