From: Ben Widawsky <ben@bwidawsk.net>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH 00/12] [RFC] PPGTT prep patches part 1
Date: Tue, 23 Apr 2013 23:15:28 -0700 [thread overview]
Message-ID: <1366784140-2670-1-git-send-email-ben@bwidawsk.net> (raw)
First, I have not finished implementing PPGTT. These are all the patches
I have which I can dump now and not have serious regression risk (and I
think most of them are tolerable on their own). The point is to get
review, make my plans explicit, and get these patches merged.
The main accomplishment of this series is to provide more abstract
management of the PPGTT for when we have more than just the aliasing
PPGTT. That abstract way in which we allocate space for PPGTT PDEs (and
the use of the topdown allocator for that matter) seem entirely
unnecessary because of course nothing has functionally changed except
the ppgtt is not kzalloc'd, and that PDEs now serve as the guard page
now for gen6+ (y'all own me 4k).
I've seriously reworked Chris' top down allocator patch, so I'd really
like at least him to take a look at that one and make sure he still
agrees.
Since the earliest discussions of contexts in early 2011, we've
discussed the association between a context and the PPGTT. I've always
felt it made sense to have a very strong association between a context
and its address space. Knowing a bit about the future, I feel doubly
confident in saying so. Aside from the reworks in this series which
allows PPGTT PDE allocation to come from the drm_mm allocator, the rest
irrevocably ties the PPGTT to a context, and one cannot exist without
the other. Future patcher in the later series' will make things fail a
lot harder if one exists without the other.
Even those these patches don't yet do the following, I should explain
the next steps or else I feel reviewers' comments to the above will all
be, "why?"
1. Create a new context/ppgtt for every file_priv.
2. Instruct execbuffer/reserve code to use that file_priv context
3. Switch PP_DIR_BASE on context switch.
This will likely be where I post part 2 of the prep patches, and I do
not expect to merge those before the rest of the series is complete. At
that point flink, dma_buf, and pin interfaces won't work. It should
however prove a useful way to test the HW pretty well. It also shows how
I intend to have a per file context/address space regardless of whether
or not userspace opts in.
4. Track objects across address spaces
This should enable flink and dma_buf to work. I suspect a lot of
bikeshedding will take place on this patch(es) so I want to make it
distinct from the HW testing.
5. Figure out what do about killing relocations.
6. PPGTT page tables allocated on demand
For the curious reader, I've implemented 1, 2, and 4 several times over the
past couple of weeks. I was using MI_UPDATE_GTT for step 3 originally, and that
was tested as well, but I haven't yet done the PP_DIR_BASE switch since
implementing the drm_mm for PDEs.
I haven't run performance numbers on this series specifically, but I did
run performance numbers on the slightly more invasive patches which come
after (through step 1 above)
x11perf -aa10text
before: 1925000/s
after: 1941667/s (clearly not a good test)
xonotic
before: 140.6242469 fps
after: 138.5189648 fps
Ben Widawsky (11):
drm/i915: Assert mutex_is_locked on context lookup
drm/i915: BUG_ON bad PPGTT offset
drm/i915: make PDE|PTE platform specific
drm/i915: Extract PDE writes
drm/i915: Use drm_mm for PPGTT PDEs
drm/i915: Use PDEs as the guard page
drm/i915: Update context_fini
drm/i915: Split context enabling from init
drm/i915: destroy i915_gem_init_global_gtt
drm/i915: Embed PPGTT into the context
drm/i915: No contexts without ppgtt
Chris Wilson (1):
drm: Optionally create mm blocks from top-to-bottom
drivers/gpu/drm/drm_mm.c | 94 +++++++++++---------
drivers/gpu/drm/i915/i915_dma.c | 2 +-
drivers/gpu/drm/i915/i915_drv.h | 15 ++--
drivers/gpu/drm/i915/i915_gem.c | 49 +++++++++--
drivers/gpu/drm/i915/i915_gem_context.c | 33 ++++---
drivers/gpu/drm/i915/i915_gem_gtt.c | 147 ++++++++++++++++----------------
include/drm/drm_mm.h | 78 +++++++++++------
7 files changed, 251 insertions(+), 167 deletions(-)
--
1.8.2.1
next reply other threads:[~2013-04-24 6:13 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 6:15 Ben Widawsky [this message]
2013-04-24 6:15 ` [PATCH 01/12] drm/i915: Assert mutex_is_locked on context lookup Ben Widawsky
2013-05-02 20:27 ` Jesse Barnes
2013-05-06 9:40 ` Daniel Vetter
2013-05-06 9:44 ` Daniel Vetter
2013-05-06 17:59 ` Ben Widawsky
2013-05-06 18:35 ` Daniel Vetter
2013-04-24 6:15 ` [PATCH 02/12] drm/i915: BUG_ON bad PPGTT offset Ben Widawsky
2013-05-02 20:28 ` Jesse Barnes
2013-05-06 9:48 ` Daniel Vetter
2013-05-06 18:03 ` Ben Widawsky
2013-05-06 18:37 ` Daniel Vetter
2013-05-08 16:48 ` Ben Widawsky
2013-05-08 17:55 ` Daniel Vetter
2013-04-24 6:15 ` [PATCH 03/12] drm/i915: make PDE|PTE platform specific Ben Widawsky
2013-05-02 21:26 ` Jesse Barnes
2013-05-02 22:49 ` Ben Widawsky
2013-05-02 22:55 ` Jesse Barnes
2013-05-06 9:47 ` Daniel Vetter
2013-05-08 16:49 ` Ben Widawsky
2013-05-08 17:52 ` Daniel Vetter
2013-04-24 6:15 ` [PATCH 04/12] drm/i915: Extract PDE writes Ben Widawsky
2013-05-02 21:27 ` Jesse Barnes
2013-05-06 9:50 ` Daniel Vetter
2013-04-24 6:15 ` [PATCH 05/12] drm: Optionally create mm blocks from top-to-bottom Ben Widawsky
2013-04-24 6:15 ` [PATCH 06/12] drm/i915: Use drm_mm for PPGTT PDEs Ben Widawsky
2013-05-02 21:42 ` Jesse Barnes
2013-04-24 6:15 ` [PATCH 07/12] drm/i915: Use PDEs as the guard page Ben Widawsky
2013-04-24 6:15 ` [PATCH 08/12] drm/i915: Update context_fini Ben Widawsky
2013-04-24 15:11 ` Mika Kuoppala
2013-04-25 4:11 ` Ben Widawsky
2013-04-25 5:17 ` Ben Widawsky
2013-04-25 15:01 ` Mika Kuoppala
2013-04-25 17:22 ` Ben Widawsky
2013-04-24 6:15 ` [PATCH 09/12] drm/i915: Split context enabling from init Ben Widawsky
2013-04-24 10:04 ` Chris Wilson
2013-04-24 16:39 ` Ben Widawsky
2013-04-24 6:15 ` [PATCH 10/12] drm/i915: destroy i915_gem_init_global_gtt Ben Widawsky
2013-04-24 6:15 ` [PATCH 11/12] drm/i915: Embed PPGTT into the context Ben Widawsky
2013-04-24 6:15 ` [PATCH 12/12] drm/i915: No contexts without ppgtt Ben Widawsky
2013-04-24 10:06 ` Chris Wilson
2013-04-24 16:39 ` Ben Widawsky
2013-04-24 9:53 ` [PATCH 00/12] [RFC] PPGTT prep patches part 1 Chris Wilson
2013-04-24 19:58 ` 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=1366784140-2670-1-git-send-email-ben@bwidawsk.net \
--to=ben@bwidawsk.net \
--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