All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gtt: Fix rounding for 36b
@ 2019-07-19 13:07 Chris Wilson
  2019-07-19 13:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Chris Wilson @ 2019-07-19 13:07 UTC (permalink / raw)
  To: intel-gfx

The top-level page directory for 36b is a single entry, not multiple
like 32b. Fix up the rounding on the calculation of the size of the top
level so that we populate the 4th level correctly for 36b.

Reported-by: Jose Souza <jose.souza@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 1eda701eace2 ("drm/i915/gtt: Recursive cleanup for gen8")
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Jose Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 220aba5a94d2..7dd08ff6c0eb 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -905,6 +905,12 @@ static inline unsigned int gen8_pt_count(u64 start, u64 end)
 		return end - start;
 }
 
+static inline unsigned int gen8_pd_top_count(const struct i915_address_space *vm)
+{
+	unsigned int shift = __gen8_pte_shift(vm->top);
+	return (vm->total + (1ull << shift) - 1) >> shift;
+}
+
 static void __gen8_ppgtt_cleanup(struct i915_address_space *vm,
 				 struct i915_page_directory *pd,
 				 int count, int lvl)
@@ -930,9 +936,7 @@ static void gen8_ppgtt_cleanup(struct i915_address_space *vm)
 	if (intel_vgpu_active(vm->i915))
 		gen8_ppgtt_notify_vgt(ppgtt, false);
 
-	__gen8_ppgtt_cleanup(vm, ppgtt->pd,
-			     vm->total >> __gen8_pte_shift(vm->top),
-			     vm->top);
+	__gen8_ppgtt_cleanup(vm, ppgtt->pd, gen8_pd_top_count(vm), vm->top);
 	free_scratch(vm);
 }
 
@@ -1391,7 +1395,7 @@ static int gen8_preallocate_top_level_pdp(struct i915_ppgtt *ppgtt)
 	unsigned int idx;
 
 	GEM_BUG_ON(vm->top != 2);
-	GEM_BUG_ON((vm->total >> __gen8_pte_shift(2)) != GEN8_3LVL_PDPES);
+	GEM_BUG_ON(gen8_pd_top_count(vm) != GEN8_3LVL_PDPES);
 
 	for (idx = 0; idx < GEN8_3LVL_PDPES; idx++) {
 		struct i915_page_directory *pde;
@@ -1428,7 +1432,7 @@ static void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt)
 static struct i915_page_directory *
 gen8_alloc_top_pd(struct i915_address_space *vm)
 {
-	const unsigned int count = vm->total >> __gen8_pte_shift(vm->top);
+	const unsigned int count = gen8_pd_top_count(vm);
 	struct i915_page_directory *pd;
 
 	GEM_BUG_ON(count > ARRAY_SIZE(pd->entry));
@@ -1514,8 +1518,7 @@ static struct i915_ppgtt *gen8_ppgtt_create(struct drm_i915_private *i915)
 
 err_free_pd:
 	__gen8_ppgtt_cleanup(&ppgtt->vm, ppgtt->pd,
-			     ppgtt->vm.total >> __gen8_pte_shift(ppgtt->vm.top),
-			     ppgtt->vm.top);
+			     gen8_pd_top_count(&ppgtt->vm), ppgtt->vm.top);
 err_free_scratch:
 	free_scratch(&ppgtt->vm);
 err_free:
-- 
2.22.0

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gtt: Fix rounding for 36b
  2019-07-19 13:07 [PATCH] drm/i915/gtt: Fix rounding for 36b Chris Wilson
