[igt-dev] [PATCH i-g-t 01/10] lib/syncobj: drop local declarations

Chris Wilson chris at chris-wilson.co.uk
Wed Nov 20 21:49:03 UTC 2019


Quoting Lionel Landwerlin (2019-11-20 21:21:34)
> We have copies of the DRM uAPI headers in the repo, so drop the local
> declaration of syncobj defines/types.
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  lib/igt_syncobj.c     | 16 ++++++------
>  lib/igt_syncobj.h     | 26 +------------------
>  tests/syncobj_basic.c |  2 +-
>  tests/syncobj_wait.c  | 58 +++++++++++++++++++++----------------------
>  4 files changed, 39 insertions(+), 63 deletions(-)
> 
> diff --git a/lib/igt_syncobj.c b/lib/igt_syncobj.c
> index 0fddb97a..e5569ffc 100644
> --- a/lib/igt_syncobj.c
> +++ b/lib/igt_syncobj.c
> @@ -170,10 +170,10 @@ syncobj_import_sync_file(int fd, uint32_t handle, int sync_file)
>  }
>  
>  int
> -__syncobj_wait(int fd, struct local_syncobj_wait *args)
> +__syncobj_wait(int fd, struct drm_syncobj_wait *args)
>  {
>         int err = 0;
> -       if (drmIoctl(fd, LOCAL_IOCTL_SYNCOBJ_WAIT, args))
> +       if (drmIoctl(fd, DRM_IOCTL_SYNCOBJ_WAIT, args))

s/drmIoctl/igt_ioctl/ as well, just in case we ever want to do signal
injection or measure latencies.

>                 err = -errno;

When we return err, clear errno -- it just muddies up the igt_assert()
if we already know it.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the igt-dev mailing list