summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_vm.c
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2023-12-05 21:56:17 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:46:09 +0300
commit53bf60f6d8503c788fee9c30dacef682edbe61fd (patch)
treefb781d702b7a9f902ac6d66e3a87fa7dfc8a68ad /drivers/gpu/drm/xe/xe_vm.c
parent3b97e3b265c97b7cd7dcbdb2f7ef93c6e6f94948 (diff)
downloadlinux-53bf60f6d8503c788fee9c30dacef682edbe61fd.tar.xz
drm/xe: Use a flags field instead of bools for sync parse
Use a flags field instead of severval bools for sync parse as it is easier to read and less bug prone. v2: Pull in header change from subsequent patch Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_vm.c')
-rw-r--r--drivers/gpu/drm/xe/xe_vm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 7b38338ab5e2..d1e53905268f 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2994,8 +2994,9 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
syncs_user = u64_to_user_ptr(args->syncs);
for (num_syncs = 0; num_syncs < args->num_syncs; num_syncs++) {
err = xe_sync_entry_parse(xe, xef, &syncs[num_syncs],
- &syncs_user[num_syncs], false,
- xe_vm_in_lr_mode(vm));
+ &syncs_user[num_syncs],
+ xe_vm_in_lr_mode(vm) ?
+ SYNC_PARSE_FLAG_LR_MODE : 0);
if (err)
goto free_syncs;
}