[Intel-gfx] [PATCH i-g-t v2 4/7] tests/gem_scheduler: Add gem_scheduler test

Dave Gordon david.s.gordon at intel.com
Mon Mar 7 12:40:38 UTC 2016


On 02/03/16 20:15, Chris Wilson wrote:
>> +static struct ring {
>> +	const char *name;
>> +	int id;
>> +	bool exists;
>> +} rings[] = {
>> +	{ "render", I915_EXEC_RENDER, false },
>> +	{ "bsd1",    I915_EXEC_BSD | 1<<13, false },
>> +	{ "bsd2",    I915_EXEC_BSD | 2<<13, false },
>
> This is wrong. The timeline is coupled to the exec_id, which is the same
> for "both" BSD engines. To fix that, properly split up the two rings
> with separate ids and deprecate HAS_BSD2.
>
>> +	{ "blt",    I915_EXEC_BLT, false },
>> +	{ "vebox",  I915_EXEC_VEBOX, false },
>> +};
>> +
>> +#define NBR_RINGS (sizeof(rings)/sizeof(struct ring))
>
> Also see intel_execution_engines to save on duplicating code.
> -Chris

exec_id is indeed the same for both BSD engines, but it is used ONLY in
i915_gem_busy_ioctl(), whose result can tell you that "a" BSD engine is 
busy but not which one -- probably callers don't care anyway.

.Dave.


More information about the Intel-gfx mailing list