On Fri, 19 Jul 2019 15:15:24 +0200, Chris Wilson <ch...@chris-wilson.co.uk> wrote:

Since the underlying __gen8_ppgtt_clear takes the shifted address, we
must remember to provide it with the preshifted original start address.

Reported-by: Tvrtko Ursulin <tvrtko.ursu...@intel.com>
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursu...@intel.com>
Cc: Abdiel Janulgue <abdiel.janul...@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 220aba5a94d2..031bcd22f5e6 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1103,7 +1103,7 @@ static int __gen8_ppgtt_alloc(struct i915_address_space * const vm,
 static int gen8_ppgtt_alloc(struct i915_address_space *vm,
                            u64 start, u64 length)
 {
-       u64 from = start;
+       u64 from;
        int err;
        GEM_BUG_ON(!IS_ALIGNED(start, BIT_ULL(GEN8_PTE_SHIFT)));
@@ -1112,6 +1112,7 @@ static int gen8_ppgtt_alloc(struct i915_address_space *vm,
        start >>= GEN8_PTE_SHIFT;
        length >>= GEN8_PTE_SHIFT;
        GEM_BUG_ON(length == 0);
+       from = start;
        err = __gen8_ppgtt_alloc(vm, i915_vm_to_ppgtt(vm)->pd,
                                 &start, start + length, vm->top);

Tested-by: Michal Wajdeczko <michal.wajdec...@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdec...@intel.com>

there is still one issue with __gen8_ppgtt_clear called
from here but this will be covered in upcoming patch

Michal
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to