summaryrefslogtreecommitdiff
path: root/linux-core/drm_proc.c
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2008-03-20 17:44:32 +0100
committerJohn Doe <glisse@freedesktop.org>2008-03-20 17:44:32 +0100
commit71b66b00435a10e762a4bb7abedb263196942da4 (patch)
tree99bbf149f64f14fdc2cd389ec53188c7ce4e040f /linux-core/drm_proc.c
parent6ef119abf5d19c85fe039fd19d12e9bd64fd44df (diff)
parent607964ed9e5f6d86a0960bef2341e7f5de9c71da (diff)
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Diffstat (limited to 'linux-core/drm_proc.c')
-rw-r--r--linux-core/drm_proc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/linux-core/drm_proc.c b/linux-core/drm_proc.c
index e10501f2..b6748b9b 100644
--- a/linux-core/drm_proc.c
+++ b/linux-core/drm_proc.c
@@ -446,9 +446,10 @@ static int drm__objects_info(char *buf, char **start, off_t offset, int request,
struct drm_buffer_manager *bm = &dev->bm;
struct drm_fence_manager *fm = &dev->fm;
uint64_t used_mem;
+ uint64_t used_emer;
uint64_t low_mem;
uint64_t high_mem;
-
+ uint64_t emer_mem;
if (offset > DRM_PROC_LIMIT) {
*eof = 1;
@@ -477,7 +478,7 @@ static int drm__objects_info(char *buf, char **start, off_t offset, int request,
DRM_PROC_PRINT("Buffer objects are not supported by this driver.\n");
}
- drm_query_memctl(&used_mem, &low_mem, &high_mem);
+ drm_query_memctl(&used_mem, &used_emer, &low_mem, &high_mem, &emer_mem);
if (used_mem > 16*PAGE_SIZE) {
DRM_PROC_PRINT("Used object memory is %lu pages.\n",
@@ -486,10 +487,19 @@ static int drm__objects_info(char *buf, char **start, off_t offset, int request,
DRM_PROC_PRINT("Used object memory is %lu bytes.\n",
(unsigned long) used_mem);
}
+ if (used_emer > 16*PAGE_SIZE) {
+ DRM_PROC_PRINT("Used emergency memory is %lu pages.\n",
+ (unsigned long) (used_emer >> PAGE_SHIFT));
+ } else {
+ DRM_PROC_PRINT("Used emergency memory is %lu bytes.\n\n",
+ (unsigned long) used_emer);
+ }
DRM_PROC_PRINT("Soft object memory usage threshold is %lu pages.\n",
(unsigned long) (low_mem >> PAGE_SHIFT));
DRM_PROC_PRINT("Hard object memory usage threshold is %lu pages.\n",
(unsigned long) (high_mem >> PAGE_SHIFT));
+ DRM_PROC_PRINT("Emergency root only memory usage threshold is %lu pages.\n",
+ (unsigned long) (emer_mem >> PAGE_SHIFT));
DRM_PROC_PRINT("\n");