Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tools/intel_gpu_frequency: fix usage and examples
@ 2018-06-12 14:05 Jani Nikula
  2018-06-12 14:27 ` Szwichtenberg, Radoslaw
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jani Nikula @ 2018-06-12 14:05 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.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>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_gpu_frequency.c | 37 ++++++-------------------------------
 1 file changed, 6 insertions(+), 31 deletions(-)

diff --git a/tools/intel_gpu_frequency.c b/tools/intel_gpu_frequency.c
index 5c439b036a16..80786ad91570 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 */
-- 
2.11.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-12 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-12 14:05 [igt-dev] [PATCH i-g-t] tools/intel_gpu_frequency: fix usage and examples Jani Nikula
2018-06-12 14:27 ` Szwichtenberg, Radoslaw
2018-06-12 14:30   ` Jani Nikula
2018-06-12 14:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-06-12 19:18 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox