drm/i915: Reset state after a GPU reset or resume
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 24 Jan 2011 15:14:41 +0000 (15:14 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 25 Jan 2011 19:23:28 +0000 (19:23 +0000)
Call drm_mode_config_reset() after an invalidation event to restore any
cached state to unknown.

Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_drv.c

index 66796bb82d3e540b1db6d356308916a534be22b5..e517447b0880cb87e6d920e237eeee104d07d1c2 100644 (file)
@@ -354,6 +354,7 @@ static int i915_drm_thaw(struct drm_device *dev)
                error = i915_gem_init_ringbuffer(dev);
                mutex_unlock(&dev->struct_mutex);
 
+               drm_mode_config_reset(dev);
                drm_irq_install(dev);
 
                /* Resume the modeset for every activated CRTC */
@@ -542,6 +543,7 @@ int i915_reset(struct drm_device *dev, u8 flags)
 
                mutex_unlock(&dev->struct_mutex);
                drm_irq_uninstall(dev);
+               drm_mode_config_reset(dev);
                drm_irq_install(dev);
                mutex_lock(&dev->struct_mutex);
        }