public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: intel-gfx@lists.freedesktop.org, Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] drm/i915: fix comment referencing imaginary functions
Date: Fri, 21 Oct 2016 16:00:10 +0300	[thread overview]
Message-ID: <87vawlq2lh.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20161021122841.GK25629@nuc-i3427.alporthouse.com>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> On Fri, Oct 21, 2016 at 02:16:46PM +0200, Arkadiusz Hiler wrote:
>> On Wed, Aug 24, 2016 at 05:03:11PM +0100, Matthew Auld wrote:
>> > The comment which documents the proper usage of the *_FW family of macros makes
>> > reference to intel_uncore_forcewake_irq{unlock, lock}, which is just
>> > confusing, seeing as such a set of functions don't even exist and never have
>> > for that matter(according to git). Let's fix that by replacing them with
>> > intel_uncore_forcewake_{get, put}.
>> > 
>> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>
> The downside is that this now doesn't mention the locking required to
> prevent machine hangs on some platforms.

"intel_uncore_forcewake_get will acquire forcewake reference and also
take a uncore.lock to guarantee explicit access by one thread only. As
some registers don't need forcewake held, intel_uncore_forcewake_{get,put}
can be omitted. If you do so, be warned that on some gens (gen7),
concurrent access to the same cacheline by multiple cpu threads with the gpu
can risk a system hang. You need to grab uncore spinlock explicitly to
guard against this."

Would that be accurate addition?

-Mika

> -Chris
>
> -- 
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-21 13:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 16:03 [PATCH] drm/i915: fix comment referencing imaginary functions Matthew Auld
2016-08-24 16:50 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-10-21 12:16 ` [PATCH] " Arkadiusz Hiler
2016-10-21 12:28   ` Chris Wilson
2016-10-21 13:00     ` Mika Kuoppala [this message]
2016-10-21 13:57       ` Chris Wilson
2016-10-24 11:23         ` Arkadiusz Hiler
2016-10-25 11:29           ` Matthew Auld
2016-10-25 11:39             ` Chris Wilson

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=87vawlq2lh.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=arkadiusz.hiler@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox