All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] [v2] intel_frequency: A tool to manipulate Intel GPU frequency
Date: Thu, 15 Jan 2015 17:24:21 +0000	[thread overview]
Message-ID: <54B7F7C5.1020301@intel.com> (raw)
In-Reply-To: <54B7C7E6.1050908@intel.com>

On 15/01/15 14:00, Dave Gordon wrote:
[snip]

> Finally, I think the choice of command names (especially --set vs
> --custom) is confusing. I'd like to propose the following:
> 
> # Reading:
> 	--get		# get all
> 	--get namelist	# get specified
> 	-g [namelist]	# synonym for -g
> 
> # Set one parameter:
> 	--set name=freq	# set the specified parameter (min or max)
> 			# may or may not affect 'cur'
> 	-s name=freq	# synonym
> 
> # Reset (all) parameters:
> 	--defaults	# Reset all r/w parameters to h/w defaults
> 	-d		# synonym
> 
> # Lock to specific frequency:
> 	--max		# Lock to (h/w defined) max
> 	-m		# synonym
> 	--min		# Lock to (h/w defined) min
> 	-i		# synonym
> 	--eff		# Lock to (h/w defined) RPe
> 	-e		# synonym
> 	--lock freq	# Lock to custom frequency
> 	-l freq		# synonym

I thought of one more variation: the command set above doesn't let you
read the defaults after changing the current parameters, except by
resetting them all to defaults. So for more flexibility, how about:

# Reading (in name=value format):
	--default		# get default values of all parameters
	--default [list]	# get default values of specified
	-d [list]		# synonym

	--get			# get current values of all parameters
	--get list		# get specified
	-g [list]		# synonym

# Reset parameter(s) to default:
	--reset			# Reset all parameters to h/w defaults
	--reset [list]		# reset only specified
	-r [list]		# synonym

# Set one parameter:
	--set name=freq		# set the specified parameter [min|max]
				# may or may not have an effect on 'cur'
	-s name=freq		# synonym

# Lock (by setting both min & max) to specific frequency:
	--max			# Lock to (h/w defined) max
	-m			# synonym
	--min			# Lock to (h/w defined) min
	-i			# synonym
	--eff			# Lock to (h/w defined) RPe
	-e			# synonym
	--lock freq		# Lock to custom frequency
	-l freq			# synonym

This makes the syntax as simple as possible and the functional
operations as orthogonal as possible. Note that several of the above are
(intentionally) simply shortcuts for combinations of others e.g.
	# intel_frequency --reset max
is equivalent to
	# intel_frequency --set $(intel_frequency --default max)
and
	# intel_frequency --eff
could be implemented with the sequence
	# e=$(intel_frequency -d eff)
	# intel_frequency -l ${e/eff=/}
or even
	# e=$(intel_frequency -d eff)
	# intel_frequency -s ${e/eff/min}
	# intel_frequency -s ${e/eff/max}

.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-01-15 17:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-11  4:19 [PATCH 1/2] tools/Makefile: Alphabetize the list Ben Widawsky
2015-01-11  4:19 ` [PATCH 2/2] intel_frequency: A tool to manipulate Intel GPU frequency Ben Widawsky
2015-01-11  4:36   ` Ben Widawsky
2015-01-11 17:54   ` Jordan Justen
2015-01-12  3:35   ` [PATCH] [v2] " Ben Widawsky
2015-01-12  3:47     ` Ben Widawsky
2015-01-13 21:19       ` O'Rourke, Tom
2015-01-13 22:36         ` Ben Widawsky
2015-01-14 17:42           ` O'Rourke, Tom
2015-01-15  0:51             ` Ben Widawsky
2015-01-15 14:00     ` Dave Gordon
2015-01-15 17:24       ` Dave Gordon [this message]
2015-01-15 21:15       ` Ben Widawsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B7F7C5.1020301@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.