[PATCH] drm/i915: Less verbose engine startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

To decrease log spam on GPU reset in case of execlists we move the engine
init messages from the init vfunc to intel_engines_init.

This way on startup we still get information on all available engines in
debug logs, and we replace the reset/resume side of things with a single
line which outputs simply a number of initialized engines (so that there
is less doubt on whether the actual code has been executed).

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_gem.c        | 4 ++++
 drivers/gpu/drm/i915/intel_engine_cs.c | 2 ++
 drivers/gpu/drm/i915/intel_lrc.c       | 1 -
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index bb67774b52c0..7b6af3cd27c4 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5055,14 +5055,18 @@ static int __i915_gem_restart_engines(void *data)
 	struct drm_i915_private *i915 = data;
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
+	unsigned int count = 0;
 	int err;
 
 	for_each_engine(engine, i915, id) {
 		err = engine->init_hw(engine);
 		if (err)
 			return err;
+		count++;
 	}
 
+	DRM_DEBUG_DRIVER("Initialized %u engines\n", count);
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index d186a218809f..8f37a6082256 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -348,6 +348,8 @@ int intel_engines_init(struct drm_i915_private *dev_priv)
 			goto cleanup;
 
 		GEM_BUG_ON(!engine->submit_request);
+
+		DRM_DEBUG_DRIVER("%s initialized\n", engine->name);
 	}
 
 	return 0;
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 80c0daa55d25..67bde4297516 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1479,7 +1479,6 @@ static int gen8_init_common_ring(struct intel_engine_cs *engine)
 	intel_engine_init_hangcheck(engine);
 
 	enable_execlists(engine);
-	DRM_DEBUG_DRIVER("Execlists enabled for %s\n", engine->name);
 
 	GEM_BUG_ON(engine->id >= ARRAY_SIZE(gtiir));
 
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux