Quoting Vinay Belgaumkar (2017-10-13 00:22:17) > +static bool has_ctx_exec(int fd, unsigned ring, uint32_t ctx) > +{ > + struct drm_i915_gem_execbuffer2 execbuf; > + struct drm_i915_gem_exec_object2 exec; > + > + /* silly ABI, the kernel thinks everyone who has BSD also has BSD2 */ > + if ((ring & ~(3<<13)) == I915_EXEC_BSD) { > + if (ring & (3 << 13) && !gem_has_bsd2(fd)) > + return false; > + } > + > + memset(&exec, 0, sizeof(exec)); > + memset(&execbuf, 0, sizeof(execbuf)); > + execbuf.buffers_ptr = to_user_pointer(&exec); > + execbuf.buffer_count = 1; > + execbuf.flags = ring; > + execbuf.rsvd1 = ctx; > + /* > + * If context submission is not allowed, this will return EINVAL > + * Otherwise, this will return ENOENT on account of no gem obj > + * being submitted > + */ > + return (__gem_execbuf(fd, &execbuf) == -ENOENT); Is return (a function)? Brackets shouldn't be used to confused the unsuspecting reader. ;) -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx