drm/xe/vm: Avoid asid lookup if none allocated
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Tue, 5 Dec 2023 14:41:42 +0000 (16:41 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:45:28 +0000 (11:45 -0500)
commit06d5ae90579e774934552ca023c4bbc56e8253f4
treedaafcef546774dcc1f32d7f98cfa016f9a51d362
parent5a92da34ddb4ec75a037d4a956afa993876c67d4
drm/xe/vm: Avoid asid lookup if none allocated

The destroy path can and will get called for incomplete
vm objects on error paths, where the asid is not yet allocated.
This leads to lookup fail and assert triggered.

Fix this by not asserting of asid existence if vm never
got assigned one.

Cc: Ohad Sharabi <osharabi@habana.ai>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_vm.c