drm/i95: Initialize active ring->pid to -1
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Jun 2014 11:09:29 +0000 (12:09 +0100)
committerJani Nikula <jani.nikula@intel.com>
Wed, 11 Jun 2014 08:06:43 +0000 (11:06 +0300)
Otherwise we print out spurious processes on unused rings in the error
state.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_gpu_error.c

index 87ec60e181a716bd46d4cf2c196552962204941f..66cf41765bf94eafdf6cd5f50e11e347c77003bf 100644 (file)
@@ -888,6 +888,8 @@ static void i915_gem_record_rings(struct drm_device *dev,
        for (i = 0; i < I915_NUM_RINGS; i++) {
                struct intel_engine_cs *ring = &dev_priv->ring[i];
 
+               error->ring[i].pid = -1;
+
                if (ring->dev == NULL)
                        continue;
 
@@ -895,7 +897,6 @@ static void i915_gem_record_rings(struct drm_device *dev,
 
                i915_record_ring_state(dev, ring, &error->ring[i]);
 
-               error->ring[i].pid = -1;
                request = i915_gem_find_active_request(ring);
                if (request) {
                        /* We need to copy these to an anonymous buffer