2 * SPDX-License-Identifier: MIT
4 * Copyright © 2018 Intel Corporation
7 #include "igt_gem_utils.h"
9 #include "gt/intel_context.h"
11 #include "../i915_gem_context.h"
12 #include "../i915_gem_pm.h"
13 #include "../i915_request.h"
16 igt_request_alloc(struct i915_gem_context *ctx, struct intel_engine_cs *engine)
18 struct intel_context *ce;
19 struct i915_request *rq;
22 * Pinning the contexts may generate requests in order to acquire
23 * GGTT space, so do this first before we reserve a seqno for
26 ce = i915_gem_context_get_engine(ctx, engine->id);
30 rq = intel_context_create_request(ce);
31 intel_context_put(ce);