umr: Convert the last underscored parameters to dash
PATCH 1/2 umr: Convert the last underscored parameters to dash
Convert --vm_partition and --vbios_info, to --vm-partition and --vbios-info, respectively.
The old underscored versions are still supported and understood, however not suggested in shell completion or printed in the help menu.
Now, for instance, completion on --vm looks much better.
Cc Tom StDenis <[email protected]>
Signed-off-by Luben Tuikov <[email protected]>
--- doc/umr.1 | 2 +- scripts/umr-completion.bash | 2 +- src/app/main.c | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-)
doc/umr.1 +1 -1
@@ -30,7 +30,7 @@ loaded the corresponding instance will be automatically detected. .IP "--gfxoff, -go <0 | 1>" Turn on or off GFXOFF on select hardware. A non-zero value enables the GFXOFF feature and a zero value disables it. -.IP "--vm_partition, -vmp <-1, 0...n>" +.IP "--vm-partition, -vmp <-1, 0...n>" Select a VM partition for all GPUVM accesses. Default is -1 which refers to the 0'th instance of the VM hub which is not the same as specifying '0'. Values above -1 are for ASICs with multiple IP instances.
scripts/umr-completion.bash +1 -1
@@ -333,7 +333,7 @@ _umr_comp_ring_stream() _umr_completion() { - local ALL_LONG_ARGS=(--database-path --option --gpu --instance --force --pci --gfxoff --vm_partition --bank --sbank --cbank --config --enumerate --list-blocks --list-regs --dump-discovery-table --lookup --write --writebit --read --scan --logscan --top --waves --profiler --vm-decode --vm-read --vm-write --vm-write-word --vm-disasm --ring-stream --dump-ib --dump-ib-file --header-dump --power --clock-scan --clock-manual --clock-high --clock-low --clock-auto --ppt-read --gpu-metrics --power --vbios_info --test-log --test-harness --server --gui) + local ALL_LONG_ARGS=(--database-path --option --gpu --instance --force --pci --gfxoff --vm-partition --bank --sbank --cbank --config --enumerate --list-blocks --list-regs --dump-discovery-table --lookup --write --writebit --read --scan --logscan --top --waves --profiler --vm-decode --vm-read --vm-write --vm-write-word --vm-disasm --ring-stream --dump-ib --dump-ib-file --header-dump --power --clock-scan --clock-manual --clock-high --clock-low --clock-auto --ppt-read --gpu-metrics --power --vbios-info --test-log --test-harness --server --gui) local cur prev
src/app/main.c +9 -5
@@ -265,12 +265,14 @@ int main(int argc, char **argv)fprintf (stderr,"[ERROR]: --instance requires a number\n" );return EXIT_FAILURE ; } - }else if (!strcmp (argv[i],"--vm_partition" ) || !strcmp (argv[i],"-vmp" )) { + }else if (!strcmp (argv[i],"--vm-partition" ) || + !strcmp (argv[i],"--vm_partition" ) || + !strcmp (argv[i],"-vmp" )) {if (i +1 < argc) { options.vm_partition =atoi (argv[i+1 ]); ++i; }else { -fprintf (stderr,"[ERROR]: --vm_partition requires a number\n" ); +fprintf (stderr,"[ERROR]: --vm-partition requires a number\n" );return EXIT_FAILURE ; } }else if (!strcmp (argv[i],"--bank" ) || !strcmp (argv[i],"-b" )) {
@@ -889,7 +891,9 @@ int main(int argc, char **argv) asic =get_asic ();ih_self_test (asic);#endif - }else if (!strcmp (argv[i],"--vbios_info" ) || !strcmp (argv[i],"-vi" )) { + }else if (!strcmp (argv[i],"--vbios-info" ) || + !strcmp (argv[i],"--vbios_info" ) || + !strcmp (argv[i],"-vi" )) {if (!asic) asic =get_asic ();if (umr_print_vbios_info (asic) !=0 )
@@ -955,7 +959,7 @@ int main(int argc, char **argv)"\n\t--gfxoff, -go <0 | 1>" "\n\t\tEnable GFXOFF with a non-zero value or disable with a 0. Used to control the GFXOFF feature on" "\n\t\tselect hardware. Command without parameter will check GFXOFF status.\n" -"\n\t--vm_partition, -vmp <-1, 0...n>" +"\n\t--vm-partition, -vmp <-1, 0...n>" "\n\t\tSelect a VM partition for all GPUVM accesses. Default is -1 which" "\n\t\trefers to the 0'th instance of the VM hub which is not the same as" "\n\t\tspecifying '0'. Values above -1 are for ASICs with multiple IP instances.\n"
@@ -1068,7 +1072,7 @@ printf("\n\t--power, -p \n\t\tRead the conetent of clocks, temperature, gpu loading at runtime" "\n\t\toptions 'use_colour' to colourize output \n" "\n*** Video BIOS Information ***\n" -"\n\t--vbios_info, -vi \n\t\tPrint Video BIOS information\n" +"\n\t--vbios-info, -vi \n\t\tPrint Video BIOS information\n" "\n*** Test Vector Generation ***\n" "\n\t--test-log, -tl <filename>\n\t\tLog all MMIO/memory reads to a file\n" "\n\t--test-harness, -th <filename>\n\t\tUse a test harness file instead of reading from hardware\n");
base-commit: 7a56fe819d76884a68c31d34e56f9e7c462da351
Signature · 1 line
2.39.0.rc0
PATCH 2/2 umr: Get rid of unused variable warning
Get rid of unused variable ‘limit_ptr’ warning.
Cc Tom StDenis <[email protected]>
Signed-off-by Luben Tuikov <[email protected]>
--- src/app/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/app/server.c +1 -1
@@ -1352,7 +1352,7 @@ JSON_Value *umr_process_json_request(JSON_Object *request)char *ring_name = (char *)json_object_get_string (request,"ring" );uint32_t wptr, rptr, drv_wptr, ringsize, value, *ring_data;int halt_waves =json_object_get_boolean (request,"halt_waves" ); -int limit_ptr =json_object_get_boolean (request,"rptr_wptr" ); +/* int limit_ptr = json_object_get_boolean(request, "rptr_wptr"); */ /* Disable gfxoff */ value =0 ;
Signature · 1 line
2.39.0.rc0