diff options
author | Christian Gmeiner <[email protected]> | 2018-03-25 22:29:56 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2018-04-08 22:20:25 +0200 |
commit | 72d2043be06c4b0135177482ae95aa321286cc17 (patch) | |
tree | 41eeac61a3981e57e328a7c9473b003a11c459c1 /src/gallium/drivers/etnaviv/etnaviv_screen.c | |
parent | 7e3dba301ebbd5d0d9eab7fdac5827559e482c1c (diff) |
etnaviv: add perfmon query implementation
Add needed infrastructure to use performance monitor
requests for queries.
Signed-off-by: Christian Gmeiner <[email protected]>
Tested-by: Chris Healy <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_screen.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_screen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index fff0a250a28..b0f8b4bebe3 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -49,6 +49,7 @@ #define ETNA_DRM_VERSION(major, minor) ((major) << 16 | (minor)) #define ETNA_DRM_VERSION_FENCE_FD ETNA_DRM_VERSION(1, 1) +#define ETNA_DRM_VERSION_PERFMON ETNA_DRM_VERSION(1, 2) static const struct debug_named_value debug_options[] = { {"dbg_msgs", ETNA_DBG_MSGS, "Print debug messages"}, @@ -80,6 +81,9 @@ etna_screen_destroy(struct pipe_screen *pscreen) { struct etna_screen *screen = etna_screen(pscreen); + if (screen->perfmon) + etna_perfmon_del(screen->perfmon); + if (screen->pipe) etna_pipe_del(screen->pipe); @@ -986,8 +990,12 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu, etna_query_screen_init(pscreen); etna_resource_screen_init(pscreen); + util_dynarray_init(&screen->supported_pm_queries, NULL); slab_create_parent(&screen->transfer_pool, sizeof(struct etna_transfer), 16); + if (screen->drm_version >= ETNA_DRM_VERSION_PERFMON) + etna_pm_query_setup(screen); + return pscreen; fail: |