summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2018-06-12 17:02:11 +0300
committerJani Nikula <jani.nikula@intel.com>2018-06-12 17:29:06 +0300
commit95bfb2902473b9f4e644c3eb831fdf110d87ed4f (patch)
tree61f345616913b24261ca09ff29e7339313f463ae /tools
parenta0f2d23b7d3d4226a0a7637a9240bfa86f08c1d3 (diff)
tools/intel_gpu_frequency: fix usage and examples
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_gpu_frequency.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/tools/intel_gpu_frequency.c b/tools/intel_gpu_frequency.c
index 5c439b03..80786ad9 100644
--- a/tools/intel_gpu_frequency.c
+++ b/tools/intel_gpu_frequency.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2015 Intel Corporation
+ * Copyright © 2015,2018 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -19,31 +19,6 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
- *
- * Example:
- * Get all frequencies:
- * intel_gpu_frequency --get
- *
- * Same as above:
- * intel_gpu_frequency -g
- *
- * Lock the GPU frequency to 300MHz:
- * intel_gpu_frequency --set 300
- *
- * Set the maximum frequency to 900MHz:
- * intel_gpu_frequency --custom max=900
- *
- * Lock the GPU frequency to its maximum frequency:
- * intel_gpu_frequency --max
- *
- * Lock the GPU frequency to its most efficient frequency:
- * intel_gpu_frequency -e
- *
- * Lock The GPU frequency to its minimum frequency:
- * intel_gpu_frequency --min
- *
- * Reset the GPU to hardware defaults
- * intel_gpu_frequency -d
*/
#include <assert.h>
@@ -145,7 +120,7 @@ static void __attribute__((noreturn))
usage(const char *prog)
{
printf("%s A program to manipulate Intel GPU frequencies.\n\n", prog);
- printf("Usage: %s [-e] [--min | --max] [-g (min|max|efficient)] [-s frequency_mhz]\n\n", prog);
+ printf("Usage: %s [-e] [--min | --max] [--get] [--set frequency_mhz]\n\n", prog);
printf("Options: \n");
printf(" -e Lock frequency to the most efficient frequency\n");
printf(" -g, --get Get all the frequency settings\n");
@@ -158,9 +133,9 @@ usage(const char *prog)
printf(" -v --version Version\n");
printf("\n");
printf("Examples:\n");
- printf(" intel_gpu_frequency -gmin,cur\tGet the current and minimum frequency\n");
- printf(" intel_gpu_frequency -s 400\tLock frequency to 400Mhz\n");
- printf(" intel_gpu_frequency -c max=750\tSet the max frequency to 750MHz\n");
+ printf(" intel_gpu_frequency --get\t\tGet the current and minimum frequency\n");
+ printf(" intel_gpu_frequency --set 400\tLock frequency to 400Mhz\n");
+ printf(" intel_gpu_frequency --custom max=750\tSet the max frequency to 750MHz\n");
printf("\n");
printf("Report bugs to <bugs.freedesktop.org>\n");
exit(EXIT_FAILURE);
@@ -170,7 +145,7 @@ static void
version(const char *prog)
{
printf("%s: %s\n", prog, VERSION);
- printf("Copyright © 2015 Intel Corporation\n");
+ printf("Copyright © 2015,2018 Intel Corporation\n");
}
/* Returns read or write operation */