diff options
author | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-04-15 13:49:21 +0200 |
---|---|---|
committer | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2013-04-15 23:44:56 +0200 |
commit | 1611f8457768716ba2397e0cdcc92c863cf9b58b (patch) | |
tree | d58e5dd0ba5f32a161ba45d6d8fa02d4c98d31de /drivers/gpu/drm/gma500 | |
parent | 4dd6a897959aca968c59f0b2bc08c2d855cd553c (diff) |
drm/gma500: Add debugging info to psb_gtt_restore()
This makes it easier to see what's going on during resume/restore.
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r-- | drivers/gpu/drm/gma500/gtt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c index 2f12fafc8931..01e32420388d 100644 --- a/drivers/gpu/drm/gma500/gtt.c +++ b/drivers/gpu/drm/gma500/gtt.c @@ -563,6 +563,7 @@ 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); @@ -570,11 +571,17 @@ int psb_gtt_restore(struct drm_device *dev) 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; } |