Created
April 22, 2015 15:05
-
-
Save mthierry/43674334d482a5c759d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 6a477f4ddc53282aa752c4ccca44bbfea1eb0751 Mon Sep 17 00:00:00 2001 | |
| From: Michel Thierry <[email protected]> | |
| Date: Wed, 22 Apr 2015 15:56:12 +0100 | |
| Subject: [PATCH] drm/i915: Do not re-allocate vmas in aliasing ppgtt | |
| Aliasing ppgtt is fully allocated right after creation, thus shouldn't | |
| need to call allocate_va_range in i915_vma_bind. | |
| This duplication started after commit 5c5f645773b6d147bf68c350674dc3ef4f8de83d | |
| ("drm/i915: drm/i915: Unify aliasing ppgtt handling"), as aliasing ppgtt | |
| now also uses allocate_va_range. | |
| Also, remove unnecessary mark_tlbs_dirty logic in aliasing ppgtt, this | |
| is only needed in full ppgtt. | |
| Signed-off-by: Michel Thierry <[email protected]> | |
| --- | |
| drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 --- | |
| drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++-- | |
| 2 files changed, 4 insertions(+), 5 deletions(-) | |
| diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |
| index 564425f..1cf3468 100644 | |
| --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |
| +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |
| @@ -1251,9 +1251,6 @@ i915_gem_ringbuffer_submission(struct drm_device *dev, struct drm_file *file, | |
| if (ctx->ppgtt) | |
| WARN(ctx->ppgtt->pd_dirty_rings & (1<<ring->id), | |
| "%s didn't clear reload\n", ring->name); | |
| - else if (dev_priv->mm.aliasing_ppgtt) | |
| - WARN(dev_priv->mm.aliasing_ppgtt->pd_dirty_rings & | |
| - (1<<ring->id), "%s didn't clear reload\n", ring->name); | |
| instp_mode = args->flags & I915_EXEC_CONSTANTS_MASK; | |
| instp_mask = I915_EXEC_CONSTANTS_MASK; | |
| diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c | |
| index 7b13273..9a33b08 100644 | |
| --- a/drivers/gpu/drm/i915/i915_gem_gtt.c | |
| +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c | |
| @@ -1751,7 +1751,9 @@ static int gen6_alloc_va_range(struct i915_address_space *vm, | |
| * table. Also require for WC mapped PTEs */ | |
| readl(dev_priv->gtt.gsm); | |
| - mark_tlbs_dirty(ppgtt); | |
| + if (USES_FULL_PPGTT(dev)) | |
| + mark_tlbs_dirty(ppgtt); | |
| + | |
| return 0; | |
| unwind_out: | |
| @@ -3242,7 +3244,7 @@ int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level, | |
| { | |
| int ret; | |
| - if (vma->vm->allocate_va_range) { | |
| + if (vma->vm->allocate_va_range && USES_FULL_PPGTT(dev)) { | |
| trace_i915_va_alloc(vma->vm, vma->node.start, | |
| vma->node.size, | |
| VM_TO_TRACE_NAME(vma->vm)); | |
| -- | |
| 2.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment