<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">>+ 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);<pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"></pre>
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
</pre>
</body>
</html>