[Mesa-dev] [RFC 0/2] nvc0: Fix non-integer counters in AMD_performance_monitor

Boyan Ding boyan.j.ding at gmail.com
Sun Jun 11 13:52:15 UTC 2017


Some performance counters in nouveau uses non-integer type in AMD_perfmon,
but they are currently returning int values. One reason behind this is
that gallium hud, which is one of the users of the counters, only supports
integers. This series tries to fix problem in both parts -- making nouveau
return values of appropriate types and teaching hud to be aware of types.
Although hud is still not clever enough to handle floating points, it is
becoming no worse.

Note that this series is highly RFC. I'm posting this to solicit ideas,
both on whether this approach is appropriate and details in handling --
the current code looks somewhat ugly. There are also further problems
that I look to solve, namely some performance counters, such as ipc,
which should be floats instead of ints. But I want to get basics correct
first.

Boyan Ding (2):
  hud: Handle query values according to their type
  nvc0: Return value of appropriate type instead of u64

 src/gallium/auxiliary/hud/hud_driver_query.c       | 22 ++++++-
 .../drivers/nouveau/nvc0/nvc0_query_hw_metric.c    | 70 +++++++++++++---------
 2 files changed, 61 insertions(+), 31 deletions(-)

-- 
2.13.1



More information about the mesa-dev mailing list