+ size = lseek(whandle->handle, SEEK_END, 0); + /* + * Could check errno to determine whether the kernel is new enough, but + * it doesn't really matter why this failed, just that it failed. + */ + if (size == (off_t)-1) { + FREE(bo); + goto fail; + } + lseek(whandle->handle, SEEK_SET, 0);
The lseek arguments are not in the right order
+ args.handle = bo->handle; + r = drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_BUSY, &args, sizeof(args)); + if (r) { + fprintf(stderr, "radeon: Failed to find initial domain for imported bo\n"); + radeon_bo_destroy(&bo->base); + return NULL; + }
the ioctl should be called again until it doesn't return -EBUSY. Axel Davy
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev