<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/gpu/drm/i915/intel_ringbuffer.c, branch linux-3.16.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>drm/i915/ringbuffer: Delay after EMIT_INVALIDATE for gen4/gen5</title>
<updated>2019-04-04T15:13:40+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2018-11-05T09:43:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c2c2c89ac4e9fc133bd4b4d01657470508c88dd6'/>
<id>c2c2c89ac4e9fc133bd4b4d01657470508c88dd6</id>
<content type='text'>
commit 55f99bf2a9c331838c981694bc872cd1ec4070b2 upstream.

Exercising the gpu reloc path strenuously revealed an issue where the
updated relocations (from MI_STORE_DWORD_IMM) were not being observed
upon execution. After some experiments with adding pipecontrols (a lot
of pipecontrols (32) as gen4/5 do not have a bit to wait on earlier pipe
controls or even the current on), it was discovered that we merely
needed to delay the EMIT_INVALIDATE by several flushes. It is important
to note that it is the EMIT_INVALIDATE as opposed to the EMIT_FLUSH that
needs the delay as opposed to what one might first expect -- that the
delay is required for the TLB invalidation to take effect (one presumes
to purge any CS buffers) as opposed to a delay after flushing to ensure
the writes have landed before triggering invalidation.

Testcase: igt/gem_tiled_fence_blits
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181105094305.5767-1-chris@chris-wilson.co.uk
[bwh: Backported to 3.16:
 - Use intel_ring_emit() instead of assignments
 - Use ring-&gt;scratch.gtt_offset instead of i915_ggtt_offset()
 - Use (invalidate_domains &amp; I915_GEM_DOMAIN_INSTRUCTION) instead of
   (mode &amp; EMIT_INVALIDATE)
 - Adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 55f99bf2a9c331838c981694bc872cd1ec4070b2 upstream.

Exercising the gpu reloc path strenuously revealed an issue where the
updated relocations (from MI_STORE_DWORD_IMM) were not being observed
upon execution. After some experiments with adding pipecontrols (a lot
of pipecontrols (32) as gen4/5 do not have a bit to wait on earlier pipe
controls or even the current on), it was discovered that we merely
needed to delay the EMIT_INVALIDATE by several flushes. It is important
to note that it is the EMIT_INVALIDATE as opposed to the EMIT_FLUSH that
needs the delay as opposed to what one might first expect -- that the
delay is required for the TLB invalidation to take effect (one presumes
to purge any CS buffers) as opposed to a delay after flushing to ensure
the writes have landed before triggering invalidation.

Testcase: igt/gem_tiled_fence_blits
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181105094305.5767-1-chris@chris-wilson.co.uk
[bwh: Backported to 3.16:
 - Use intel_ring_emit() instead of assignments
 - Use ring-&gt;scratch.gtt_offset instead of i915_ggtt_offset()
 - Use (invalidate_domains &amp; I915_GEM_DOMAIN_INSTRUCTION) instead of
   (mode &amp; EMIT_INVALIDATE)
 - Adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Fix SRC_COPY width on 830/845g</title>
<updated>2016-01-25T10:43:52+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2014-09-12T06:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2b5cef7bfd908e3cef8f2d2996915676c0f5687c'/>
<id>2b5cef7bfd908e3cef8f2d2996915676c0f5687c</id>
<content type='text'>
commit 611a7a4fd8b5fb6b25ab1f8bdcde61800a7feacf upstream.

One small change I forgot to make in

commit c4d69da167fa967749aeb70bc0e94a457e5d00c1
Author: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Date:   Mon Sep 8 14:25:41 2014 +0100

    drm/i915: Evict CS TLBs between batches

was to update the copy width for the compact BLT copy instruction.

Reported-by: Thomas Richter &lt;thor@math.tu-berlin.de&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Thomas Richter &lt;thor@math.tu-berlin.de&gt;
Cc: Jani Nikula &lt;jani.nikula@intel.com&gt;
Tested-by: Thomas Richter &lt;thor@math.tu-berlin.de&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 611a7a4fd8b5fb6b25ab1f8bdcde61800a7feacf upstream.

One small change I forgot to make in

commit c4d69da167fa967749aeb70bc0e94a457e5d00c1
Author: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Date:   Mon Sep 8 14:25:41 2014 +0100

    drm/i915: Evict CS TLBs between batches

was to update the copy width for the compact BLT copy instruction.

Reported-by: Thomas Richter &lt;thor@math.tu-berlin.de&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Thomas Richter &lt;thor@math.tu-berlin.de&gt;
Cc: Jani Nikula &lt;jani.nikula@intel.com&gt;
Tested-by: Thomas Richter &lt;thor@math.tu-berlin.de&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Evict CS TLBs between batches</title>
<updated>2015-01-23T12:17:58+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2014-09-08T13:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=37b1a635b3959ca4bf80adf2db626afc1b55db41'/>
<id>37b1a635b3959ca4bf80adf2db626afc1b55db41</id>
<content type='text'>
commit c4d69da167fa967749aeb70bc0e94a457e5d00c1 upstream.

Running igt, I was encountering the invalid TLB bug on my 845g, despite
that it was using the CS workaround. Examining the w/a buffer in the
error state, showed that the copy from the user batch into the
workaround itself was suffering from the invalid TLB bug (the first
cacheline was broken with the first two words reversed). Time to try a
fresh approach. This extends the workaround to write into each page of
our scratch buffer in order to overflow the TLB and evict the invalid
entries. This could be refined to only do so after we update the GTT,
but for simplicity, we do it before each batch.

I suspect this supersedes our current workaround, but for safety keep
doing both.

v2: The magic number shall be 2.

This doesn't conclusively prove that it is the mythical TLB bug we've
been trying to workaround for so long, that it requires touching a number
of pages to prevent the corruption indicates to me that it is TLB
related, but the corruption (the reversed cacheline) is more subtle than
a TLB bug, where we would expect it to read the wrong page entirely.

Oh well, it prevents a reliable hang for me and so probably for others
as well.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c4d69da167fa967749aeb70bc0e94a457e5d00c1 upstream.

Running igt, I was encountering the invalid TLB bug on my 845g, despite
that it was using the CS workaround. Examining the w/a buffer in the
error state, showed that the copy from the user batch into the
workaround itself was suffering from the invalid TLB bug (the first
cacheline was broken with the first two words reversed). Time to try a
fresh approach. This extends the workaround to write into each page of
our scratch buffer in order to overflow the TLB and evict the invalid
entries. This could be refined to only do so after we update the GTT,
but for simplicity, we do it before each batch.

I suspect this supersedes our current workaround, but for safety keep
doing both.

v2: The magic number shall be 2.

This doesn't conclusively prove that it is the mythical TLB bug we've
been trying to workaround for so long, that it requires touching a number
of pages to prevent the corruption indicates to me that it is TLB
related, but the corruption (the reversed cacheline) is more subtle than
a TLB bug, where we would expect it to read the wrong page entirely.

Oh well, it prevents a reliable hang for me and so probably for others
as well.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Force the CS stall for invalidate flushes</title>
<updated>2015-01-15T10:44:35+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2014-12-16T08:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cf0b2ec0f33d7c909523a0eac1b7aa43b3d1b8da'/>
<id>cf0b2ec0f33d7c909523a0eac1b7aa43b3d1b8da</id>
<content type='text'>
commit add284a3a2481e759d6bec35f6444c32c8ddc383 upstream.

In order to act as a full command barrier by itself, we need to tell the
pipecontrol to actually stall the command streamer while the flush runs.
We require the full command barrier before operations like
MI_SET_CONTEXT, which currently rely on a prior invalidate flush.

References: https://bugs.freedesktop.org/show_bug.cgi?id=83677
Cc: Simon Farnsworth &lt;simon@farnz.org.uk&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit add284a3a2481e759d6bec35f6444c32c8ddc383 upstream.

In order to act as a full command barrier by itself, we need to tell the
pipecontrol to actually stall the command streamer while the flush runs.
We require the full command barrier before operations like
MI_SET_CONTEXT, which currently rely on a prior invalidate flush.

References: https://bugs.freedesktop.org/show_bug.cgi?id=83677
Cc: Simon Farnsworth &lt;simon@farnz.org.uk&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Invalidate media caches on gen7</title>
<updated>2015-01-15T10:44:34+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2014-12-16T08:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=faa6cf14a9931499f0a03f19121632ef0bc133e4'/>
<id>faa6cf14a9931499f0a03f19121632ef0bc133e4</id>
<content type='text'>
commit 148b83d0815a3778c8949e6a97cb798cbaa0efb3 upstream.

In the gen7 pipe control there is an extra bit to flush the media
caches, so let's set it during cache invalidation flushes.

v2: Rename to MEDIA_STATE_CLEAR to be more inline with spec.

Cc: Simon Farnsworth &lt;simon@farnz.org.uk&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.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: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 148b83d0815a3778c8949e6a97cb798cbaa0efb3 upstream.

In the gen7 pipe control there is an extra bit to flush the media
caches, so let's set it during cache invalidation flushes.

v2: Rename to MEDIA_STATE_CLEAR to be more inline with spec.

Cc: Simon Farnsworth &lt;simon@farnz.org.uk&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.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: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: read HEAD register back in init_ring_common() to enforce ordering</title>
<updated>2014-10-05T20:40:51+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2014-08-07T14:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2e7c20830d15cb87350d4d2d3b1eb745c5763f6e'/>
<id>2e7c20830d15cb87350d4d2d3b1eb745c5763f6e</id>
<content type='text'>
commit ece4a17d237a79f63fbfaf3f724a12b6d500555c upstream.

Withtout this, ring initialization fails reliabily during resume with

	[drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head ffffff8804 tail 00000000 start 000e4000

This is not a complete fix, but it is verified to make the ring
initialization failures during resume much less likely.

We were not able to root-cause this bug (likely HW-specific to Gen4 chips)
yet. This is therefore used as a ducttape before problem is fully
understood and proper fix created, so that people don't suffer from
completely unusable systems in the meantime.

The discussion and debugging is happening at

	https://bugs.freedesktop.org/show_bug.cgi?id=76554

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ece4a17d237a79f63fbfaf3f724a12b6d500555c upstream.

Withtout this, ring initialization fails reliabily during resume with

	[drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head ffffff8804 tail 00000000 start 000e4000

This is not a complete fix, but it is verified to make the ring
initialization failures during resume much less likely.

We were not able to root-cause this bug (likely HW-specific to Gen4 chips)
yet. This is therefore used as a ducttape before problem is fully
understood and proper fix created, so that people don't suffer from
completely unusable systems in the meantime.

The discussion and debugging is happening at

	https://bugs.freedesktop.org/show_bug.cgi?id=76554

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Don't WARN about ring idle bit on gen2</title>
<updated>2014-06-05T06:52:41+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2014-05-28T16:12:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=de8f0a5016c8a0665ec2a55ed0187bad886c7dab'/>
<id>de8f0a5016c8a0665ec2a55ed0187bad886c7dab</id>
<content type='text'>
Gen2 doesn't have the ring idle/stop bits in the SCPD/MI_MODE register,
so don't go spewing warnings about the state of those bits.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gen2 doesn't have the ring idle/stop bits in the SCPD/MI_MODE register,
so don't go spewing warnings about the state of those bits.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Split the ringbuffers from the rings (3/3)</title>
<updated>2014-05-22T21:30:18+00:00</updated>
<author>
<name>Oscar Mateo</name>
<email>oscar.mateo@intel.com</email>
</author>
<published>2014-05-22T13:13:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=93b0a4e0b26e80d8ddf476024e834e675850df81'/>
<id>93b0a4e0b26e80d8ddf476024e834e675850df81</id>
<content type='text'>
Manual cleanup after the previous Coccinelle script.

Yes, I could write another Coccinelle script to do this but I
don't want labor-replacing robots making an honest programmer's
work obsolete (also, I'm lazy).

Signed-off-by: Oscar Mateo &lt;oscar.mateo@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Manual cleanup after the previous Coccinelle script.

Yes, I could write another Coccinelle script to do this but I
don't want labor-replacing robots making an honest programmer's
work obsolete (also, I'm lazy).

Signed-off-by: Oscar Mateo &lt;oscar.mateo@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Split the ringbuffers from the rings (2/3)</title>
<updated>2014-05-22T21:27:25+00:00</updated>
<author>
<name>Oscar Mateo</name>
<email>oscar.mateo@intel.com</email>
</author>
<published>2014-05-22T13:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ee1b1e5ef38d22e2447b48b8456a2b2bcf438e65'/>
<id>ee1b1e5ef38d22e2447b48b8456a2b2bcf438e65</id>
<content type='text'>
This refactoring has been performed using the following Coccinelle
semantic script:

    @@
    struct intel_engine_cs r;
    @@
    (
    - (r).obj
    + r.buffer-&gt;obj
    |
    - (r).virtual_start
    + r.buffer-&gt;virtual_start
    |
    - (r).head
    + r.buffer-&gt;head
    |
    - (r).tail
    + r.buffer-&gt;tail
    |
    - (r).space
    + r.buffer-&gt;space
    |
    - (r).size
    + r.buffer-&gt;size
    |
    - (r).effective_size
    + r.buffer-&gt;effective_size
    |
    - (r).last_retired_head
    + r.buffer-&gt;last_retired_head
    )

    @@
    struct intel_engine_cs *r;
    @@
    (
    - (r)-&gt;obj
    + r-&gt;buffer-&gt;obj
    |
    - (r)-&gt;virtual_start
    + r-&gt;buffer-&gt;virtual_start
    |
    - (r)-&gt;head
    + r-&gt;buffer-&gt;head
    |
    - (r)-&gt;tail
    + r-&gt;buffer-&gt;tail
    |
    - (r)-&gt;space
    + r-&gt;buffer-&gt;space
    |
    - (r)-&gt;size
    + r-&gt;buffer-&gt;size
    |
    - (r)-&gt;effective_size
    + r-&gt;buffer-&gt;effective_size
    |
    - (r)-&gt;last_retired_head
    + r-&gt;buffer-&gt;last_retired_head
    )

    @@
    expression E;
    @@
    (
    - LP_RING(E)-&gt;obj
    + LP_RING(E)-&gt;buffer-&gt;obj
    |
    - LP_RING(E)-&gt;virtual_start
    + LP_RING(E)-&gt;buffer-&gt;virtual_start
    |
    - LP_RING(E)-&gt;head
    + LP_RING(E)-&gt;buffer-&gt;head
    |
    - LP_RING(E)-&gt;tail
    + LP_RING(E)-&gt;buffer-&gt;tail
    |
    - LP_RING(E)-&gt;space
    + LP_RING(E)-&gt;buffer-&gt;space
    |
    - LP_RING(E)-&gt;size
    + LP_RING(E)-&gt;buffer-&gt;size
    |
    - LP_RING(E)-&gt;effective_size
    + LP_RING(E)-&gt;buffer-&gt;effective_size
    |
    - LP_RING(E)-&gt;last_retired_head
    + LP_RING(E)-&gt;buffer-&gt;last_retired_head
    )

Note: On top of this this patch also removes the now unused ringbuffer
fields in intel_engine_cs.

Signed-off-by: Oscar Mateo &lt;oscar.mateo@intel.com&gt;
[danvet: Add note about fixup patch included here.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This refactoring has been performed using the following Coccinelle
semantic script:

    @@
    struct intel_engine_cs r;
    @@
    (
    - (r).obj
    + r.buffer-&gt;obj
    |
    - (r).virtual_start
    + r.buffer-&gt;virtual_start
    |
    - (r).head
    + r.buffer-&gt;head
    |
    - (r).tail
    + r.buffer-&gt;tail
    |
    - (r).space
    + r.buffer-&gt;space
    |
    - (r).size
    + r.buffer-&gt;size
    |
    - (r).effective_size
    + r.buffer-&gt;effective_size
    |
    - (r).last_retired_head
    + r.buffer-&gt;last_retired_head
    )

    @@
    struct intel_engine_cs *r;
    @@
    (
    - (r)-&gt;obj
    + r-&gt;buffer-&gt;obj
    |
    - (r)-&gt;virtual_start
    + r-&gt;buffer-&gt;virtual_start
    |
    - (r)-&gt;head
    + r-&gt;buffer-&gt;head
    |
    - (r)-&gt;tail
    + r-&gt;buffer-&gt;tail
    |
    - (r)-&gt;space
    + r-&gt;buffer-&gt;space
    |
    - (r)-&gt;size
    + r-&gt;buffer-&gt;size
    |
    - (r)-&gt;effective_size
    + r-&gt;buffer-&gt;effective_size
    |
    - (r)-&gt;last_retired_head
    + r-&gt;buffer-&gt;last_retired_head
    )

    @@
    expression E;
    @@
    (
    - LP_RING(E)-&gt;obj
    + LP_RING(E)-&gt;buffer-&gt;obj
    |
    - LP_RING(E)-&gt;virtual_start
    + LP_RING(E)-&gt;buffer-&gt;virtual_start
    |
    - LP_RING(E)-&gt;head
    + LP_RING(E)-&gt;buffer-&gt;head
    |
    - LP_RING(E)-&gt;tail
    + LP_RING(E)-&gt;buffer-&gt;tail
    |
    - LP_RING(E)-&gt;space
    + LP_RING(E)-&gt;buffer-&gt;space
    |
    - LP_RING(E)-&gt;size
    + LP_RING(E)-&gt;buffer-&gt;size
    |
    - LP_RING(E)-&gt;effective_size
    + LP_RING(E)-&gt;buffer-&gt;effective_size
    |
    - LP_RING(E)-&gt;last_retired_head
    + LP_RING(E)-&gt;buffer-&gt;last_retired_head
    )

Note: On top of this this patch also removes the now unused ringbuffer
fields in intel_engine_cs.

Signed-off-by: Oscar Mateo &lt;oscar.mateo@intel.com&gt;
[danvet: Add note about fixup patch included here.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/i915: Split the ringbuffers from the rings (1/3)</title>
<updated>2014-05-22T21:02:16+00:00</updated>
<author>
<name>Oscar Mateo</name>
<email>oscar.mateo@intel.com</email>
</author>
<published>2014-05-22T13:13:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8ee149756e4fbaf4462cf3f7377456ec5fff8b63'/>
<id>8ee149756e4fbaf4462cf3f7377456ec5fff8b63</id>
<content type='text'>
As advanced by the previous patch, the ringbuffers and the engine
command streamers belong in different structs. This is so because,
while they used to be tightly coupled together, the new Logical
Ring Contexts (LRC for short) have a ringbuffer each.

In legacy code, we will use the buffer* pointer inside each ring
to get to the pertaining ringbuffer (the actual switch will be
done in the next patch). In the new Execlists code, this pointer
will be NULL and we will use instead the one inside the context
instead.

Signed-off-by: Oscar Mateo &lt;oscar.mateo@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As advanced by the previous patch, the ringbuffers and the engine
command streamers belong in different structs. This is so because,
while they used to be tightly coupled together, the new Logical
Ring Contexts (LRC for short) have a ringbuffer each.

In legacy code, we will use the buffer* pointer inside each ring
to get to the pertaining ringbuffer (the actual switch will be
done in the next patch). In the new Execlists code, this pointer
will be NULL and we will use instead the one inside the context
instead.

Signed-off-by: Oscar Mateo &lt;oscar.mateo@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</pre>
</div>
</content>
</entry>
</feed>
