Skip to content

Commit cff601b

Browse files
committed
Merge tag 'drm-xe-next-fixes-2023-12-26' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
- Fix couple unfined behavior cases to calm UBSAN and clang (Matt Brost, Lucas) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ZYsbDPBLUiqDevLt@intel.com
2 parents 9224271 + 315acff commit cff601b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/xe/xe_vm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ static int add_preempt_fences(struct xe_vm *vm, struct xe_bo *bo)
279279
struct xe_exec_queue *q;
280280
int err;
281281

282+
if (!vm->preempt.num_exec_queues)
283+
return 0;
284+
282285
err = xe_bo_lock(bo, true);
283286
if (err)
284287
return err;

drivers/gpu/drm/xe/xe_wait_user_fence.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static int do_compare(u64 addr, u64 value, u64 mask, u16 op)
4646
break;
4747
default:
4848
XE_WARN_ON("Not possible");
49+
return -EINVAL;
4950
}
5051

5152
return passed ? 0 : 1;

0 commit comments

Comments
 (0)