diff options
author | Eric Anholt <eric@anholt.net> | 2008-05-21 15:03:47 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-05-21 15:04:07 -0700 |
commit | 7078978db0e014a2621984f6c67ca65fa4f23f3a (patch) | |
tree | c7685cfa71d64b2af3ffbc7ec0d5f15177ef7d3b | |
parent | f8e38e49dd70bf4a5ef97c29f0c405a1fc5023f5 (diff) |
[gem] Hold a reference on the object in i915_gem_wait_space.
Otherwise, in the middle of the function called using it the last ref
might disappear.
-rw-r--r-- | linux-core/i915_gem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c index 8e5539f5..e01823fb 100644 --- a/linux-core/i915_gem.c +++ b/linux-core/i915_gem.c @@ -982,7 +982,9 @@ i915_gem_wait_space(struct drm_device *dev) list); if (obj_priv == last_priv) break; + drm_gem_object_reference(obj_priv->obj); ret = i915_gem_object_wait_rendering(obj_priv->obj); + drm_gem_object_unreference(obj_priv->obj); if (ret) break; last_priv = obj_priv; |