All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915: Reduce context alignment
Date: Fri, 24 Feb 2017 12:18:22 +0200	[thread overview]
Message-ID: <87d1e7dh8x.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20170223155757.10316-3-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> No hardware was ever shipped that needed more than 4096 byte alignment
> and future hardware will not use this legacy path. So reduce the
> alignment to make it easier and quicker to launch workloads.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>


> ---
>  drivers/gpu/drm/i915/i915_gem_context.c | 17 -----------------
>  drivers/gpu/drm/i915/i915_gem_context.h |  2 --
>  drivers/gpu/drm/i915/intel_ringbuffer.c |  3 ++-
>  3 files changed, 2 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index 521e6f4705b1..baceca14f5e0 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -92,21 +92,6 @@
>  
>  #define ALL_L3_SLICES(dev) (1 << NUM_L3_SLICES(dev)) - 1
>  
> -/* This is a HW constraint. The value below is the largest known requirement
> - * I've seen in a spec to date, and that was a workaround for a non-shipping
> - * part. It should be safe to decrease this, but it's more future proof as is.
> - */
> -#define GEN6_CONTEXT_ALIGN (64<<10)
> -#define GEN7_CONTEXT_ALIGN I915_GTT_MIN_ALIGNMENT
> -
> -static size_t get_context_alignment(struct drm_i915_private *dev_priv)
> -{
> -	if (IS_GEN6(dev_priv))
> -		return GEN6_CONTEXT_ALIGN;
> -
> -	return GEN7_CONTEXT_ALIGN;
> -}
> -
>  static int get_context_size(struct drm_i915_private *dev_priv)
>  {
>  	int ret;
> @@ -281,8 +266,6 @@ __create_hw_context(struct drm_i915_private *dev_priv,
>  	list_add_tail(&ctx->link, &dev_priv->context_list);
>  	ctx->i915 = dev_priv;
>  
> -	ctx->ggtt_alignment = get_context_alignment(dev_priv);
> -
>  	if (dev_priv->hw_context_size) {
>  		struct drm_i915_gem_object *obj;
>  		struct i915_vma *vma;
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.h b/drivers/gpu/drm/i915/i915_gem_context.h
> index 0ac750b90f3d..81268c9770a6 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.h
> +++ b/drivers/gpu/drm/i915/i915_gem_context.h
> @@ -140,8 +140,6 @@ struct i915_gem_context {
>  	 */
>  	int priority;
>  
> -	/** ggtt_alignment: alignment restriction for context objects */
> -	u32 ggtt_alignment;
>  	/** ggtt_offset_bias: placement restriction for context objects */
>  	u32 ggtt_offset_bias;
>  
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index f62afffef682..4a864f8c9387 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1431,7 +1431,8 @@ static int context_pin(struct i915_gem_context *ctx)
>  			return ret;
>  	}
>  
> -	return i915_vma_pin(vma, 0, ctx->ggtt_alignment, PIN_GLOBAL | PIN_HIGH);
> +	return i915_vma_pin(vma, 0, I915_GTT_MIN_ALIGNMENT,
> +			    PIN_GLOBAL | PIN_HIGH);
>  }
>  
>  static int intel_ring_context_pin(struct intel_engine_cs *engine,
> -- 
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-02-24 10:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 15:57 [PATCH 1/5] drm/i915: Remove redundant TLB invalidate on switching contexts Chris Wilson
2017-02-23 15:57 ` [PATCH 2/5] drm/i915: Remove redundant TLB invalidate on switching ppgtt Chris Wilson
2017-02-24  9:47   ` Mika Kuoppala
2017-02-24  9:54     ` Chris Wilson
2017-02-23 15:57 ` [PATCH 3/5] drm/i915: Reduce context alignment Chris Wilson
2017-02-24 10:18   ` Mika Kuoppala [this message]
2017-02-23 15:57 ` [PATCH 4/5] drm/i915: Suppress context restore w/a when using MI_RESTORE_INHIBIT Chris Wilson
2017-02-24 10:45   ` Mika Kuoppala
2017-02-24 10:58     ` Chris Wilson
2017-02-27 23:50     ` Chris Wilson
2017-02-23 15:57 ` [PATCH 5/5] drm/i915: Suppress switch_mm emission between the same aliasing_ppgtt Chris Wilson
2017-02-23 17:52 ` ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915: Remove redundant TLB invalidate on switching contexts Patchwork
2017-02-24  9:42 ` [PATCH 1/5] " Mika Kuoppala

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=87d1e7dh8x.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.