Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae504be2 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin
Browse files

drm/i915: Downgrade incorrect engine constructor usage warnings to development



Render engine constructor helpers must only be called from the render
engine constructors, but there is no need to burden the production
binaries with warnings which can only be triggered during development.

Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMichel Thierry <michel.thierry@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180119100005.9072-1-tvrtko.ursulin@linux.intel.com
parent c0cfb10d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1394,7 +1394,8 @@ int init_workarounds_ring(struct intel_engine_cs *engine)
	struct drm_i915_private *dev_priv = engine->i915;
	int err;

	WARN_ON(engine->id != RCS);
	if (GEM_WARN_ON(engine->id != RCS))
		return -EINVAL;

	dev_priv->workarounds.count = 0;
	dev_priv->workarounds.hw_whitelist_count[engine->id] = 0;
+1 −1
Original line number Diff line number Diff line
@@ -1414,7 +1414,7 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)
	unsigned int i;
	int ret;

	if (WARN_ON(engine->id != RCS || !engine->scratch))
	if (GEM_WARN_ON(engine->id != RCS || !engine->scratch))
		return -EINVAL;

	switch (INTEL_GEN(engine->i915)) {