Commit 10a24062 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig Committed by Marge Bot
Browse files

pan/perf: Fix performance counters on G57

The performance counter layout depends on the number of L2 blocks and the number
of shader cores. It doesn't make a ton of sense to hardcode these into the XML
files. Instead, let's make the coutner offsets in the XML files relative to the
categories (blocks), so we can calculate the offsets of the categories
themselves at runtime based on the computed layout. This fixes performance
counters on Mali-G57 as implemented on MT8192.

There is little code change here, mainly churn from changing the XML definition.
Postprocessing for the XML to make it suitable for Mesa uses Antonio Caggiano's
https://gitlab.freedesktop.org/panfrost/hwc-helper

 tool.

Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Antonio Caggiano's avatarAntonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <!16803>
parent 0ecbfcc8
Pipeline #607562 waiting for manual action with stages
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -200,7 +200,7 @@ def main():
c.write(".symbol_name = \"%s\"," % (counter.underscore_name))
c.write(".units = PAN_PERF_COUNTER_UNITS_%s," % (counter.units.upper()))
c.write(".offset = %u," % (counter.offset))
c.write(".category = &%s.categories[%u]," % (current_struct_name, i))
c.write(".category_index = %u," % i)
c.outdent(tab_size)
c.write("}, // counter")
......
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment