From 95bfb2902473b9f4e644c3eb831fdf110d87ed4f Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 12 Jun 2018 17:02:11 +0300 Subject: 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 Reviewed-by: Radoslaw Szwichtenberg Signed-off-by: Jani Nikula --- tools/intel_gpu_frequency.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) (limited to 'tools') 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 @@ -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 \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 */ -- cgit v1.2.3