Bug 78792 - [regression] module reload Oopses all over the place
Summary: [regression] module reload Oopses all over the place
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-16 17:43 UTC by Daniel Vetter
Modified: 2017-07-24 22:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (77.76 KB, text/plain)
2014-05-16 17:43 UTC, Daniel Vetter
no flags Details

Description Daniel Vetter 2014-05-16 17:43:51 UTC
Created attachment 99166 [details]
dmesg

Spotted on my gm45, not yet confirmed/tested anywhere else. Also not yet bisected.
Comment 1 Chris Wilson 2014-05-16 17:53:22 UTC
For the final explosion:

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 55b3e52..4c7cd24 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -454,6 +454,8 @@ void i915_gem_context_fini(struct drm_device *dev)
                        i915_gem_context_unreference(dctx);
                        dev_priv->ring[RCS].last_context = NULL;
                }
+
+               i915_gem_object_ggtt_unpin(dctx->obj);
        }
 
        for (i = 0; i < I915_NUM_RINGS; i++) {
@@ -466,7 +468,6 @@ void i915_gem_context_fini(struct drm_device *dev)
                ring->last_context = NULL;
        }
 
-       i915_gem_object_ggtt_unpin(dctx->obj);
        i915_gem_context_unreference(dctx);
 }
Comment 2 Daniel Vetter 2014-05-16 20:32:04 UTC
Works like a charm, thanks for spotting this quickly and please submit to intel-gfx.
Comment 3 Daniel Vetter 2014-05-16 20:32:16 UTC
commit d3b448d9917a3d6531e499d88bfb13ea5e31e4ad
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri May 16 18:59:00 2014 +0100

    drm/i915: Only unpin the default ctx object if it exists


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.