if (XE_IOCTL_ERR(xe, eci[0].gt_id >= xe->info.tile_count))
return -EINVAL;
- xe_pm_runtime_get(xe);
-
if (eci[0].engine_class == DRM_XE_ENGINE_CLASS_VM_BIND) {
for_each_gt(gt, xe, id) {
struct xe_engine *new;
logical_mask = bind_engine_logical_mask(xe, gt, eci,
args->width,
args->num_placements);
- if (XE_IOCTL_ERR(xe, !logical_mask)) {
- err = -EINVAL;
- goto put_rpm;
- }
+ if (XE_IOCTL_ERR(xe, !logical_mask))
+ return -EINVAL;
hwe = find_hw_engine(xe, eci[0]);
- if (XE_IOCTL_ERR(xe, !hwe)) {
- err = -EINVAL;
- goto put_rpm;
- }
+ if (XE_IOCTL_ERR(xe, !hwe))
+ return -EINVAL;
migrate_vm = xe_migrate_get_vm(gt->migrate);
new = xe_engine_create(xe, migrate_vm, logical_mask,
err = PTR_ERR(new);
if (e)
goto put_engine;
- goto put_rpm;
+ return err;
}
if (id == 0)
e = new;
logical_mask = calc_validate_logical_mask(xe, gt, eci,
args->width,
args->num_placements);
- if (XE_IOCTL_ERR(xe, !logical_mask)) {
- err = -EINVAL;
- goto put_rpm;
- }
+ if (XE_IOCTL_ERR(xe, !logical_mask))
+ return -EINVAL;
hwe = find_hw_engine(xe, eci[0]);
- if (XE_IOCTL_ERR(xe, !hwe)) {
- err = -EINVAL;
- goto put_rpm;
- }
+ if (XE_IOCTL_ERR(xe, !hwe))
+ return -EINVAL;
vm = xe_vm_lookup(xef, args->vm_id);
- if (XE_IOCTL_ERR(xe, !vm)) {
- err = -ENOENT;
- goto put_rpm;
- }
+ if (XE_IOCTL_ERR(xe, !vm))
+ return -ENOENT;
e = xe_engine_create(xe, vm, logical_mask,
args->width, hwe, ENGINE_FLAG_PERSISTENT);
xe_vm_put(vm);
- if (IS_ERR(e)) {
- err = PTR_ERR(e);
- goto put_rpm;
- }
+ if (IS_ERR(e))
+ return PTR_ERR(e);
}
if (args->extensions) {
put_engine:
xe_engine_kill(e);
xe_engine_put(e);
-put_rpm:
- xe_pm_runtime_put(xe);
return err;
}
trace_xe_engine_close(e);
xe_engine_put(e);
- xe_pm_runtime_put(xe);
return 0;
}