drm/i915/guc: Proper xarray usage for contexts_lookup
authorMatthew Brost <matthew.brost@intel.com>
Thu, 9 Sep 2021 16:47:39 +0000 (09:47 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Mon, 13 Sep 2021 18:30:48 +0000 (11:30 -0700)
commit1424ba81a2d056008adebab21bf633c420235e3c
treec63929b411c1cc6df7692b3597b7efba3393ab5e
parent0f7976506de615abfcc54e2469417c69ff2b030f
drm/i915/guc: Proper xarray usage for contexts_lookup

Lock the xarray and take ref to the context if needed.

v2:
 (Checkpatch)
  - Add new line after declaration
 (Daniel Vetter)
  - Correct put / get accounting in xa_for_loops
v3:
 (Checkpatch)
  - Extra new line

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-19-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c