<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/i915/intel_ringbuffer.c, branch v3.13.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.13.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.13.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2014-02-13T21:55:41+00:00</updated>
<entry>
<title>drm/i915: Flush outstanding requests before allocating new seqno</title>
<updated>2014-02-13T21:55:41+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2014-01-02T14:32:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fbc5a516461a61fdae720c4dc25b1bee37139eca'/>
<id>urn:sha1:fbc5a516461a61fdae720c4dc25b1bee37139eca</id>
<content type='text'>
commit 304d695c3dc8eb65206b9eaf16f8d1a41510d1cf upstream.

In very rare cases (such as a memory failure stress test) it is possible
to fill the entire ring without emitting a request. Under this
circumstance, the outstanding request is flushed and waited upon. After
space on the ring is cleared, we return to emitting the new command -
except that we just cleared the seqno allocated for this operation and
trigger the sanity check that a request is only ever emitted with a
valid seqno. The fix is to rearrange the code to make sure the
allocation of the seqno for this operation is after any required flushes
of outstanding operations.

The bug exists since the preallocation was introduced in
commit 9d7730914f4cd496e356acfab95b41075aa8eae8
Author: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Date:   Tue Nov 27 16:22:52 2012 +0000

    drm/i915: Preallocate next seqno before touching the ring

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Mika Kuoppala &lt;mika.kuoppala@intel.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Jani Nikula &lt;jani.nikula@intel.com&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/bdw: Add comment about gen8 HWS PGA</title>
<updated>2013-11-14T08:33:11+00:00</updated>
<author>
<name>Ben Widawsky</name>
<email>benjamin.widawsky@intel.com</email>
</author>
<published>2013-11-08T05:40:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb0d4b75d506050cb369df467b93b92360f5acaf'/>
<id>urn:sha1:eb0d4b75d506050cb369df467b93b92360f5acaf</id>
<content type='text'>
This confused me some many times that I think it is appropriate to add a
small comment to instruct the reader of the code that it is indeed doing
what it is supposed to do.

Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/i915/bdw: Take render error interrupt out of the mask</title>
<updated>2013-11-08T17:10:10+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2013-11-08T05:40:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40c499f93fdefa2c496f59d18483b417ea06448b'/>
<id>urn:sha1:40c499f93fdefa2c496f59d18483b417ea06448b</id>
<content type='text'>
The handling of the error interrupts isn't wired up at all. And it
hasn't been ever since ilk happened, so don't bother.

Reviewed-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/i915/bdw: BSD init for gen8 also</title>
<updated>2013-11-08T17:09:50+00:00</updated>
<author>
<name>Ben Widawsky</name>
<email>benjamin.widawsky@intel.com</email>
</author>
<published>2013-11-03T04:07:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=780f18c84cc671071556d37ce198a01feaca00ea'/>
<id>urn:sha1:780f18c84cc671071556d37ce198a01feaca00ea</id>
<content type='text'>
This was an oversight and should have been in a previous series
somewhere.

Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/i915/bdw: Render ring flushing</title>
<updated>2013-11-08T17:09:49+00:00</updated>
<author>
<name>Ben Widawsky</name>
<email>benjamin.widawsky@intel.com</email>
</author>
<published>2013-11-03T04:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5f3d68e2e6eb2f8e23ba83890ea3fdaaa7dab82'/>
<id>urn:sha1:a5f3d68e2e6eb2f8e23ba83890ea3fdaaa7dab82</id>
<content type='text'>
PIPE_CONTROL added the high address dword. I'm not sure how the
simulator let me get away with this. I've explicitly left out all the
workarounds from Gen7 because in the minimal digging that I did, most
don't seem necessary, and the simulator doesn't complain without them

Note that BLT and BSD ring commands had already been updated previously.
Just render/pipe_control should have been broken.

v2: Squash in a fixup from Ville to follow the recent IVB PIPE_CONTROL
updates: "BDW uses the IVB PIPE_CONTROL style for specifying GTT vs.
PPGTT for the PIPE_CONTROL QW/DW write."

v3: Rebase on top of Chris' cleanup to have an explicit ring-&gt;scratch
buffer object instead of an opaque ring-&gt;private where everyone stores
the same stuff inside.

Reported-by: Damien Lespiau &lt;damien.lespiau@intel.com&gt;
Reviewed-by: Ben Widawsky &lt;ben@bwidawsk.net&gt; (for the fixup)
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt; (v1)
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/i915/bdw: unleash PPGTT</title>
<updated>2013-11-08T17:09:48+00:00</updated>
<author>
<name>Ben Widawsky</name>
<email>benjamin.widawsky@intel.com</email>
</author>
<published>2013-11-03T04:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28cf541543302d0b54703613838914fd9b6e3447'/>
<id>urn:sha1:28cf541543302d0b54703613838914fd9b6e3447</id>
<content type='text'>
v2: Squash in fix from Ben: Set PPGTT batches as necessary

This fixes the regression in the last couple of days when we enabled
PPGTT.

v3: Squash in fixup to still use GTT for secure batches from Ville:

BDW doesn't have a separate secure vs. non-secure bit in
MI_BATCH_BUFFER_START. So for secure batches we have to simply
leave the PPGTT bit unset. Fortunately older generations (except
HSW) had similar limitations so execbuffer already creates a GTT
mapping for all secure batches.

Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Reviewed-by: Imre Deak &lt;imre.deak@intel.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/i915/bdw: Update MI_FLUSH_DW</title>
<updated>2013-11-08T17:09:42+00:00</updated>
<author>
<name>Ben Widawsky</name>
<email>benjamin.widawsky@intel.com</email>
</author>
<published>2013-11-03T04:07:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=075b3bbaae0d6ec99c09d2299c3632e481028542'/>
<id>urn:sha1:075b3bbaae0d6ec99c09d2299c3632e481028542</id>
<content type='text'>
The code is more verbose than necessary for the reader's sake, hopefully
the compiler optimizes away the if.

Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/i915/bdw: dispatch updates (64b related)</title>
<updated>2013-11-08T17:09:41+00:00</updated>
<author>
<name>Ben Widawsky</name>
<email>benjamin.widawsky@intel.com</email>
</author>
<published>2013-11-03T04:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c7a0623c795b35349d8f19cd8e8a19ac5783008'/>
<id>urn:sha1:1c7a0623c795b35349d8f19cd8e8a19ac5783008</id>
<content type='text'>
The command to emit batch buffers has changed to address 48b addresses.
It seemed reasonable that we could still use the old instruction where
emitting 0 for length would do the right thing, but it seems to bother
the simulator when the code does that.

Now the second dword in the command has the upper 16b of the address of
the batchbuffer.

v2: Remove duplicated vfun assignment.

v3: Squash in VECS support changes from Zhao Yakui &lt;yakui.zhao@intel.com&gt;

v4: Make checkpatch happy.

Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt; (v2)
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/i915/bdw: Implement interrupt changes</title>
<updated>2013-11-08T17:09:39+00:00</updated>
<author>
<name>Ben Widawsky</name>
<email>benjamin.widawsky@intel.com</email>
</author>
<published>2013-11-03T04:07:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=abd58f0175915bed644aa67c8f69dc571b8280e0'/>
<id>urn:sha1:abd58f0175915bed644aa67c8f69dc571b8280e0</id>
<content type='text'>
The interrupt handling implementation remains the same as previous
generations with the 4 types of registers, status, identity, mask, and
enable. However the layout of where the bits go have changed entirely.
To address these changes, all of the interrupt vfuncs needed special
gen8 code.

The way it works is there is a top level status register now which
informs the interrupt service routine which unit caused the interrupt,
and therefore which interrupt registers to read to process the
interrupt. For display the division is quite logical, a set of interrupt
registers for each pipe, and in addition to those, a set each for "misc"
and port.

For GT the things get a bit hairy, as seen by the code. Each of the GT
units has it's own bits defined. They all look *very similar* and
resides in 16 bits of a GT register. As an example, RCS and BCS share
register 0. To compact the code a bit, at a slight expense to
complexity, this is exactly how the code works as well. 2 structures are
added to the ring buffer so that our ring buffer interrupt handling code
knows which ring shares the interrupt registers, and a shift value (ie.
the top or bottom 16 bits of the register).

