Browse Source

drm/i915/perf: Drop redundant check for perf.initialised on reset

As we cannot have an exclusive stream set if the perf has not been
initialized, we only need to check for that exclusive stream.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170810175743.25401-3-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Chris Wilson 8 years ago
parent
commit
28b6cb0820
1 changed files with 2 additions and 5 deletions
  1. 2 5
      drivers/gpu/drm/i915/i915_perf.c

+ 2 - 5
drivers/gpu/drm/i915/i915_perf.c

@@ -2170,15 +2170,12 @@ void i915_oa_init_reg_state(struct intel_engine_cs *engine,
 			    struct i915_gem_context *ctx,
 			    struct i915_gem_context *ctx,
 			    u32 *reg_state)
 			    u32 *reg_state)
 {
 {
-	struct drm_i915_private *dev_priv = engine->i915;
-	struct i915_perf_stream *stream = dev_priv->perf.oa.exclusive_stream;
+	struct i915_perf_stream *stream;
 
 
 	if (engine->id != RCS)
 	if (engine->id != RCS)
 		return;
 		return;
 
 
-	if (!dev_priv->perf.initialized)
-		return;
-
+	stream = engine->i915->perf.oa.exclusive_stream;
 	if (stream)
 	if (stream)
 		gen8_update_reg_state_unlocked(ctx, reg_state, stream->oa_config);
 		gen8_update_reg_state_unlocked(ctx, reg_state, stream->oa_config);
 }
 }