public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: David Weinehall <david.weinehall@intel.com>
Subject: Re: [PATCH v2 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems
Date: Fri, 13 May 2016 10:46:59 +0300	[thread overview]
Message-ID: <1463125619.5008.7.camel@linux.intel.com> (raw)
In-Reply-To: <1463063296-7722-4-git-send-email-chris@chris-wilson.co.uk>

On to, 2016-05-12 at 15:28 +0100, Chris Wilson wrote:
> Under full-ppgtt, access to the global GTT is carefully regulated
> through hardware functions (i.e. userspace cannot read and write to
> arbitrary locations in the GGTT via the GPU). With this restriction in
> place, we can forgo clearing stale entries from the GGTT as they will
> not be accessed.
> 
> For aliasing-ppgtt, we could almost do the same except that we do allow
> userspace access to the global-GTT via execbuf in order to workraound
> some quirks of certain instructions. (This execbuf path is filtered out
> with EINVAL on full-ppgtt.)
> 
> The most dramatic effect this will have will be during resume, as with
> full-ppgtt the GGTT is only used sparingly.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: David Weinehall <david.weinehall@intel.com>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 20 +++++++++++++++-----
>  1 file changed, 15 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 319f3b459b3e..7eab619a3eb2 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -2477,6 +2477,13 @@ static void gen6_ggtt_insert_entries(struct i915_address_space *vm,
>  	assert_rpm_atomic_end(dev_priv, rpm_atomic_seq);
>  }
>  
> +static void nop_clear_range(struct i915_address_space *vm,
> +			    uint64_t start,
> +			    uint64_t length,
> +			    bool use_scratch)
> +{
> +}
> +
>  static void gen8_ggtt_clear_range(struct i915_address_space *vm,
>  				  uint64_t start,
>  				  uint64_t length,
> @@ -3072,14 +3079,17 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt)
>  
>  	ret = ggtt_probe_common(dev, ggtt->size);
>  
> -	ggtt->base.clear_range = gen8_ggtt_clear_range;
> -	if (IS_CHERRYVIEW(dev_priv))
> -		ggtt->base.insert_entries = gen8_ggtt_insert_entries__BKL;
> -	else
> -		ggtt->base.insert_entries = gen8_ggtt_insert_entries;
>  	ggtt->base.bind_vma = ggtt_bind_vma;
>  	ggtt->base.unbind_vma = ggtt_unbind_vma;
>  
> +	ggtt->base.clear_range = nop_clear_range;
> +	if (!USES_FULL_PPGTT(dev_priv))
> +		ggtt->base.clear_range = gen8_ggtt_clear_range;
> +
> +	ggtt->base.insert_entries = gen8_ggtt_insert_entries;
> +	if (IS_CHERRYVIEW(dev_priv))
> +		ggtt->base.insert_entries = gen8_ggtt_insert_entries__BKL;
> +
>  	return ret;
>  }
>  
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-05-13  7:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 11:41 Speed up resume by focused clflushing Chris Wilson
2016-05-12 11:41 ` [PATCH 1/4] drm/i915: Add distinct stubs for PM hibernation phases Chris Wilson
2016-05-12 11:52   ` Imre Deak
2016-05-12 12:01     ` Chris Wilson
2016-05-12 11:41 ` [PATCH 2/4] drm/i915: Update domain tracking for GEM objects on hibernation Chris Wilson
2016-05-12 11:41 ` [PATCH 3/4] drm/i915: Lazily migrate the objects after hibernation Chris Wilson
2016-05-12 11:41 ` [PATCH 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems Chris Wilson
2016-05-12 12:27 ` ✓ Ro.CI.BAT: success for series starting with [1/4] drm/i915: Add distinct stubs for PM hibernation phases Patchwork
2016-05-12 12:37   ` Chris Wilson
2016-05-12 14:28 ` [PATCH v2 1/4] " Chris Wilson
2016-05-12 14:28   ` [PATCH v2 2/4] drm/i915: Update domain tracking for GEM objects on hibernation Chris Wilson
2016-05-13  7:40     ` Joonas Lahtinen
2016-05-12 14:28   ` [PATCH v2 3/4] drm/i915: Lazily migrate the objects after hibernation Chris Wilson
2016-05-13  7:46     ` Joonas Lahtinen
2016-05-13 13:17     ` David Weinehall
2016-05-12 14:28   ` [PATCH v2 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems Chris Wilson
2016-05-13  7:46     ` Joonas Lahtinen [this message]
2016-05-13 13:17     ` David Weinehall
2016-05-13  7:39   ` [PATCH v2 1/4] drm/i915: Add distinct stubs for PM hibernation phases Joonas Lahtinen
2016-05-13 14:30 ` [CI " Chris Wilson
2016-05-13 14:30   ` [CI 2/4] drm/i915: Update domain tracking for GEM objects on hibernation Chris Wilson
2016-05-13 14:30   ` [CI 3/4] drm/i915: Lazily migrate the objects after hibernation Chris Wilson
2016-05-13 14:30   ` [CI 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems Chris Wilson
2016-05-13 16:10 ` ✗ Ro.CI.BAT: failure for series starting with [1/4] drm/i915: Add distinct stubs for PM hibernation phases (rev4) Patchwork
2016-05-13 17:52 ` [CI 1/4] drm/i915: Add distinct stubs for PM hibernation phases Chris Wilson
2016-05-13 17:52   ` [CI 2/4] drm/i915: Update domain tracking for GEM objects on hibernation Chris Wilson
2016-05-13 17:52   ` [CI 3/4] drm/i915: Lazily migrate the objects after hibernation Chris Wilson
2016-05-13 17:52   ` [CI 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems Chris Wilson
2016-05-13 19:30 ` ✗ Ro.CI.BAT: failure for series starting with [1/4] drm/i915: Add distinct stubs for PM hibernation phases (rev7) Patchwork

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=1463125619.5008.7.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=david.weinehall@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