Commit a2387e69 authored by Umesh Nerlige Ramappa's avatar Umesh Nerlige Ramappa Committed by Lucas De Marchi
Browse files

drm/xe: Take a ref to xe file when user creates a VM

parent ce8c161c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1670,6 +1670,10 @@ static void vm_destroy_work_func(struct work_struct *w)
		XE_WARN_ON(vm->pt_root[id]);

	trace_xe_vm_free(vm);

	if (vm->xef)
		xe_file_put(vm->xef);

	kfree(vm);
}

@@ -1802,7 +1806,7 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data,
	}

	args->vm_id = id;
	vm->xef = xef;
	vm->xef = xe_file_get(xef);

	/* Record BO memory for VM pagetable created against client */
	for_each_tile(tile, xe, id)