<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/i915/intel_ringbuffer.c, branch linux-3.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-05-12T16:32:04Z</updated>
<entry>
<title>drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+</title>
<updated>2012-05-12T16:32:04Z</updated>
<author>
<name>Daniel Vetter</name>
</author>
<published>2012-05-06T14:50:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7bcb4bafa9bb05db987601067c2f9da45d2678c'/>
<id>urn:sha1:e7bcb4bafa9bb05db987601067c2f9da45d2678c</id>
<content type='text'>
commit 2e7a44814d802c8ba479164b8924070cd908d6b5 upstream.

I've flagged this while reviewing the first version and Ken Graunke
fixed it up in v2, but unfortunately Dave Airlie picked up the wrong
version.

Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Signed-Off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/i915: Set the Stencil Cache eviction policy to non-LRA mode.</title>
<updated>2012-05-07T15:53:21Z</updated>
<author>
<name>Kenneth Graunke</name>
</author>
<published>2012-04-27T19:44:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a4ddbfcd27b7190182ef7ce9464af8c93043cb9'/>
<id>urn:sha1:6a4ddbfcd27b7190182ef7ce9464af8c93043cb9</id>
<content type='text'>
commit 3a69ddd6f872180b6f61fda87152b37202118fbc upstream.

Clearing bit 5 of CACHE_MODE_0 is necessary to prevent GPU hangs in
OpenGL programs such as Google MapsGL, Google Earth, and gzdoom when
using separate stencil buffers.  Without it, the GPU tries to use the
LRA eviction policy, which isn't supported.  This was supposed to be off
by default, but seems to be on for many machines.

This cannot be done in gen6_init_clock_gating with most of the other
workaround bits; the render ring needs to exist.  Otherwise, the
register write gets dropped on the floor (one printk will show it
changed, but a second printk immediately following shows the value
reverts to the old one).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47535
Cc: Rob Castle &lt;futuredub@gmail.com&gt;
Cc: Eric Appleman &lt;erappleman@gmail.com&gt;
Cc: aaron667@gmx.net
Cc: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g</title>
<updated>2012-04-22T22:38:53Z</updated>
<author>
<name>Chris Wilson</name>
</author>
<published>2012-04-09T12:59:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e4565b215841e6b2596b35a2c0c632a6122f86d'/>
<id>urn:sha1:9e4565b215841e6b2596b35a2c0c632a6122f86d</id>
<content type='text'>
commit 27c1cbd06a7620b354cbb363834f3bb8df4f410d upstream.

The 845g shares the errata with i830 whereby executing a command
within 2 cachelines of the end of the ringbuffer may cause a GPU hang.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/i915: Remove use of the autoreported ringbuffer HEAD position</title>
<updated>2012-02-27T16:49:56Z</updated>
<author>
<name>Chris Wilson</name>
</author>
<published>2012-02-08T13:34:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d031e5b633d910f35e6e0abce94d9d842390006'/>
<id>urn:sha1:5d031e5b633d910f35e6e0abce94d9d842390006</id>
<content type='text'>
This is a revert of 6aa56062eaba67adfb247cded244fd877329588d.

This was originally introduced to workaround reads of the ringbuffer
registers returning 0 on SandyBridge causing hangs due to ringbuffer
overflow. The root cause here was reads through the GT powerwell require
the forcewake dance, something we only learnt of later. Now it appears
that reading the reported head position from the HWS is returning
garbage, leading once again to hangs.

For example, on q35 the autoreported head reports:
  [  217.975608] head now 00010000, actual 00010000
  [  436.725613] head now 00200000, actual 00200000
  [  462.956033] head now 00210000, actual 00210010
  [  485.501409] head now 00400000, actual 00400020
  [  508.064280] head now 00410000, actual 00410000
  [  530.576078] head now 00600000, actual 00600020
  [  553.273489] head now 00610000, actual 00610018
which appears reasonably sane. In contrast, if we look at snb:
  [  141.970680] head now 00e10000, actual 00008238
  [  141.974062] head now 02734000, actual 000083c8
  [  141.974425] head now 00e10000, actual 00008488
  [  141.980374] head now 032b5000, actual 000088b8
  [  141.980885] head now 03271000, actual 00008950
  [  142.040628] head now 02101000, actual 00008b40
  [  142.180173] head now 02734000, actual 00009050
  [  142.181090] head now 00000000, actual 00000ae0
  [  142.183737] head now 02734000, actual 00009050

In addition, the automatic reporting of the head position is scheduled
to be defeatured in the future. It has no more utility, remove it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45492
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Tested-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>Revert "drm/i915: Work around gen7 BLT ring synchronization issues."</title>
<updated>2012-01-20T18:20:44Z</updated>
<author>
<name>Keith Packard</name>
</author>
<published>2012-01-20T05:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f0fc977f58c36e75e205486c1aebb9b8e4263e1'/>
<id>urn:sha1:8f0fc977f58c36e75e205486c1aebb9b8e4263e1</id>
<content type='text'>
This reverts commit 42ff6572e5a4a7414330a4ca91f0335da67deca9.

New forcewake voodoo makes this no longer necessary.

Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: paper over missed irq issues with force wake voodoo</title>
<updated>2012-01-19T20:28:57Z</updated>
<author>
<name>Daniel Vetter</name>
</author>
<published>2012-12-14T15:01:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4cd53c0c8b01fc05c3ad5b2acdad02e37d3c2f55'/>
<id>urn:sha1:4cd53c0c8b01fc05c3ad5b2acdad02e37d3c2f55</id>
<content type='text'>
Two things seem to do the trick on my ivb machine here:
- prevent the gt from powering down while waiting for seqno
  notification interrupts by grabbing the force_wake in get_irq (and
  dropping it in put_irq again).
