Re: [PATCH 3/5] drm/syncobj: add sync_file interaction.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Dave Airlie (2017-05-12 01:34:55)
> @@ -385,6 +434,13 @@ drm_syncobj_fd_to_handle_ioctl(struct drm_device *dev, void *data,
>         if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
>                 return -ENODEV;
>  
> +       if (args->flags & DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE_FENCE)
> +               return drm_syncobj_import_sync_file_fence(file_private,
> +                                                         args->fd,
> +                                                         args->handle);
> +       else if (args->flags)
> +               return -EINVAL;

Argh, what I missed before was that importing from a sync_file reuses
the handle, but importing from a syncobj fd creates a new handle.

Just venting my ocd. It would be nice if the interface was consistent,
and I can see arguments for both approaches (just not a good argument as
to why they should differ). A compromise would be a flag to create/reuse
handle (or if handle=0, create, if handle!=0 resuse).
-Chris
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux