summaryrefslogtreecommitdiff
path: root/tools/intel_gpu_frequency.c
AgeCommit message (Collapse)Author
2019-03-20lib: Kill drm_get_card()Michał Winiarski
It's not operating on FD, and we've provided a nice reimplementation that does. Let's use it instead. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-06-12tools/intel_gpu_frequency: fix usage and examplesJani Nikula
The cited commit removed --get suboptions but failed to update the usage and examples. Remove the duplicated examples from the comments in the interest of if not single but at least fewer points of truth. Fixes: 20d6e0f41b3b ("tools/intel_gpu_frequency: remove use of getsubopt") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99492 Reported-by: Andreas Reis <andreas.reis@gmail.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-09-08build: remove _GNU_SOURCE from source filesDaniel Vetter
We are, the build system takes care of that. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-11-11Add missing noreturn attribute to various functionsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-16tools/intel_gpu_frequency: remove use of getsuboptTim Gore
getsubopt is not available in android. The "get" option doesn't really need sub-options, just display all the current frequency settings (as per discussion with Ben Widawsky) Ben v2: Remove the -geff example in the header Fixed another typo for the --set while there (found by Dave Gordon) Signed-off-by: Tim Gore <tim.gore@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2015-01-15intel_gpu_frequency: fix array bounds warningThomas Wood
Add a parameter for the size of the act_upon array in the parse function since its size cannot be calculated with ARRAY_SIZE from just the pointer. Cc: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-12intel_gpu_frequency: A tool to manipulate Intel GPU frequencyBen Widawsky
WARNING: very minimally tested In general you should not need this tool. Its primary purpose is for benchmarking, and for debugging performance issues. For many kernel releases now sysfs has supported reading and writing the GPU frequency. Therefore, this tool provides no new functionality. What it does provide is an easy to package (for distros) tool that handles the most common scenarios. v2: Get rid of -f from the usage message (Jordan) Add space before [-s (Jordan) Add a -c/--custom example (Jordan) Add a setting for resetting to hardware default (Ken) Replicate examples in commit message in the source code. (me) v3: Its not It's (me) Add --help/-h to usage Add Version + man page Rename tool to intel_gpu_frequency, from intel_frequency Remove "sudo" from the examples Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Kenneth Graunke <kenneth@whitecape.org> Here are some sample usages: $ intel_gpu_frequency --get=cur,min,max,eff cur: 200 MHz min: 200 MHz RP1: 200 MHz max: 1200 MHz $ intel_gpu_frequency -g cur: 200 MHz min: 200 MHz RP1: 200 MHz max: 1200 MHz $ intel_gpu_frequency -geff RP1: 200 MHz $ intel_gpu_frequency --set min=300 $ intel_gpu_frequency --get min cur: 300 MHz min: 300 MHz RP1: 200 MHz max: 1200 MHz $ intel_gpu_frequency --custom max=900 $ intel_gpu_frequency --get max cur: 300 MHz min: 300 MHz RP1: 200 MHz max: 900 MHz $ intel_gpu_frequency --max $ intel_gpu_frequency -g cur: 1200 MHz min: 1200 MHz RP1: 200 MHz max: 1200 MHz $ intel_gpu_frequency -e $ intel_gpu_frequency -g cur: 200 MHz min: 200 MHz RP1: 200 MHz max: 200 MHz $ intel_gpu_frequency --max $ intel_gpu_frequency -g cur: 1200 MHz min: 1200 MHz RP1: 200 MHz max: 1200 MHz $ intel_gpu_frequency --min $ intel_gpu_frequency -g cur: 200 MHz min: 200 MHz RP1: 200 MHz max: 200 MHz