@ 2019-07-19 13:57 ` Patchwork
  2019-07-19 14:32 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-07-19 13:57 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/gtt: Fix rounding for 36b
URL   : https://patchwork.freedesktop.org/series/63944/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
2262925a2845 drm/i915/gtt: Fix rounding for 36b
-:27: WARNING:LINE_SPACING: Missing a blank line after declarations
#27: FILE: drivers/gpu/drm/i915/i915_gem_gtt.c:911:
+	unsigned int shift = __gen8_pte_shift(vm->top);
+	return (vm->total + (1ull << shift) - 1) >> shift;

total: 0 errors, 1 warnings, 0 checks, 47 lines checked

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/gtt: Fix rounding for 36b
  2019-07-19 13:07 [PATCH] drm/i915/gtt: Fix rounding for 36b Chris Wilson
  2019-07-19 13:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2019-07-19 14:32 ` Patchwork
  2019-07-19 17:39 ` [PATCH] " Souza, Jose
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-07-19 14:32 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/gtt: Fix rounding for 36b
URL   : https://patchwork.freedesktop.org/series/63944/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6511 -> Patchwork_13702
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/

Known issues
------------

  Here are the changes found in Patchwork_13702 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_reloc@basic-gtt-read:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/fi-icl-u3/igt@gem_exec_reloc@basic-gtt-read.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/fi-icl-u3/igt@gem_exec_reloc@basic-gtt-read.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-skl-6700k2:      [PASS][3] -> [INCOMPLETE][4] ([fdo#104108])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/fi-skl-6700k2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/fi-skl-6700k2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  
#### Possible fixes ####

  * igt@gem_basic@bad-close:
    - fi-icl-u3:          [DMESG-WARN][5] ([fdo#107724]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/fi-icl-u3/igt@gem_basic@bad-close.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/fi-icl-u3/igt@gem_basic@bad-close.html

  * igt@gem_mmap_gtt@basic-copy:
    - fi-glk-dsi:         [INCOMPLETE][7] ([fdo#103359] / [k.org#198133]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/fi-glk-dsi/igt@gem_mmap_gtt@basic-copy.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/fi-glk-dsi/igt@gem_mmap_gtt@basic-copy.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7567u:       [FAIL][9] ([fdo#109485]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/fi-kbl-7567u/igt@kms_chamelium@hdmi-hpd-fast.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/fi-kbl-7567u/igt@kms_chamelium@hdmi-hpd-fast.html

  
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (52 -> 46)
------------------------------

  Additional (1): fi-cml-u2 
  Missing    (7): fi-kbl-soraka fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-icl-y fi-icl-dsi fi-bdw-samus 


Build changes
-------------

  * Linux: CI_DRM_6511 -> Patchwork_13702

  CI_DRM_6511: dbedd493118204a194fbc480f86866ddebbc4723 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5103: 45c31e294b9d7874a9a21860f8a89c64bc853df2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13702: 2262925a2845b580b24959deaac28c938b1dcdf2 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

2262925a2845 drm/i915/gtt: Fix rounding for 36b

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/gtt: Fix rounding for 36b
  2019-07-19 13:07 [PATCH] drm/i915/gtt: Fix rounding for 36b Chris Wilson
  2019-07-19 13:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2019-07-19 14:32 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-07-19 17:39 ` Souza, Jose
  2019-07-19 18:55 ` ✓ Fi.CI.IGT: success for " Patchwork
  2019-07-22 11:26 ` [PATCH] " Abdiel Janulgue
  4 siblings, 0 replies; 6+ messages in thread
From: Souza, Jose @ 2019-07-19 17:39 UTC (permalink / raw)
  To: intel-gfx, chris

On Fri, 2019-07-19 at 14:07 +0100, Chris Wilson wrote:
> The top-level page directory for 36b is a single entry, not multiple
> like 32b. Fix up the rounding on the calculation of the size of the
> top
> level so that we populate the 4th level correctly for 36b.
> 

It fixed the bug, thanks

Tested-by: José Roberto de Souza <jose.souza@intel.com>

> Reported-by: Jose Souza <jose.souza@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Fixes: 1eda701eace2 ("drm/i915/gtt: Recursive cleanup for gen8")
> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Cc: Jose Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c
> b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 220aba5a94d2..7dd08ff6c0eb 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -905,6 +905,12 @@ static inline unsigned int gen8_pt_count(u64
> start, u64 end)
>  		return end - start;
>  }
>  
> +static inline unsigned int gen8_pd_top_count(const struct
> i915_address_space *vm)
> +{
> +	unsigned int shift = __gen8_pte_shift(vm->top);
> +	return (vm->total + (1ull << shift) - 1) >> shift;
> +}
> +
>  static void __gen8_ppgtt_cleanup(struct i915_address_space *vm,
>  				 struct i915_page_directory *pd,
>  				 int count, int lvl)
> @@ -930,9 +936,7 @@ static void gen8_ppgtt_cleanup(struct
> i915_address_space *vm)
>  	if (intel_vgpu_active(vm->i915))
>  		gen8_ppgtt_notify_vgt(ppgtt, false);
>  
> -	__gen8_ppgtt_cleanup(vm, ppgtt->pd,
> -			     vm->total >> __gen8_pte_shift(vm->top),
> -			     vm->top);
> +	__gen8_ppgtt_cleanup(vm, ppgtt->pd, gen8_pd_top_count(vm), vm-
> >top);
>  	free_scratch(vm);
>  }
>  
> @@ -1391,7 +1395,7 @@ static int
> gen8_preallocate_top_level_pdp(struct i915_ppgtt *ppgtt)
>  	unsigned int idx;
>  
>  	GEM_BUG_ON(vm->top != 2);
> -	GEM_BUG_ON((vm->total >> __gen8_pte_shift(2)) !=
> GEN8_3LVL_PDPES);
> +	GEM_BUG_ON(gen8_pd_top_count(vm) != GEN8_3LVL_PDPES);
>  
>  	for (idx = 0; idx < GEN8_3LVL_PDPES; idx++) {
>  		struct i915_page_directory *pde;
> @@ -1428,7 +1432,7 @@ static void ppgtt_init(struct i915_ppgtt
> *ppgtt, struct intel_gt *gt)
>  static struct i915_page_directory *
>  gen8_alloc_top_pd(struct i915_address_space *vm)
>  {
> -	const unsigned int count = vm->total >> __gen8_pte_shift(vm-
> >top);
> +	const unsigned int count = gen8_pd_top_count(vm);
>  	struct i915_page_directory *pd;
>  
>  	GEM_BUG_ON(count > ARRAY_SIZE(pd->entry));
> @@ -1514,8 +1518,7 @@ static struct i915_ppgtt
> *gen8_ppgtt_create(struct drm_i915_private *i915)
>  
>  err_free_pd:
>  	__gen8_ppgtt_cleanup(&ppgtt->vm, ppgtt->pd,
> -			     ppgtt->vm.total >> __gen8_pte_shift(ppgtt-
> >vm.top),
> -			     ppgtt->vm.top);
> +			     gen8_pd_top_count(&ppgtt->vm), ppgtt-
> >vm.top);
>  err_free_scratch:
>  	free_scratch(&ppgtt->vm);
>  err_free:
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915/gtt: Fix rounding for 36b
  2019-07-19 13:07 [PATCH] drm/i915/gtt: Fix rounding for 36b Chris Wilson
                   ` (2 preceding siblings ...)
  2019-07-19 17:39 ` [PATCH] " Souza, Jose
@ 2019-07-19 18:55 ` Patchwork
  2019-07-22 11:26 ` [PATCH] " Abdiel Janulgue
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-07-19 18:55 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/gtt: Fix rounding for 36b
URL   : https://patchwork.freedesktop.org/series/63944/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6511_full -> Patchwork_13702_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_13702_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_shared@exec-shared-gtt-render:
    - shard-apl:          [PASS][1] -> [FAIL][2] ([fdo#110890])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-apl6/igt@gem_ctx_shared@exec-shared-gtt-render.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-apl2/igt@gem_ctx_shared@exec-shared-gtt-render.html

  * igt@gem_workarounds@suspend-resume-fd:
    - shard-skl:          [PASS][3] -> [INCOMPLETE][4] ([fdo#104108])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl1/igt@gem_workarounds@suspend-resume-fd.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl4/igt@gem_workarounds@suspend-resume-fd.html

  * igt@kms_cursor_crc@pipe-c-cursor-suspend:
    - shard-skl:          [PASS][5] -> [INCOMPLETE][6] ([fdo#110741])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl2/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl7/igt@kms_cursor_crc@pipe-c-cursor-suspend.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-apl:          [PASS][7] -> [DMESG-WARN][8] ([fdo#108566]) +5 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-apl1/igt@kms_flip@flip-vs-suspend-interruptible.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-apl7/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_flip@flip-vs-wf_vblank-interruptible:
    - shard-skl:          [PASS][9] -> [FAIL][10] ([fdo#100368])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl8/igt@kms_flip@flip-vs-wf_vblank-interruptible.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl7/igt@kms_flip@flip-vs-wf_vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
    - shard-iclb:         [PASS][11] -> [FAIL][12] ([fdo#103167]) +2 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
    - shard-skl:          [PASS][13] -> [FAIL][14] ([fdo#108145] / [fdo#110403])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl4/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl2/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
    - shard-skl:          [PASS][15] -> [FAIL][16] ([fdo#108145])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl4/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [PASS][17] -> [FAIL][18] ([fdo#103166])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-iclb5/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-iclb8/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [PASS][19] -> [SKIP][20] ([fdo#109441]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-iclb4/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_psr@suspend:
    - shard-skl:          [PASS][21] -> [INCOMPLETE][22] ([fdo#108972])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl5/igt@kms_psr@suspend.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl9/igt@kms_psr@suspend.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@rcs0-s3:
    - shard-apl:          [DMESG-WARN][23] ([fdo#108566]) -> [PASS][24] +2 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-apl6/igt@gem_ctx_isolation@rcs0-s3.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-apl8/igt@gem_ctx_isolation@rcs0-s3.html

  * igt@gem_exec_balancer@smoke:
    - shard-iclb:         [SKIP][25] ([fdo#110854]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-iclb3/igt@gem_exec_balancer@smoke.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-iclb4/igt@gem_exec_balancer@smoke.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-glk:          [DMESG-WARN][27] ([fdo#108686]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-glk2/igt@gem_tiled_swapping@non-threaded.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-glk5/igt@gem_tiled_swapping@non-threaded.html

  * igt@kms_color@pipe-c-ctm-blue-to-red:
    - shard-skl:          [FAIL][29] ([fdo#107201]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl9/igt@kms_color@pipe-c-ctm-blue-to-red.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl1/igt@kms_color@pipe-c-ctm-blue-to-red.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-skl:          [FAIL][31] ([fdo#105363]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl4/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl1/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-indfb-pgflip-blt:
    - shard-hsw:          [INCOMPLETE][33] ([fdo#103540]) -> [PASS][34] +1 similar issue
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-hsw6/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-indfb-pgflip-blt.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-hsw6/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-indfb-pgflip-blt.html

  * igt@kms_frontbuffer_tracking@fbc-badstride:
    - shard-iclb:         [FAIL][35] ([fdo#103167]) -> [PASS][36] +3 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-badstride.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-badstride.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [FAIL][37] ([fdo#108145] / [fdo#110403]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl9/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl1/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_psr@psr2_primary_render:
    - shard-iclb:         [SKIP][39] ([fdo#109441]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-iclb4/igt@kms_psr@psr2_primary_render.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-iclb2/igt@kms_psr@psr2_primary_render.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [FAIL][41] ([fdo#99912]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-kbl1/igt@kms_setmode@basic.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-kbl3/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
    - shard-skl:          [INCOMPLETE][43] ([fdo#104108]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6511/shard-skl6/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/shard-skl10/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html

  
  [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#107201]: https://bugs.freedesktop.org/show_bug.cgi?id=107201
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#108972]: https://bugs.freedesktop.org/show_bug.cgi?id=108972
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
  [fdo#110741]: https://bugs.freedesktop.org/show_bug.cgi?id=110741
  [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
  [fdo#110890]: https://bugs.freedesktop.org/show_bug.cgi?id=110890
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * Linux: CI_DRM_6511 -> Patchwork_13702

  CI_DRM_6511: dbedd493118204a194fbc480f86866ddebbc4723 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5103: 45c31e294b9d7874a9a21860f8a89c64bc853df2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13702: 2262925a2845b580b24959deaac28c938b1dcdf2 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13702/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/gtt: Fix rounding for 36b
  2019-07-19 13:07 [PATCH] drm/i915/gtt: Fix rounding for 36b Chris Wilson
                   ` (3 preceding siblings ...)
  2019-07-19 18:55 ` ✓ Fi.CI.IGT: success for " Patchwork
@ 2019-07-22 11:26 ` Abdiel Janulgue
  4 siblings, 0 replies; 6+ messages in thread
From: Abdiel Janulgue @ 2019-07-22 11:26 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx



On 19/07/2019 16.07, Chris Wilson wrote:
> The top-level page directory for 36b is a single entry, not multiple
> like 32b. Fix up the rounding on the calculation of the size of the top
> level so that we populate the 4th level correctly for 36b.
> 

Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>

> Reported-by: Jose Souza <jose.souza@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Fixes: 1eda701eace2 ("drm/i915/gtt: Recursive cleanup for gen8")
> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Cc: Jose Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 220aba5a94d2..7dd08ff6c0eb 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -905,6 +905,12 @@ static inline unsigned int gen8_pt_count(u64 start, u64 end)
>  		return end - start;
>  }
>  
> +static inline unsigned int gen8_pd_top_count(const struct i915_address_space *vm)
> +{
> +	unsigned int shift = __gen8_pte_shift(vm->top);
> +	return (vm->total + (1ull << shift) - 1) >> shift;
> +}
> +
>  static void __gen8_ppgtt_cleanup(struct i915_address_space *vm,
>  				 struct i915_page_directory *pd,
>  				 int count, int lvl)
> @@ -930,9 +936,7 @@ static void gen8_ppgtt_cleanup(struct i915_address_space *vm)
>  	if (intel_vgpu_active(vm->i915))
>  		gen8_ppgtt_notify_vgt(ppgtt, false);
>  
> -	__gen8_ppgtt_cleanup(vm, ppgtt->pd,
> -			     vm->total >> __gen8_pte_shift(vm->top),
> -			     vm->top);
> +	__gen8_ppgtt_cleanup(vm, ppgtt->pd, gen8_pd_top_count(vm), vm->top);
>  	free_scratch(vm);
>  }
>  
> @@ -1391,7 +1395,7 @@ static int gen8_preallocate_top_level_pdp(struct i915_ppgtt *ppgtt)
>  	unsigned int idx;
>  
>  	GEM_BUG_ON(vm->top != 2);
> -	GEM_BUG_ON((vm->total >> __gen8_pte_shift(2)) != GEN8_3LVL_PDPES);
> +	GEM_BUG_ON(gen8_pd_top_count(vm) != GEN8_3LVL_PDPES);
>  
>  	for (idx = 0; idx < GEN8_3LVL_PDPES; idx++) {
>  		struct i915_page_directory *pde;
> @@ -1428,7 +1432,7 @@ static void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt)
>  static struct i915_page_directory *
>  gen8_alloc_top_pd(struct i915_address_space *vm)
>  {
> -	const unsigned int count = vm->total >> __gen8_pte_shift(vm->top);
> +	const unsigned int count = gen8_pd_top_count(vm);
>  	struct i915_page_directory *pd;
>  
>  	GEM_BUG_ON(count > ARRAY_SIZE(pd->entry));
> @@ -1514,8 +1518,7 @@ static struct i915_ppgtt *gen8_ppgtt_create(struct drm_i915_private *i915)
>  
>  err_free_pd:
>  	__gen8_ppgtt_cleanup(&ppgtt->vm, ppgtt->pd,
> -			     ppgtt->vm.total >> __gen8_pte_shift(ppgtt->vm.top),
> -			     ppgtt->vm.top);
> +			     gen8_pd_top_count(&ppgtt->vm), ppgtt->vm.top);
>  err_free_scratch:
>  	free_scratch(&ppgtt->vm);
>  err_free:
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-22 11:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 13:07 [PATCH] drm/i915/gtt: Fix rounding for 36b Chris Wilson
2019-07-19 13:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-07-19 14:32 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-19 17:39 ` [PATCH] " Souza, Jose
2019-07-19 18:55 ` ✓ Fi.CI.IGT: success for " Patchwork
2019-07-22 11:26 ` [PATCH] " Abdiel Janulgue

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.