[Mesa-dev] [PATCH 8/9] gallium/radeon: Implement hooks for DRI Image 7

Axel Davy axel.davy at ens.fr
Fri Nov 22 13:16:41 PST 2013


>+        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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131122/10615ac7/attachment.html>


More information about the mesa-dev mailing list