Skip to content

Commit cd84f08

Browse files
committed
rust: drm/gpuvm: Add interruptible flag to exec_lock()
Signed-off-by: Asahi Lina <[email protected]>
1 parent 954e65b commit cd84f08

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

rust/kernel/drm/gpuvm.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ impl<T: DriverGpuVm> GpuVm<T> {
450450
pub fn exec_lock<'a, 'b>(
451451
&'a self,
452452
obj: Option<&'b <T::Driver as drv::Driver>::Object>,
453+
interruptible: bool,
453454
) -> Result<LockedGpuVm<'a, 'b, T>> {
454455
// Do not try to lock the object if it is internal (since it is already locked).
455456
let is_ext = obj.map(|a| self.is_extobj(a)).unwrap_or(false);
@@ -460,7 +461,11 @@ impl<T: DriverGpuVm> GpuVm<T> {
460461
vm_exec: KBox::init(
461462
init!(bindings::drm_gpuvm_exec {
462463
vm: self.gpuvm() as *mut _,
463-
flags: bindings::BINDINGS_DRM_EXEC_INTERRUPTIBLE_WAIT,
464+
flags: if interruptible {
465+
bindings::BINDINGS_DRM_EXEC_INTERRUPTIBLE_WAIT
466+
} else {
467+
0
468+
},
464469
exec: Default::default(),
465470
extra: match (is_ext, obj) {
466471
(true, Some(obj)) => bindings::drm_gpuvm_exec__bindgen_ty_1 {

0 commit comments

Comments
 (0)