From: Imre Deak <imre.deak@intel.com>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 01/11] drm/i915: Move gtt and ppgtt under address space umbrella
Date: Thu, 11 Jul 2013 14:14:06 +0300 [thread overview]
Message-ID: <1373541246.12949.4.camel@intelbox> (raw)
In-Reply-To: <1373350122-5118-2-git-send-email-ben@bwidawsk.net>
[-- Attachment #1.1: Type: text/plain, Size: 2748 bytes --]
On Mon, 2013-07-08 at 23:08 -0700, Ben Widawsky wrote:
> The GTT and PPGTT can be thought of more generally as GPU address
> spaces. Many of their actions (insert entries), state (LRU lists) and
> many of their characteristics (size), can be shared. Do that.
>
> The change itself doesn't actually impact most of the VMA/VM rework
> coming up, it just fits in with the grand scheme. GGTT will usually be a
> special case where we either know an object must be in the GGTT (dislay
> engine, workarounds, etc.).
>
> v2: Drop usage of i915_gtt_vm (Daniel)
> Make cleanup also part of the parent class (Ben)
> Modified commit msg
> Rebased
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 4 +-
> drivers/gpu/drm/i915/i915_dma.c | 4 +-
> drivers/gpu/drm/i915/i915_drv.h | 57 ++++++-------
> drivers/gpu/drm/i915/i915_gem.c | 4 +-
> drivers/gpu/drm/i915/i915_gem_gtt.c | 162 ++++++++++++++++++++----------------
> 5 files changed, 121 insertions(+), 110 deletions(-)
>
>[...]
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 242d0f9..693115a 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -102,7 +102,7 @@ static gen6_gtt_pte_t hsw_pte_encode(dma_addr_t addr,
>
> static void gen6_write_pdes(struct i915_hw_ppgtt *ppgtt)
> {
> - struct drm_i915_private *dev_priv = ppgtt->dev->dev_private;
> + struct drm_i915_private *dev_priv = ppgtt->base.dev->dev_private;
> gen6_gtt_pte_t __iomem *pd_addr;
> uint32_t pd_entry;
> int i;
> @@ -181,18 +181,18 @@ static int gen6_ppgtt_enable(struct drm_device *dev)
> }
>
> /* PPGTT support for Sandybdrige/Gen6 and later */
> -static void gen6_ppgtt_clear_range(struct i915_hw_ppgtt *ppgtt,
> +static void gen6_ppgtt_clear_range(struct i915_address_space *vm,
> unsigned first_entry,
> unsigned num_entries)
> {
> - struct drm_i915_private *dev_priv = ppgtt->dev->dev_private;
> + struct i915_hw_ppgtt *ppgtt =
> + container_of(vm, struct i915_hw_ppgtt, base);
> gen6_gtt_pte_t *pt_vaddr, scratch_pte;
> unsigned act_pt = first_entry / I915_PPGTT_PT_ENTRIES;
> unsigned first_pte = first_entry % I915_PPGTT_PT_ENTRIES;
> unsigned last_pte, i;
>
> - scratch_pte = ppgtt->pte_encode(dev_priv->gtt.scratch.addr,
> - I915_CACHE_LLC);
> + scratch_pte = vm->pte_encode(vm->scratch.addr, I915_CACHE_LLC);
I only see ggtt's scratch page being initialized, but can't find the
corresponding init/teardown for ppgtt. Btw, why do we need separate
global/per-process scratch pages? (would be nice to add it to the commit
message)
--Imre
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-07-11 11:14 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 6:08 [PATCH 00/11] ppgtt: just the VMA Ben Widawsky
2013-07-09 6:08 ` [PATCH 01/11] drm/i915: Move gtt and ppgtt under address space umbrella Ben Widawsky
2013-07-09 6:37 ` Daniel Vetter
2013-07-10 16:36 ` Ben Widawsky
2013-07-10 17:03 ` Daniel Vetter
2013-07-11 11:14 ` Imre Deak [this message]
2013-07-11 23:57 ` Ben Widawsky
2013-07-12 15:59 ` Ben Widawsky
2013-07-09 6:08 ` [PATCH 02/11] drm/i915: Put the mm in the parent address space Ben Widawsky
2013-07-09 6:08 ` [PATCH 03/11] drm/i915: Create a global list of vms Ben Widawsky
2013-07-09 6:37 ` Daniel Vetter
2013-07-09 6:08 ` [PATCH 04/11] drm/i915: Move active/inactive lists to new mm Ben Widawsky
2013-07-09 6:08 ` [PATCH 05/11] drm/i915: Create VMAs Ben Widawsky
2013-07-11 11:20 ` Imre Deak
2013-07-12 2:23 ` Ben Widawsky
2013-07-09 6:08 ` [PATCH 06/11] drm/i915: plumb VM into object operations Ben Widawsky
2013-07-09 7:15 ` Daniel Vetter
2013-07-10 16:37 ` Ben Widawsky
2013-07-10 17:05 ` Daniel Vetter
2013-07-10 22:23 ` Ben Widawsky
2013-07-11 6:01 ` Daniel Vetter
2013-07-12 2:23 ` Ben Widawsky
2013-07-12 6:26 ` Daniel Vetter
2013-07-12 15:46 ` Ben Widawsky
2013-07-12 16:46 ` Daniel Vetter
2013-07-16 3:57 ` Ben Widawsky
2013-07-16 5:06 ` Daniel Vetter
2013-07-09 6:08 ` [PATCH 07/11] drm/i915: Fix up map and fenceable for VMA Ben Widawsky
2013-07-09 7:16 ` Daniel Vetter
2013-07-10 16:39 ` Ben Widawsky
2013-07-10 17:08 ` Daniel Vetter
2013-07-09 6:08 ` [PATCH 08/11] drm/i915: mm_list is per VMA Ben Widawsky
2013-07-09 7:18 ` Daniel Vetter
2013-07-10 16:39 ` Ben Widawsky
2013-07-09 6:08 ` [PATCH 09/11] drm/i915: Update error capture for VMs Ben Widawsky
2013-07-09 6:08 ` [PATCH 10/11] drm/i915: create an object_is_active() Ben Widawsky
2013-07-09 6:08 ` [PATCH 11/11] drm/i915: Move active to vma Ben Widawsky
2013-07-09 7:45 ` Daniel Vetter
2013-07-10 16:39 ` Ben Widawsky
2013-07-10 17:13 ` Daniel Vetter
2013-07-09 7:50 ` [PATCH 00/11] ppgtt: just the VMA Daniel Vetter
2013-07-13 4:45 ` [PATCH 12/15] [RFC] create vm->bind,unbind Ben Widawsky
2013-07-13 4:45 ` [PATCH 1/3] drm/i915: Add bind/unbind object functions to VM Ben Widawsky
2013-07-13 9:33 ` Daniel Vetter
2013-07-16 3:35 ` Ben Widawsky
2013-07-16 4:00 ` Ben Widawsky
2013-07-16 5:10 ` Daniel Vetter
2013-07-16 5:13 ` Daniel Vetter
2013-07-13 4:45 ` [PATCH 2/3] drm/i915: Use the new vm [un]bind functions Ben Widawsky
2013-07-13 4:45 ` [PATCH 3/3] drm/i915: eliminate vm->insert_entries() Ben Widawsky
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=1373541246.12949.4.camel@intelbox \
--to=imre.deak@intel.com \
--cc=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