Re: [PATCH i-g-t v2] lib/igt_gt: Allow non-default contexts to hang non-render rings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Vinay Belgaumkar (2017-10-11 18:16:23)
> This limitation does not exist for gen8+. It was removed by this patch-
> 
> commit f7978a0c581a8a840a28306f8da43e06e7fef3bf

So where is the mention of gen8 there? And where is the compatibility
test to determine the age of the kernel?

As a hint,

bool has_ctx_exec(int fd, unsigned ring) {
        struct drm_i915_gem_execbuffer2 execbuf;
        struct drm_i915_gem_exec_object2 exec;
	bool supported;

        /* 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 = gem_context_crate(fd);
        supported = __gem_execbuf(fd, &execbuf) == -ENOENT;
	gem_context_destroy(execbuf.rsvd1);

	return supported;
}
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux