Bug 99492 - [intel_gpu_tools] intel_gpu_frequency's parsing of parameters broken
Summary: [intel_gpu_tools] intel_gpu_frequency's parsing of parameters broken
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: IGT (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-22 11:30 UTC by Andreas Reis
Modified: 2018-06-12 14:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Andreas Reis 2017-01-22 11:30:48 UTC
At least in the case of -g, intel_gpu_frequency currently (1.16 & git) fails if there are parameters. With none it works.

Eg, the example's -gmin,cur yields "invalid option -- 'n'" and -gcur "Selected unmodifiable frequency".

That and I couldn't compile until I disabled the assembler, I kept getting
lex.o: In function `yylex':                                                                                                                                                                                                                                                                                                   
lex.c:(.text+0x3c8f): undefined reference to `yywrap'
Comment 1 Jani Nikula 2018-06-12 14:09:33 UTC
(In reply to Andreas Reis from comment #0)
> At least in the case of -g, intel_gpu_frequency currently (1.16 & git) fails
> if there are parameters. With none it works.
> 
> Eg, the example's -gmin,cur yields "invalid option -- 'n'" and -gcur
> "Selected unmodifiable frequency".

-g|--get suboptions have been removed in commit 20d6e0f41b3b ("tools/intel_gpu_frequency: remove use of getsubopt") but the quick usage wasn't updated. Just use without suboptions.

Patch on the list to update the usage: 

http://patchwork.freedesktop.org/patch/msgid/20180612140544.7231-1-jani.nikula@intel.com

> That and I couldn't compile until I disabled the assembler, I kept getting
> lex.o: In function `yylex':                                                 
> 
> lex.c:(.text+0x3c8f): undefined reference to `yywrap'

Unrelated, please file a new bug if this persists with the current git.

Apologies for this staying below the radar for so long; I guess nobody thought it was that important. :(
Comment 2 Jani Nikula 2018-06-12 14:31:15 UTC
Fix pushed to igt:

commit 95bfb2902473b9f4e644c3eb831fdf110d87ed4f
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Tue Jun 12 17:02:11 2018 +0300

    tools/intel_gpu_frequency: fix usage and examples


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.