On Tue, Mar 7, 2017 at 7:52 PM, Dave Airlie <airl...@gmail.com> wrote:
> > +#ifndef SYNC_IOC_MAGIC > > +/* duplicated from linux/sync_file.h to avoid build-time depnedency > > + * on new (v4.7) kernel headers. Once distro's are mostly using > > + * something newer than v4.7 drop this and #include <linux/sync_file.h> > > + * instead. > > + */ > > +struct sync_merge_data { > > + char name[32]; > > + __s32 fd2; > > + __s32 fence; > > + __u32 flags; > > + __u32 pad; > > +}; > > + > > +#define SYNC_IOC_MAGIC '>' > > +#define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data) > > +#endif > > + > > +int > > +anv_gem_sync_file_merge(struct anv_device *device, int fd1, int fd2) > > +{ > > + const char name[] = "anv merge fence"; > > + struct sync_merge_data args = { > > + .fd2 = fd2, > > + .fence = -1, > > + }; > > + memcpy(args.name, name, sizeof(name)); > > + > > + int ret = anv_ioctl(device->fd, SYNC_IOC_MERGE, &args); > > + if (ret == -1) > > + return -1; > > + > > + return args.fence; > > +} > > This seems wrong, surely device->fd should be fd1 here? > Thanks! Fixed locally.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev