Re: [Intel-gfx] [PATCH] drm/i915: Fix the kernel panic when using aliasing ppgtt

2017-07-07 Thread Dong, Chuanxiao
> -Original Message-
> From: Chris Wilson [mailto:ch...@chris-wilson.co.uk]
> Sent: Friday, July 7, 2017 5:38 PM
> To: Dong, Chuanxiao ; intel-
> g...@lists.freedesktop.org
> Cc: intel-gvt-...@lists.freedesktop.org; Dong, Chuanxiao
> ; Auld, Matthew ;
> Zhenyu Wang 
> Subject: Re: [PATCH] drm/i915: Fix the kernel panic when using aliasing ppgtt
> 
> Quoting Chuanxiao Dong (2017-07-07 07:00:09)
> > The ppgtt should be get directly from i915_address_space *vm instead
> > of
> > vma->vm as in alias ppgtt case the vma->vm is not same with vm.
> 
> And for consistency, also
> 
> @@ -2242,7 +2242,7 @@ static void
> bxt_vtd_ggtt_insert_entries__BKL(struct i915_address_space *vm,
>  enum i915_cache_level level,
>  u32 unused)  {
> -   struct insert_entries arg = { vma->vm, vma, level };
> +   struct insert_entries arg = { vm, vma, level };
> 
> stop_machine(bxt_vtd_ggtt_insert_entries__cb, &arg, NULL);  }

Good catch! Will send out v2 to include this.

Thanks
Chuanxiao
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Fix the kernel panic when using aliasing ppgtt

2017-07-07 Thread Chris Wilson
Quoting Chuanxiao Dong (2017-07-07 07:00:09)
> The ppgtt should be get directly from i915_address_space *vm instead of
> vma->vm as in alias ppgtt case the vma->vm is not same with vm.

And for consistency, also

@@ -2242,7 +2242,7 @@ static void bxt_vtd_ggtt_insert_entries__BKL(struct 
i915_address_space *vm,
 enum i915_cache_level level,
 u32 unused)
 {
-   struct insert_entries arg = { vma->vm, vma, level };
+   struct insert_entries arg = { vm, vma, level };
 
stop_machine(bxt_vtd_ggtt_insert_entries__cb, &arg, NULL);
 }
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Fix the kernel panic when using aliasing ppgtt

2017-07-07 Thread Matthew Auld
On 7 July 2017 at 07:00, Chuanxiao Dong  wrote:
> The ppgtt should be get directly from i915_address_space *vm instead of
> vma->vm as in alias ppgtt case the vma->vm is not same with vm.
>
> Fixes: 4a234c5fae16 ("drm/i915: pass the vma to insert_entries")
> Bugzilla:https://bugs.freedesktop.org/show_bug.cgi?id=101713
> Signed-off-by: Chuanxiao Dong 
> Cc: Matthew Auld 
> Cc: Chris Wilson 
> Cc: Zhenyu Wang 
Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Fix the kernel panic when using aliasing ppgtt

2017-07-06 Thread Chuanxiao Dong
The ppgtt should be get directly from i915_address_space *vm instead of
vma->vm as in alias ppgtt case the vma->vm is not same with vm.

Fixes: 4a234c5fae16 ("drm/i915: pass the vma to insert_entries")
Bugzilla:https://bugs.freedesktop.org/show_bug.cgi?id=101713
Signed-off-by: Chuanxiao Dong 
Cc: Matthew Auld 
Cc: Chris Wilson 
Cc: Zhenyu Wang 
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c 
b/drivers/gpu/drm/i915/i915_gem_gtt.c
index de67084..867dcdc 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -910,7 +910,7 @@ static void gen8_ppgtt_insert_3lvl(struct 
i915_address_space *vm,
   enum i915_cache_level cache_level,
   u32 unused)
 {
-   struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vma->vm);
+   struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
struct sgt_dma iter = {
.sg = vma->pages->sgl,
.dma = sg_dma_address(iter.sg),
-- 
2.7.4

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