mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-12 06:50:32 +01:00
freedreno: Add --nvtop arg
Add a way to generate the table of gpu-ids that nvtop uses, to simplify syncing nvtop with mesa when new gpu-ids are added. For example: python3 src/freedreno/common/freedreno_devices.py -p ./$builddir/src/freedreno/registers/adreno/ --nvtop Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40283>
This commit is contained in:
parent
fa90c2de03
commit
a4cabc1334
1 changed files with 13 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ def max_bitfield_val(high, low, shift):
|
|||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-p', '--import-path', required=True)
|
||||
parser.add_argument('--nvtop', action='store_true')
|
||||
args = parser.parse_args()
|
||||
sys.path.insert(0, args.import_path)
|
||||
|
||||
|
|
@ -259,5 +260,16 @@ fd_dev_info_apply_dbg_options(struct fd_dev_info *info)
|
|||
}
|
||||
"""
|
||||
|
||||
nvtop_template="""
|
||||
static const struct msm_id_struct msm_ids[] = {
|
||||
%for id, info in s.gpus.items():
|
||||
{ ${hex(id.chip_id)}, "${id.name}" },
|
||||
%endfor
|
||||
};
|
||||
"""
|
||||
|
||||
def main():
|
||||
print(Template(template).render(s=s, unique_props=GPUProps.unique_props))
|
||||
if args.nvtop:
|
||||
print(Template(nvtop_template).render(s=s, unique_props=GPUProps.unique_props))
|
||||
else:
|
||||
print(Template(template).render(s=s, unique_props=GPUProps.unique_props))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue