diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-29 12:37:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-30 11:50:42 +0100 |
commit | a56277216637c359e9125b9c16be09f21ed2a395 (patch) | |
tree | 26ebf0e5843e9a298504437e0791ed923afc3c12 /drivers/gpu/drm/i915/gt/intel_mocs.c | |
parent | 1032a2af93f58ff12996f6122a8a488979ea22a8 (diff) | |
download | linux-a56277216637c359e9125b9c16be09f21ed2a395.tar.bz2 |
drm/i915: Inline engine->init_context into its caller
We only use the init_context vfunc once while recording the default
context state, and we use the same sequence in each backend (eliding
steps that do not apply). Remove the vfunc for simplicity and
de-duplication.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190729113720.24830-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_mocs.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_mocs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c b/drivers/gpu/drm/i915/gt/intel_mocs.c index 290a5e9b90b9..e082b25d2db1 100644 --- a/drivers/gpu/drm/i915/gt/intel_mocs.c +++ b/drivers/gpu/drm/i915/gt/intel_mocs.c @@ -568,11 +568,14 @@ void intel_mocs_init_l3cc_table(struct intel_gt *gt) * * Return: 0 on success, otherwise the error status. */ -int intel_rcs_context_init_mocs(struct i915_request *rq) +int intel_mocs_emit(struct i915_request *rq) { struct drm_i915_mocs_table t; int ret; + if (rq->engine->class != RENDER_CLASS) + return 0; + if (get_mocs_settings(rq->engine->gt, &t)) { /* Program the RCS control registers */ ret = emit_mocs_control_table(rq, &t); |