diff --git a/linux-core/drmP.h b/linux-core/drmP.h index ba25f3a8..392d2ace 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -970,6 +970,7 @@ struct drm_device { atomic_t pin_memory; atomic_t gtt_count; atomic_t gtt_memory; + uint32_t gtt_total; uint32_t invalidate_domains; /* domains pending invalidation */ uint32_t flush_domains; /* domains pending flush */ /*@} */ diff --git a/linux-core/drm_proc.c b/linux-core/drm_proc.c index 71d55274..2bbe7eea 100644 --- a/linux-core/drm_proc.c +++ b/linux-core/drm_proc.c @@ -654,11 +654,12 @@ static int drm_gem_object_info(char *buf, char **start, off_t offset, *start = &buf[offset]; *eof = 0; - DRM_PROC_PRINT ("%d objects\n", atomic_read (&dev->object_count)); - DRM_PROC_PRINT ("%d object bytes\n", atomic_read (&dev->object_memory)); - DRM_PROC_PRINT ("%d pinned\n", atomic_read (&dev->pin_count)); - DRM_PROC_PRINT ("%d pin bytes\n", atomic_read (&dev->pin_memory)); - DRM_PROC_PRINT ("%d gtt bytes\n", atomic_read (&dev->gtt_memory)); + DRM_PROC_PRINT("%d objects\n", atomic_read (&dev->object_count)); + DRM_PROC_PRINT("%d object bytes\n", atomic_read (&dev->object_memory)); + DRM_PROC_PRINT("%d pinned\n", atomic_read (&dev->pin_count)); + DRM_PROC_PRINT("%d pin bytes\n", atomic_read (&dev->pin_memory)); + DRM_PROC_PRINT("%d gtt bytes\n", atomic_read (&dev->gtt_memory)); + DRM_PROC_PRINT("%d gtt total\n", dev->gtt_total); if (len > request + offset) return request; *eof = 1; diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c index 0f037acf..e07cf1b9 100644 --- a/linux-core/i915_gem.c +++ b/linux-core/i915_gem.c @@ -65,6 +65,8 @@ i915_gem_init_ioctl(struct drm_device *dev, void *data, drm_memrange_init(&dev_priv->mm.gtt_space, args->gtt_start, args->gtt_end - args->gtt_start); + dev->gtt_total = (uint32_t) (args->gtt_end - args->gtt_start); + mutex_unlock(&dev->struct_mutex); return 0;