diff options
author | Oscar Mateo <oscar.mateo@intel.com> | 2017-04-10 07:34:31 -0700 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-04-11 12:58:10 +0100 |
commit | 6e516148f35401029ac920e323cce34266c22e6d (patch) | |
tree | 57f23df31862fdf6dfbf585993d724cea153d53b /drivers/gpu/drm/i915/selftests/mock_engine.c | |
parent | 5ff36d36a36d55c8bd4bc937b6a9450b72853c5f (diff) | |
download | talos-obmc-linux-6e516148f35401029ac920e323cce34266c22e6d.tar.gz talos-obmc-linux-6e516148f35401029ac920e323cce34266c22e6d.zip |
drm/i915: Generate the engine name based on the instance number
Not really needed, but makes the next change a little bit more compact.
v2:
- Use zero-based numbering for engine names: xcs0, xcs1.. xcsN (Tvrtko, Chris)
- Make sure the mock engine name is null-terminated (Tvrtko, Chris)
v3: Because I'm stupid (Chris)
v4: Verify engine name wasn't truncated (Michal)
v5:
- Kill the warning in mock engine (Chris)
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1491834873-9345-4-git-send-email-oscar.mateo@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/mock_engine.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_engine.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_engine.c b/drivers/gpu/drm/i915/selftests/mock_engine.c index b89050e0de48..b8e53bdc3cc4 100644 --- a/drivers/gpu/drm/i915/selftests/mock_engine.c +++ b/drivers/gpu/drm/i915/selftests/mock_engine.c @@ -140,7 +140,7 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private *i915, /* minimal engine setup for requests */ engine->base.i915 = i915; - engine->base.name = name; + snprintf(engine->base.name, sizeof(engine->base.name), "%s", name); engine->base.id = id++; engine->base.status_page.page_addr = (void *)(engine + 1); |