From: Hans de Goede <hdegoede@redhat.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Len Brown <lenb@kernel.org>,
"russianneuromancer @ ya . ru" <russianneuromancer@ya.ru>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
linux-i2c@vger.kernel.org
Subject: Re: [RFC 3/4] drm/i915: valleyview: Make intel_set_rps get FORCEWAKE_MEDIA
Date: Sun, 1 Jan 2017 21:48:53 +0100 [thread overview]
Message-ID: <556a9c6d-33ba-0047-82df-8bf75e09e208@redhat.com> (raw)
In-Reply-To: <20170101202400.GG13154@nuc-i3427.alporthouse.com>
Hi,
On 01-01-17 21:24, Chris Wilson wrote:
> On Sun, Jan 01, 2017 at 09:14:02PM +0100, Hans de Goede wrote:
>> All callers of valleyview_set_rps() get at least FORCEWAKE_MEDIA, except
>> for intel_set_rps(). Since intel_set_rps can for example be called from
>> sysfs store functions, there is no guarantee this is already done, so add
>> an intel_uncore_forcewake_get(FORCEWAKE_MEDIA) call to intel_set_rps.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/gpu/drm/i915/intel_pm.c | 9 +++++++--
>> 1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>> index 4b12637..cc4fbd7 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -5096,9 +5096,14 @@ void gen6_rps_boost(struct drm_i915_private *dev_priv,
>>
>> void intel_set_rps(struct drm_i915_private *dev_priv, u8 val)
>> {
>> - if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
>> + if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
>> + /* Wake up the media well, as that takes a lot less
>> + * power than the Render well.
>> + */
>> + intel_uncore_forcewake_get(dev_priv, FORCEWAKE_MEDIA);
>> valleyview_set_rps(dev_priv, val);
>
> Both powerwells are woken for rps. (Taking one but not the other has no
> benefit, and very misleading.)
The comment on why FORCEWAKE_MEDIA is used + code is copy pasted from the
existing code in vlv_set_rps_idle().
> The forcewake is already held by the
> lower level routines, taking the wakelock in the caller is an optimisation
> that is only interesting if there is a danger from the forcewake being
> dropped mid-sequence (due to preemption whatever).
We're also accessing the punit in valleyview_set_rps() and I've seen several
patches (in the android x86 kernel) suggesting that we need to take a wakelock
while doing this.
Regards,
Hans
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-01-01 20:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-01 20:13 [RFC 0/4] Coordinate pmic i2c bus and i915 punit accesses Hans de Goede
2017-01-01 20:14 ` [RFC 1/4] x86/platform/intel/iosf_mbi: Add a mutex for punit access Hans de Goede
2017-01-02 14:12 ` Ville Syrjälä
2017-01-02 14:21 ` Hans de Goede
2017-01-13 9:26 ` Ville Syrjälä
2017-01-13 10:34 ` Jarkko Nikula
2017-01-13 10:51 ` Ville Syrjälä
2017-01-13 11:12 ` Jarkko Nikula
2017-01-13 12:20 ` Ville Syrjälä
2017-01-13 16:06 ` Hans de Goede
2017-01-13 16:30 ` Ville Syrjälä
2017-01-15 11:10 ` Hans de Goede
2017-01-01 20:14 ` [RFC 2/4] i2c: designware-baytrail: Take punit lock on bus acquire Hans de Goede
2017-01-01 20:14 ` [RFC 3/4] drm/i915: valleyview: Make intel_set_rps get FORCEWAKE_MEDIA Hans de Goede
2017-01-01 20:24 ` [Intel-gfx] " Chris Wilson
2017-01-01 20:48 ` Hans de Goede [this message]
2017-01-02 11:37 ` Chris Wilson
2017-01-02 12:40 ` Hans de Goede
2017-01-02 14:10 ` Ville Syrjälä
2017-01-02 14:21 ` Chris Wilson
2017-01-02 14:40 ` Ville Syrjälä
2017-01-02 14:53 ` [Intel-gfx] " Chris Wilson
2017-01-02 15:02 ` Ville Syrjälä
2017-01-02 15:08 ` Ville Syrjälä
2017-01-01 20:14 ` [RFC 4/4] drm/i915: valleyview: Take punit lock when modifying punit settings Hans de Goede
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=556a9c6d-33ba-0047-82df-8bf75e09e208@redhat.com \
--to=hdegoede@redhat.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=russianneuromancer@ya.ru \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).