Quoting Chris Wilson (2019-11-14 08:54:43)
> +static struct intel_engine_cs **
> +randomised_engines(struct intel_gt *gt,
> + struct rnd_state *prng,
> + unsigned int *count)
> +{
> + struct intel_engine_cs *engine, **engines;
> + enum intel_engine_id id;
> + int n;
> +
> + n = 0;
> + for_each_engine(engine, gt, id)
> + n++;
> + if (!n)
> + return NULL;
> +
> + engines = kmalloc_array(n, sizeof(*engines), GFP_KERNEL);
> + if (!engines)
> + return NULL;
> +
> + n = 0;
> + for_each_engine(engine, gt, id)
> + engines[n++] = engine;
> +
> + i915_prandom_shuffle(engines, sizeof(*engines), n, prng);
> +
*count = n;
> + return engines;
> +}
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
- [Intel-gfx] [PATCH] drm/i915/selftests: Exercise rc6 handling Chris Wilson
- Re: [Intel-gfx] [PATCH] drm/i915/selftests: Exercise rc6... Chris Wilson
- [Intel-gfx] [PATCH] drm/i915/selftests: Exercise rc6 han... Chris Wilson
- Re: [Intel-gfx] [PATCH] drm/i915/selftests: Exercise... Chris Wilson
- [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/sel... Patchwork
- [Intel-gfx] [PATCH] drm/i915/selftests: Exercise rc6 han... Chris Wilson
- [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests:... Patchwork
- [Intel-gfx] [PATCH] drm/i915/selftests: Exercise rc6 han... Chris Wilson
- [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/sel... Patchwork
- [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests:... Patchwork
- [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/selftests:... Patchwork
