diff options
author | Marek Olšák <[email protected]> | 2017-05-17 20:25:59 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-23 23:29:16 +0200 |
commit | 0781b58b3a4adaa33cb9788af81f04a617cc07fd (patch) | |
tree | 21b615b5a32f6d4cd553fadc2d9b61898ff21e12 /src/gallium/winsys/amdgpu | |
parent | 1db28fbbea6e6c3f305783d6211a040ed38f4abf (diff) |
gallium/radeon: pipe AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS into gallium HUD
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/gallium/winsys/amdgpu')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 0430c7ec6ac..c8bd60efdce 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -43,6 +43,10 @@ #include "amd/common/sid.h" #include "amd/common/gfx9d.h" +#ifndef AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS +#define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E +#endif + static struct util_hash_table *dev_tab = NULL; static mtx_t dev_tab_mutex = _MTX_INITIALIZER_NP; @@ -142,6 +146,9 @@ static uint64_t amdgpu_query_value(struct radeon_winsys *rws, case RADEON_NUM_EVICTIONS: amdgpu_query_info(ws->dev, AMDGPU_INFO_NUM_EVICTIONS, 8, &retval); return retval; + case RADEON_NUM_VRAM_CPU_PAGE_FAULTS: + amdgpu_query_info(ws->dev, AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS, 8, &retval); + return retval; case RADEON_VRAM_USAGE: amdgpu_query_heap_info(ws->dev, AMDGPU_GEM_DOMAIN_VRAM, 0, &heap); return heap.heap_usage; |