From: Arun Siluvery <arun.siluvery@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v6 0/6] Add Per-context WA using WA batch buffers
Date: Fri, 19 Jun 2015 18:37:09 +0100 [thread overview]
Message-ID: <1434735435-14728-1-git-send-email-arun.siluvery@linux.intel.com> (raw)
From Gen8+ we have some workarounds that are applied Per context and
they are applied using special batch buffers called as WA batch buffers.
HW executes them at specific stages during context save/restore.
The patches in this series adds this framework to i915.
I did some basic testing on BDW by running glmark2 and didn't see any issues.
These WA are mainly required when preemption is enabled.
[v1] http://lists.freedesktop.org/archives/intel-gfx/2015-February/060707.html
[v2] http://www.spinics.net/lists/intel-gfx/msg67804.html
[v3] In v2, two separate ring_buffer objects were used to load WA instructions
and they were part of every context which is not really required.
Chris suggested a better approach of adding a page to context itself and using
it for this purpose. Since GuC is also planning to do the same it can probably
be shared with GuC. But after discussions it is agreed to use an independent
page as GuC area might grow in future. Independent page also makes sense because
these WA are only initialized once and not changed afterwards so we can share
them across all contexts.
[v4] Changes in this revision,
In the previous version the size of batch buffers are fixed during
initialization which is not a good idea. This is corrected by updating the
functions that load WA to return the number of dwords written and caller
updates the size once all WA are initialized. The functions now also accept
offset field which allows us to have multiple batches so that required batch
can be selected based on a criteria. This is not a requirement at this point
but could be useful in future.
WaFlushCoherentL3CacheLinesAtContextSwitch implementation was incomplete which
is fixed and programming restrictions correctly applied.
http://www.spinics.net/lists/intel-gfx/msg68947.html
[v5] No major changes in this revision but switched to new revision as changes
affected all patches. Introduced macro to add commands which also checks for
page overflow. Moved code around to simplify, indentation fixes and other
improvements suggested by Chris.
Since we don't know the number of WA applied upfront, Chris suggested a two-pass
approach but that brings additional complexity which is not necessary.
Discussed with Chris and agreed upon on single page setup as simpler code wins
and also single page is sufficient for our requirement.
http://www.spinics.net/lists/intel-gfx/msg69176.html
[v6] Changes made to make the code easy to modify for future Gen. It is much
neater and contained now, big thanks to Chris Wilson for the review.
Since these changes affect all patches I am sending as a separate revision.
Please see the patches for more details.
Arun Siluvery (6):
drm/i915/gen8: Add infrastructure to initialize WA batch buffers
drm/i915/gen8: Re-order init pipe_control in lrc mode
drm/i915/gen8: Add WaDisableCtxRestoreArbitration workaround
drm/i915/gen8: Add WaFlushCoherentL3CacheLinesAtContextSwitch
workaround
drm/i915/gen8: Add WaClearSlmSpaceAtContextSwitch workaround
drm/i915/gen8: Add WaRsRestoreWithPerCtxtBb workaround
drivers/gpu/drm/i915/i915_reg.h | 32 +++-
drivers/gpu/drm/i915/intel_lrc.c | 328 +++++++++++++++++++++++++++++++-
drivers/gpu/drm/i915/intel_ringbuffer.h | 21 ++
3 files changed, 374 insertions(+), 7 deletions(-)
--
2.3.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2015-06-19 17:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 17:37 Arun Siluvery [this message]
2015-06-19 17:37 ` [PATCH v6 1/6] drm/i915/gen8: Add infrastructure to initialize WA batch buffers Arun Siluvery
2015-06-19 17:50 ` Chris Wilson
2015-06-22 15:36 ` Daniel Vetter
2015-06-22 15:37 ` Siluvery, Arun
2015-06-19 17:37 ` [PATCH v6 2/6] drm/i915/gen8: Re-order init pipe_control in lrc mode Arun Siluvery
2015-06-19 17:58 ` Chris Wilson
2015-06-19 17:37 ` [PATCH v6 3/6] drm/i915/gen8: Add WaDisableCtxRestoreArbitration workaround Arun Siluvery
2015-06-19 18:11 ` Chris Wilson
2015-06-19 17:37 ` [PATCH v6 4/6] drm/i915/gen8: Add WaFlushCoherentL3CacheLinesAtContextSwitch workaround Arun Siluvery
2015-06-19 18:12 ` Chris Wilson
2015-06-22 15:41 ` Daniel Vetter
2015-06-19 17:37 ` [PATCH v6 5/6] drm/i915/gen8: Add WaClearSlmSpaceAtContextSwitch workaround Arun Siluvery
2015-06-19 18:09 ` Chris Wilson
2015-06-22 11:29 ` Siluvery, Arun
2015-06-22 15:39 ` Daniel Vetter
2015-06-23 14:46 ` [PATCH v6 5/5] " Arun Siluvery
2015-06-23 15:14 ` Chris Wilson
2015-06-23 21:22 ` Daniel Vetter
2015-06-19 17:37 ` [PATCH v6 6/6] drm/i915/gen8: Add WaRsRestoreWithPerCtxtBb workaround Arun Siluvery
2015-06-22 11:30 ` Siluvery, Arun
2015-06-22 16:21 ` Ville Syrjälä
2015-06-22 16:59 ` Siluvery, Arun
2015-06-23 14:48 ` Siluvery, Arun
2015-06-19 18:07 ` [PATCH v6 1/6] drm/i915/gen8: Add infrastructure to initialize WA batch buffers Arun Siluvery
2015-06-22 15:41 ` Daniel Vetter
2015-06-22 15:43 ` Siluvery, Arun
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=1434735435-14728-1-git-send-email-arun.siluvery@linux.intel.com \
--to=arun.siluvery@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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