mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
drm/amdgpu: make drm-memory-* report resident memory
The old behavior reports the resident memory usage for this key and the
documentation say so as well. However this was accidentally changed to
include buffers that was evicted.
Fixes: 04bdba4654 ("drm/amdgpu: Use drm_print_memory_stats helper from fdinfo")
Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
a1144da794
commit
f286365038
@@ -33,6 +33,7 @@
|
||||
#include <drm/amdgpu_drm.h>
|
||||
#include <drm/drm_debugfs.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_file.h>
|
||||
|
||||
#include "amdgpu.h"
|
||||
#include "amdgpu_vm.h"
|
||||
@@ -95,11 +96,11 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
|
||||
|
||||
/* Legacy amdgpu keys, alias to drm-resident-memory-: */
|
||||
drm_printf(p, "drm-memory-vram:\t%llu KiB\n",
|
||||
stats[TTM_PL_VRAM].total/1024UL);
|
||||
stats[TTM_PL_VRAM].drm.resident/1024UL);
|
||||
drm_printf(p, "drm-memory-gtt: \t%llu KiB\n",
|
||||
stats[TTM_PL_TT].total/1024UL);
|
||||
stats[TTM_PL_TT].drm.resident/1024UL);
|
||||
drm_printf(p, "drm-memory-cpu: \t%llu KiB\n",
|
||||
stats[TTM_PL_SYSTEM].total/1024UL);
|
||||
stats[TTM_PL_SYSTEM].drm.resident/1024UL);
|
||||
|
||||
/* Amdgpu specific memory accounting keys: */
|
||||
drm_printf(p, "amd-memory-visible-vram:\t%llu KiB\n",
|
||||
|
||||
Reference in New Issue
Block a user