Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371435
b: refs/heads/master
c: 1611f84
h: refs/heads/master
i:
  371433: b0a67f8
  371431: d3af506
v: v3
  • Loading branch information
Patrik Jakobsson committed Apr 15, 2013
1 parent 9ddab44 commit aa11d42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4dd6a897959aca968c59f0b2bc08c2d855cd553c
refs/heads/master: 1611f8457768716ba2397e0cdcc92c863cf9b58b
9 changes: 8 additions & 1 deletion trunk/drivers/gpu/drm/gma500/gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,18 +563,25 @@ int psb_gtt_restore(struct drm_device *dev)
struct drm_psb_private *dev_priv = dev->dev_private;
struct resource *r = dev_priv->gtt_mem->child;
struct gtt_range *range;
unsigned int restored = 0, total = 0, size = 0;

/* On resume, the gtt_mutex is already initialized */
mutex_lock(&dev_priv->gtt_mutex);
psb_gtt_init(dev, 1);

while (r != NULL) {
range = container_of(r, struct gtt_range, resource);
if (range->pages)
if (range->pages) {
psb_gtt_insert(dev, range, 1);
size += range->resource.end - range->resource.start;
restored++;
}
r = r->sibling;
total++;
}
mutex_unlock(&dev_priv->gtt_mutex);
DRM_DEBUG_DRIVER("Restored %u of %u gtt ranges (%u KB)", restored,
total, (size / 1024));

return 0;
}

0 comments on commit aa11d42

Please sign in to comment.