Skip to content

Commit

Permalink
drm/i915: Release fenced GTT mapping on suspend
Browse files Browse the repository at this point in the history
... so that upon first use after resume we will reacquire the fence reg.

Reported-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Nov 28, 2010
1 parent 3619df0 commit 7d2cb39
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,8 +1794,15 @@ static void i915_gem_reset_fences(struct drm_device *dev)

for (i = 0; i < 16; i++) {
struct drm_i915_fence_reg *reg = &dev_priv->fence_regs[i];
if (reg->obj)
i915_gem_clear_fence_reg(reg->obj);
struct drm_i915_gem_object *obj = reg->obj;

if (!obj)
continue;

if (obj->tiling_mode)
i915_gem_release_mmap(obj);

i915_gem_clear_fence_reg(obj);
}
}

Expand Down

0 comments on commit 7d2cb39

Please sign in to comment.