summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-12-27 18:35:32 +0100
committerMarek Olšák <[email protected]>2017-01-06 21:05:48 +0100
commit2b621c47aa515add6452a788c0c27067fc60be20 (patch)
treed8dacb478926fa9d611c452feda33615a206eafa /src/gallium/winsys
parent6b8a371e00b715b630418ced2ee867e7b2f36b11 (diff)
gallium/radeon: add new HUD query num-SDMA-IBs
Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_cs.c6
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c2
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h1
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.c5
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c2
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.h1
6 files changed, 15 insertions, 2 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index adb46c5b405..95402bff9d9 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -1204,7 +1204,11 @@ static int amdgpu_cs_flush(struct radeon_winsys_cs *rcs,
cs->main.base.used_gart = 0;
cs->main.base.used_vram = 0;
- ws->num_gfx_IBs++;
+ if (cs->ring_type == RING_GFX)
+ ws->num_gfx_IBs++;
+ else if (cs->ring_type == RING_DMA)
+ ws->num_sdma_IBs++;
+
return error_code;
}
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index 2ccc8e549f2..b950d37a504 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -429,6 +429,8 @@ static uint64_t amdgpu_query_value(struct radeon_winsys *rws,
return retval;
case RADEON_NUM_GFX_IBS:
return ws->num_gfx_IBs;
+ case RADEON_NUM_SDMA_IBS:
+ return ws->num_sdma_IBs;
case RADEON_NUM_BYTES_MOVED:
amdgpu_query_info(ws->dev, AMDGPU_INFO_NUM_BYTES_MOVED, 8, &retval);
return retval;
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h
index 6746079b9c1..2a7900a68d9 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h
@@ -62,6 +62,7 @@ struct amdgpu_winsys {
uint64_t mapped_gtt;
uint64_t buffer_wait_time; /* time spent in buffer_wait in ns */
uint64_t num_gfx_IBs;
+ uint64_t num_sdma_IBs;
struct radeon_info info;
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index ab1ca06c501..8f9e8a60593 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -691,7 +691,10 @@ static int radeon_drm_cs_flush(struct radeon_winsys_cs *rcs,
cs->base.used_vram = 0;
cs->base.used_gart = 0;
- cs->ws->num_gfx_IBs++;
+ if (cs->ring_type == RING_GFX)
+ cs->ws->num_gfx_IBs++;
+ else if (cs->ring_type == RING_DMA)
+ cs->ws->num_sdma_IBs++;
return 0;
}
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 1b2f9b18aca..c85e427a216 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -625,6 +625,8 @@ static uint64_t radeon_query_value(struct radeon_winsys *rws,
return retval;
case RADEON_NUM_GFX_IBS:
return ws->num_gfx_IBs;
+ case RADEON_NUM_SDMA_IBS:
+ return ws->num_sdma_IBs;
case RADEON_NUM_BYTES_MOVED:
radeon_get_drm_value(ws->fd, RADEON_INFO_NUM_BYTES_MOVED,
"num-bytes-moved", (uint32_t*)&retval);
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
index 137a9f437e1..ac623a1b311 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
@@ -80,6 +80,7 @@ struct radeon_drm_winsys {
uint64_t mapped_gtt;
uint64_t buffer_wait_time; /* time spent in buffer_wait in ns */
uint64_t num_gfx_IBs;
+ uint64_t num_sdma_IBs;
uint32_t next_bo_hash;
enum radeon_generation gen;