The above allows us to kept the interrupt register caching scheme, the
per interrupt enables, and the code to mask and unmask interrupts
relatively clean (again at the cost of some more complexity).

Most of the GT units mentioned above are command streamers, and so the
symmetry should work quite well for even the yet to be implemented rings
which Broadwell adds.

v2: Fixes up a couple of bugs, and is more verbose about errors in the
Broadwell interrupt handler.

v3: fix DE_MISC IER offset

v4: Simplify interrupts:
I totally misread the docs the first time I implemented interrupts, and
so this should greatly simplify the mess. Unlike GEN6, we never touch
the regular mask registers in irq_get/put.

v5: Rebased on to of recent pch hotplug setup changes.

v6: Fixup on top of moving num_pipes to intel_info.

v7: Rebased on top of Egbert Eich's hpd irq handling rework. Also
wired up ibx_hpd_irq_setup for gen8.

v8: Rebase on top of Jani's asle handling rework.

v9: Rebase on top of Ben's VECS enabling for Haswell, where he
unfortunately went OCD on the gt irq #defines. Not that they're still
not yet fully consistent:
- Used the GT_RENDER_ #defines + bdw shifts.
- Dropped the shift from the L3_PARITY stuff, seemed clearer.
- s/irq_refcount/irq_refcount.gt/

v10: Squash in VECS enabling patches and the gen8_gt_irq_handler
refactoring from Zhao Yakui &lt;yakui.zhao@intel.com&gt;

v11: Rebase on top of the interrupt cleanups in upstream.

v12: Rebase on top of Ben's DPF changes in upstream.

v13: Drop bdw from the HAS_L3_DPF feature flag for now, it's unclear what
exactly needs to be done. Requested by Ben.

v14: Fix the patch.
- Drop the mask of reserved bits and assorted logic, it doesn't match
  the spec.
- Do the posting read inconditionally instead of commenting it out.
- Add a GEN8_MASTER_IRQ_CONTROL definition and use it.
- Fix up the GEN8_PIPE interrupt defines and give the GEN8_ prefixes -
  we actually will need to use them.
- Enclose macros in do {} while (0) (checkpatch).
- Clear DE_MISC interrupt bits only after having processed them.
- Fix whitespace fail (checkpatch).
- Fix overtly long lines where appropriate (checkpatch).
- Don't use typedef'ed private_t (maintainer-scripts).
- Align the function parameter list correctly.

Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt; (v4)
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;

bikeshed
</content>
</entry>
<entry>
<title>drm/i915: Do a fuller init after reset</title>
<updated>2013-10-16T09:08:08+00:00</updated>
<author>
<name>Ben Widawsky</name>
<email>ben@bwidawsk.net</email>
</author>
<published>2013-10-14T17:01:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d57e5bd1284f44e325f3a52d966259ed42f9e05'/>
<id>urn:sha1:3d57e5bd1284f44e325f3a52d966259ed42f9e05</id>
<content type='text'>
I had this lying around from he original PPGTT series, and thought we
might try to get it in by itself.

It's convenient to just call i915_gem_init_hw at reset because we'll be
adding new things to that function, and having just one function to call
instead of reimplementing it in two places is nice.

In order to accommodate we cleanup ringbuffers in order to bring them
back up cleanly. Optionally, we could also teardown/re initialize the
default context but this was causing some problems on reset which I
wasn't able to fully debug, and is unnecessary with the previous context
init/enable split.

This essentially reverts:
commit 8e88a2bd5987178d16d53686197404e149e996d9
Author: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Date:   Tue Jun 19 18:40:00 2012 +0200

    drm/i915: don't call modeset_init_hw in i915_reset

It seems to work for me on ILK now. Perhaps it's due to:
commit 8a5c2ae753c588bcb2a4e38d1c6a39865dbf1ff3
Author: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Date:   Thu Mar 28 13:57:19 2013 -0700

    drm/i915: fix ILK GPU reset for render

Signed-off-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
</feed>
