diff options
author | Matthew Auld <matthew.auld@intel.com> | 2023-07-13 12:00:49 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:37:37 +0300 |
commit | ee82d2da9c8ac13486550b2c86068e1d6edddf51 (patch) | |
tree | a77e2a1ebcbd0e408423c2dd5947779b13195a8f /drivers/gpu/drm/xe/tests | |
parent | 5a142f9c675ab524a5f18457859ed2002507ea74 (diff) | |
download | linux-ee82d2da9c8ac13486550b2c86068e1d6edddf51.tar.xz |
drm/xe: add missing bulk_move reset
It looks like bulk_move is set during object construction, but is only
removed on object close, however in various places we might not yet have
an actual fd to close, like on the error paths for the gem_create ioctl,
and also one internal user for the evict_test_run_gt() selftest. Try to
handle those cases by manually resetting the bulk_move. This should
prevent triggering:
WARNING: CPU: 7 PID: 8252 at drivers/gpu/drm/ttm/ttm_bo.c:327
ttm_bo_release+0x25e/0x2a0 [ttm]
v2 (Nirmoy):
- It should be safe to just unconditionally call
__xe_bo_unset_bulk_move() in most places.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/tests')
-rw-r--r-- | drivers/gpu/drm/xe/tests/xe_bo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c index 5d60dc6bfe71..b32a9068d76c 100644 --- a/drivers/gpu/drm/xe/tests/xe_bo.c +++ b/drivers/gpu/drm/xe/tests/xe_bo.c @@ -283,6 +283,10 @@ static int evict_test_run_gt(struct xe_device *xe, struct xe_gt *gt, struct kuni xe_bo_unlock(external, &ww); xe_bo_put(external); + + xe_bo_lock(bo, &ww, 0, false); + __xe_bo_unset_bulk_move(bo); + xe_bo_unlock(bo, &ww); xe_bo_put(bo); continue; @@ -293,6 +297,9 @@ cleanup_all: cleanup_external: xe_bo_put(external); cleanup_bo: + xe_bo_lock(bo, &ww, 0, false); + __xe_bo_unset_bulk_move(bo); + xe_bo_unlock(bo, &ww); xe_bo_put(bo); break; } |