- ordering writes from the ring's CS by reading a CS register, ACTHD
  seems to work.

Only the blt&amp;bsd ring on ivb seem to be massively affected by this,
but for paranoia do this dance also on the render ring and on snb
(i.e. all gpus with forcewake).

Tested with Eric's glCopyPixels loop which without this patch scores a
missed irq every few seconds.

This patch needs my forcewake rework to use a spinlock instead of
dev-&gt;struct_mutex.

After crawling through docs a lot I've found the following nugget:

Internal doc "SNB GT PM Programming Guide", Section 4.3.1:

"GT does not generate interrupts while in RC6 (by design)"

So it looks like rc6 and irq generation are indeed related.

v2: Improve the comment per Eugeni Dodonov's suggestion.

v3: Add the documentation snipped. Also restrict the w/a to ivb only
for -fixes, as suggested by Keith Packard.

Cc: stable@kernel.org
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Cc: Eugeni Dodonov &lt;eugeni.dodonov@intel.com&gt;
Tested-by: Eugeni Dodonov &lt;eugeni.dodonov@intel.com&gt;
Reviewed-by: Eugeni Dodonov &lt;eugeni.dodonov@intel.com&gt;
Signed-Off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: don't bail out of intel_wait_ring_buffer too early</title>
<updated>2012-01-03T18:26:31Z</updated>
<author>
<name>Daniel Vetter</name>
</author>
<published>2011-12-14T12:56:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6bfaf854272ec4641a9ef7b1cb1ca963031ba95'/>
<id>urn:sha1:e6bfaf854272ec4641a9ef7b1cb1ca963031ba95</id>
<content type='text'>
In the pre-gem days with non-existing hangcheck and gpu reset code,
this timeout of 3 seconds was pretty important to avoid stuck
processes.

But now we have the hangcheck code in gem that goes to great length
to ensure that the gpu is really dead before declaring it wedged.

So there's no need for this timeout anymore. Actually it's even harmful
because we can bail out too early (e.g. with xscreensaver slip)
when running giant batchbuffers. And our code isn't robust enough
to properly unroll any state-changes, we pretty much rely on the gpu
reset code cleaning up the mess (like cache tracking, fencing state,
active list/request tracking, ...).

With this change intel_begin_ring can only fail when the gpu is
wedged, and it will return -EAGAIN (like wait_request in case the
gpu reset is still outstanding).

v2: Chris Wilson noted that on resume timers aren't running and hence
we won't ever get kicked out of this loop by the hangcheck code. Use
an insanely large timeout instead for the HAS_GEM case to prevent
resume bugs from totally hanging the machine.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Acked-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Reviewed-by: Eugeni Dodonov &lt;eugeni.dodonov@intel.com&gt;
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: Work around gen7 BLT ring synchronization issues.</title>
<updated>2012-01-03T17:31:15Z</updated>
<author>
<name>Eric Anholt</name>
</author>
<published>2011-12-22T22:55:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42ff6572e5a4a7414330a4ca91f0335da67deca9'/>
<id>urn:sha1:42ff6572e5a4a7414330a4ca91f0335da67deca9</id>
<content type='text'>
Previous to this commit, testing easily reproduced a failure where the
seqno would apparently arrive after the IRQ associated with it, with test programs as simple as:

for (;;) {
    glCopyPixels(0, 0, 1, 1);
    glFinish();
}

Various workarounds we've seen for previous generations didn't work to
fix this issue, so until new information comes in, replace the IRQ
waits on the BLT ring with polling.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Tested-by: Eugeni Dodonov &lt;eugeni.dodonov@intel.com&gt;
Reviewed-by: Eugeni Dodonov &lt;eugeni.dodonov@intel.com&gt;
Acked-by: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: Force sync command ordering (Gen6+)</title>
<updated>2012-01-03T17:09:44Z</updated>
<author>
<name>Ben Widawsky</name>
</author>
<published>2011-12-13T03:21:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84f9f938be4156e4baea466688bd6abae1c9e6ba'/>
<id>urn:sha1:84f9f938be4156e4baea466688bd6abae1c9e6ba</id>
<content type='text'>
The docs say this is required for Gen7, and since the bit was added for
Gen6, we are also setting it there pit pf paranoia. Particularly as
Chris points out, if PIPE_CONTROL counts as a 3d state packet.

This was found through doc inspection by Ken and applies to Gen6+;

Reported-by: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>drm/i915: Use PIPE_CONTROL for flushing on gen6+.</title>
<updated>2011-10-20T22:26:41Z</updated>
<author>
<name>Jesse Barnes</name>
</author>
<published>2011-10-16T08:23:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d31528703ceda6f631e39953130abe9b3ca52b2'/>
<id>urn:sha1:8d31528703ceda6f631e39953130abe9b3ca52b2</id>
<content type='text'>
v2 by danvet: Use a new flag to flush the render target cache on gen6+
(hw reuses the old write flush bit), as suggested by Ben Widawsdy.

Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Signed-off-by: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
[danvet: this seems to fix cairo-perf-trace hangs on my snb]
Signed-Off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
</feed>
