diff mbox

drm/i915: use vma->size for appgtt allocate_va_range

Message ID 20170516085514.5853-1-matthew.auld@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matthew Auld May 16, 2017, 8:55 a.m. UTC
For the aliasing ppgtt we clear the va range up to vma->size, but seem
to allocate up to vma->node.size, which is a little inconsistent given
that vma->node.size >= vma->size. Not that is really matters all that
much since we preallocate anyway, but for consistency just use
vma->size.

Fixes: ff685975d97f ("drm/i915: Move allocate_va_range to GTT")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson May 16, 2017, 9:09 a.m. UTC | #1
On Tue, May 16, 2017 at 09:55:14AM +0100, Matthew Auld wrote:
> For the aliasing ppgtt we clear the va range up to vma->size, but seem
> to allocate up to vma->node.size, which is a little inconsistent given
> that vma->node.size >= vma->size. Not that is really matters all that
> much since we preallocate anyway, but for consistency just use
> vma->size.

We clear vma->size, so we have better allocate vma->size as well.
 
> Fixes: ff685975d97f ("drm/i915: Move allocate_va_range to GTT")
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Chris Wilson May 16, 2017, 10:28 a.m. UTC | #2
On Tue, May 16, 2017 at 10:19:42AM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: use vma->size for appgtt allocate_va_range
> URL   : https://patchwork.freedesktop.org/series/24485/
> State : success
> 
> == Summary ==
> 
> Series 24485v1 drm/i915: use vma->size for appgtt allocate_va_range
> https://patchwork.freedesktop.org/api/1.0/series/24485/revisions/1/mbox/
> 
> Test kms_cursor_legacy:
>         Subgroup basic-busy-flip-before-cursor-atomic:
>                 pass       -> FAIL       (fi-snb-2600) fdo#100215
> 
> fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215

Applied, thanks for yet another bugfix.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index bc3c63e92c16..a9d78ebcabfe 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2313,7 +2313,7 @@  static int aliasing_gtt_bind_vma(struct i915_vma *vma,
 		    appgtt->base.allocate_va_range) {
 			ret = appgtt->base.allocate_va_range(&appgtt->base,
 							     vma->node.start,
-							     vma->node.size);
+							     vma->size);
 			if (ret)
 				goto err_pages;
 		}