summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-05-02 17:50:46 -0700
committerEric Anholt <eric@anholt.net>2008-05-02 17:50:46 -0700
commit166ff364fb09ec9885a164fca517c079a1d88718 (patch)
tree1bb0f9a912527e31329121cdb61e0cdafdc62bb6
parentafe574f328fca42f2fa5fbc1c7a1c13d0f35d2f6 (diff)
Don't forget to set the memrange private, and reset ring on kernel entry.
-rw-r--r--linux-core/i915_gem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c
index e0beeb43..8a30d846 100644
--- a/linux-core/i915_gem.c
+++ b/linux-core/i915_gem.c
@@ -122,7 +122,7 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
alignment);
if (obj_priv->gtt_space == NULL)
return -ENOMEM;
-
+ obj_priv->gtt_space->private = obj;
obj_priv->gtt_offset = obj_priv->gtt_space->start;
DRM_DEBUG("Binding object of size %d at 0x%08x\n", obj->size, obj_priv->gtt_offset);
@@ -300,6 +300,8 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ i915_kernel_lost_context(dev);
+
DRM_INFO ("%s:%d\n", __FUNCTION__, __LINE__);
/* Big hammer: flush and idle the hardware so we can map things in/out.
*/