summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_sync.c
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2023-12-05 10:56:17 -0800
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 11:46:09 -0500
commit53bf60f6d8503c788fee9c30dacef682edbe61fd (patch)
treefb781d702b7a9f902ac6d66e3a87fa7dfc8a68ad /drivers/gpu/drm/xe/xe_sync.c
parent3b97e3b265c97b7cd7dcbdb2f7ef93c6e6f94948 (diff)
downloadlinux-next-53bf60f6d8503c788fee9c30dacef682edbe61fd.tar.gz
linux-next-53bf60f6d8503c788fee9c30dacef682edbe61fd.zip
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_sync.c')
-rw-r--r--drivers/gpu/drm/xe/xe_sync.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
index 936227e79483..2a3f508722fc 100644
--- a/drivers/gpu/drm/xe/xe_sync.c
+++ b/drivers/gpu/drm/xe/xe_sync.c
@@ -98,10 +98,12 @@ static void user_fence_cb(struct dma_fence *fence, struct dma_fence_cb *cb)
int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
struct xe_sync_entry *sync,
struct drm_xe_sync __user *sync_user,
- bool exec, bool in_lr_mode)
+ unsigned int flags)
{
struct drm_xe_sync sync_in;
int err;
+ bool exec = flags & SYNC_PARSE_FLAG_EXEC;
+ bool in_lr_mode = flags & SYNC_PARSE_FLAG_LR_MODE;
bool signal;
if (copy_from_user(&sync_in, sync_user, sizeof(*sync_user)))