From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Keith Packard <keithp@keithp.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: add GPU max frequency control file
Date: Wed, 27 Jul 2011 11:53:08 -0700 [thread overview]
Message-ID: <20110727115308.2c9d0a5a@jbarnes-desktop> (raw)
In-Reply-To: <yunhb67lfpr.fsf@aiko.keithp.com>
On Wed, 27 Jul 2011 11:51:28 -0700
Keith Packard <keithp@keithp.com> wrote:
> On Wed, 27 Jul 2011 10:53:28 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
>
> > + len = snprintf(buf, sizeof (buf),
> > + "freq: %d\n", dev_priv->max_delay * 50);
>
> should probably be 'Max frequency' too?
>
> > +
> > + if (len > sizeof (buf))
> > + len = sizeof (buf);
> > +
> > + return simple_read_from_buffer(ubuf, max, ppos, buf, len);
> > +}
> > +
> > +static ssize_t
> > +i915_max_freq_write(struct file *filp,
> > + const char __user *ubuf,
> > + size_t cnt,
> > + loff_t *ppos)
> > +{
> > + struct drm_device *dev = filp->private_data;
> > + struct drm_i915_private *dev_priv = dev->dev_private;
> > + char buf[20];
> > + int val = 1;
> > +
> > + if (cnt > 0) {
> > + if (cnt > sizeof (buf) - 1)
> > + return -EINVAL;
> > +
> > + if (copy_from_user(buf, ubuf, cnt))
> > + return -EFAULT;
> > + buf[cnt] = 0;
> > +
> > + val = simple_strtoul(buf, NULL, 0);
> > + }
> > +
> > + DRM_DEBUG_DRIVER("Manually setting freq to %d\n", val);
>
> And 'max freq' here too.
>
> Otherwise, this seems useful to me too.
Ok updated one just sent.
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2011-07-27 18:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 17:53 [PATCH] drm/i915: add GPU max frequency control file Jesse Barnes
2011-07-27 18:51 ` Keith Packard
2011-07-27 18:53 ` Jesse Barnes [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-07-27 18:53 Jesse Barnes
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=20110727115308.2c9d0a5a@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=keithp@keithp.com \
/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.