diff mbox series

drm/i915: individualize fences before adding

Message ID 20220513113752.21265-1-nirmoy.das@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: individualize fences before adding | expand

Commit Message

Nirmoy Das May 13, 2022, 11:37 a.m. UTC
_i915_vma_move_to_active() can receive > 1 fence for
multiple batch buffer submission so make sure to
individualize fences before adding to dma_resv obj

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5614
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/i915_vma.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

Comments

Hellstrom, Thomas May 16, 2022, 9:38 a.m. UTC | #1
Hi Nirmoy.


On Fri, 2022-05-13 at 13:37 +0200, Nirmoy Das wrote:
> _i915_vma_move_to_active() can receive > 1 fence for
> multiple batch buffer submission so make sure to
> individualize fences before adding to dma_resv obj
> 
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5614
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>

LGTM. 
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_vma.c | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vma.c
> b/drivers/gpu/drm/i915/i915_vma.c
> index 4f6db539571a..f987fc1264c0 100644
> --- a/drivers/gpu/drm/i915/i915_vma.c
> +++ b/drivers/gpu/drm/i915/i915_vma.c
> @@ -23,6 +23,7 @@
>   */
>  
>  #include <linux/sched/mm.h>
> +#include <linux/dma-fence-array.h>
>  #include <drm/drm_gem.h>
>  
>  #include "display/intel_frontbuffer.h"
> @@ -1840,8 +1841,12 @@ int _i915_vma_move_to_active(struct i915_vma
> *vma,
>                 }
>  
>                 if (fence) {
> -                       dma_resv_add_fence(vma->obj->base.resv,
> fence,
> -                                          DMA_RESV_USAGE_WRITE);
> +                       int idx;
> +                       struct dma_fence *curr;
> +
> +                       dma_fence_array_for_each(curr, idx, fence)
> +                               dma_resv_add_fence(vma->obj-
> >base.resv, curr,
> +                                                 
> DMA_RESV_USAGE_WRITE);
>                         obj->write_domain = I915_GEM_DOMAIN_RENDER;
>                         obj->read_domains = 0;
>                 }
> @@ -1853,8 +1858,12 @@ int _i915_vma_move_to_active(struct i915_vma
> *vma,
>                 }
>  
>                 if (fence) {
> -                       dma_resv_add_fence(vma->obj->base.resv,
> fence,
> -                                          DMA_RESV_USAGE_READ);
> +                       int idx;
> +                       struct dma_fence *curr;
> +
> +                       dma_fence_array_for_each(curr, idx, fence)
> +                               dma_resv_add_fence(vma->obj-
> >base.resv, curr,
> +                                                 
> DMA_RESV_USAGE_READ);
>                         obj->write_domain = 0;
>                 }
>         }
Nirmoy Das May 16, 2022, 10:57 a.m. UTC | #2
On 5/13/2022 4:54 PM, Patchwork wrote:
> Project List - Patchwork *Patch Details*
> *Series:* 	drm/i915: individualize fences before adding
> *URL:* 	https://patchwork.freedesktop.org/series/103981/
> *State:* 	failure
> *Details:* 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/index.html
>
>
>   CI Bug Log - changes from CI_DRM_11649 -> Patchwork_103981v1
>
>
>     Summary
>
> *FAILURE*
>
> Serious unknown changes coming with Patchwork_103981v1 absolutely need 
> to be
> verified manually.
>
> If you think the reported changes have nothing to do with the changes
> introduced in Patchwork_103981v1, please notify your bug team to allow 
> them
> to document this new failure mode, which will reduce false positives 
> in CI.
>
> External URL: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/index.html
>
>
>     Participating hosts (39 -> 40)
>
> Additional (3): fi-blb-e6850 fi-icl-u2 bat-dg1-5
> Missing (2): bat-adlm-1 bat-jsl-2
>
>
>     Possible new issues
>
> Here are the unknown changes that may have been introduced in 
> Patchwork_103981v1:
>
>
>       IGT changes
>
>
>         Possible regressions
>
>   * igt@i915_selftest@live@gem:
>       o fi-blb-e6850: NOTRUN -> INCOMPLETE
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-blb-e6850/igt@i915_selftest@live@gem.html>
>

Unrelated and this test on blb is failing for a while 
https://intel-gfx-ci.01.org/tree/drm-tip/fi-blb-e6850.html


Nirmoy



>  *
>
>
>     Known issues
>
> Here are the changes found in Patchwork_103981v1 that come from known 
> issues:
>
>
>       IGT changes
>
>
>         Issues hit
>
>  *
>
>     igt@fbdev@write:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@fbdev@write.html>
>         (i915#2582
>         <https://gitlab.freedesktop.org/drm/intel/issues/2582>) +4
>         similar issues
>  *
>
>     igt@gem_huc_copy@huc-copy:
>
>       o fi-icl-u2: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-icl-u2/igt@gem_huc_copy@huc-copy.html>
>         (i915#2190 <https://gitlab.freedesktop.org/drm/intel/issues/2190>)
>  *
>
>     igt@gem_lmem_swapping@parallel-random-engines:
>
>       o fi-icl-u2: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-icl-u2/igt@gem_lmem_swapping@parallel-random-engines.html>
>         (i915#4613
>         <https://gitlab.freedesktop.org/drm/intel/issues/4613>) +3
>         similar issues
>  *
>
>     igt@gem_mmap@basic:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@gem_mmap@basic.html>
>         (i915#4083 <https://gitlab.freedesktop.org/drm/intel/issues/4083>)
>  *
>
>     igt@gem_tiled_fence_blits@basic:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@gem_tiled_fence_blits@basic.html>
>         (i915#4077
>         <https://gitlab.freedesktop.org/drm/intel/issues/4077>) +2
>         similar issues
>  *
>
>     igt@gem_tiled_pread_basic:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@gem_tiled_pread_basic.html>
>         (i915#4079
>         <https://gitlab.freedesktop.org/drm/intel/issues/4079>) +1
>         similar issue
>  *
>
>     igt@i915_pm_backlight@basic-brightness:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@i915_pm_backlight@basic-brightness.html>
>         (i915#1155 <https://gitlab.freedesktop.org/drm/intel/issues/1155>)
>  *
>
>     igt@i915_selftest@live@gt_engines:
>
>       o bat-dg1-5: NOTRUN -> INCOMPLETE
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@i915_selftest@live@gt_engines.html>
>         (i915#4418 <https://gitlab.freedesktop.org/drm/intel/issues/4418>)
>  *
>
>     igt@i915_selftest@live@gtt:
>
>       o fi-bdw-5557u: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11649/fi-bdw-5557u/igt@i915_selftest@live@gtt.html>
>         -> INCOMPLETE
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-bdw-5557u/igt@i915_selftest@live@gtt.html>
>         (i915#5685 <https://gitlab.freedesktop.org/drm/intel/issues/5685>)
>  *
>
>     igt@kms_addfb_basic@basic-y-tiled-legacy:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_addfb_basic@basic-y-tiled-legacy.html>
>         (i915#4215 <https://gitlab.freedesktop.org/drm/intel/issues/4215>)
>  *
>
>     igt@kms_addfb_basic@tile-pitch-mismatch:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_addfb_basic@tile-pitch-mismatch.html>
>         (i915#4212
>         <https://gitlab.freedesktop.org/drm/intel/issues/4212>) +7
>         similar issues
>  *
>
>     igt@kms_busy@basic:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_busy@basic.html>
>         (i915#4303 <https://gitlab.freedesktop.org/drm/intel/issues/4303>)
>  *
>
>     igt@kms_chamelium@common-hpd-after-suspend:
>
>       o fi-hsw-4770: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-hsw-4770/igt@kms_chamelium@common-hpd-after-suspend.html>
>         (fdo#109271
>         <https://bugs.freedesktop.org/show_bug.cgi?id=109271> /
>         fdo#111827 <https://bugs.freedesktop.org/show_bug.cgi?id=111827>)
>  *
>
>     igt@kms_chamelium@hdmi-hpd-fast:
>
>      o
>
>         fi-icl-u2: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html>
>         (fdo#111827
>         <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +8
>         similar issues
>
>      o
>
>         bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_chamelium@hdmi-hpd-fast.html>
>         (fdo#111827
>         <https://bugs.freedesktop.org/show_bug.cgi?id=111827>) +7
>         similar issues
>
>  *
>
>     igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
>
>      o
>
>         fi-icl-u2: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html>
>         (fdo#109278
>         <https://bugs.freedesktop.org/show_bug.cgi?id=109278>) +2
>         similar issues
>
>      o
>
>         bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html>
>         (i915#4103
>         <https://gitlab.freedesktop.org/drm/intel/issues/4103> /
>         i915#4213
>         <https://gitlab.freedesktop.org/drm/intel/issues/4213>) +1
>         similar issue
>
>  *
>
>     igt@kms_flip@basic-flip-vs-dpms:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_flip@basic-flip-vs-dpms.html>
>         (i915#4078
>         <https://gitlab.freedesktop.org/drm/intel/issues/4078>) +23
>         similar issues
>  *
>
>     igt@kms_force_connector_basic@force-load-detect:
>
>      o
>
>         bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_force_connector_basic@force-load-detect.html>
>         (fdo#109285 <https://bugs.freedesktop.org/show_bug.cgi?id=109285>)
>
>      o
>
>         fi-icl-u2: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-icl-u2/igt@kms_force_connector_basic@force-load-detect.html>
>         (fdo#109285 <https://bugs.freedesktop.org/show_bug.cgi?id=109285>)
>
>  *
>
>     igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
>
>       o fi-blb-e6850: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-blb-e6850/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html>
>         (fdo#109271
>         <https://bugs.freedesktop.org/show_bug.cgi?id=109271>) +39
>         similar issues
>  *
>
>     igt@kms_psr@primary_page_flip:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_psr@primary_page_flip.html>
>         (i915#1072
>         <https://gitlab.freedesktop.org/drm/intel/issues/1072> /
>         i915#4078
>         <https://gitlab.freedesktop.org/drm/intel/issues/4078>) +3
>         similar issues
>  *
>
>     igt@kms_setmode@basic-clone-single-crtc:
>
>      o
>
>         fi-icl-u2: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-icl-u2/igt@kms_setmode@basic-clone-single-crtc.html>
>         (i915#3555 <https://gitlab.freedesktop.org/drm/intel/issues/3555>)
>
>      o
>
>         bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@kms_setmode@basic-clone-single-crtc.html>
>         (i915#3555 <https://gitlab.freedesktop.org/drm/intel/issues/3555>)
>
>  *
>
>     igt@prime_vgem@basic-fence-mmap:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@prime_vgem@basic-fence-mmap.html>
>         (i915#3708
>         <https://gitlab.freedesktop.org/drm/intel/issues/3708> /
>         i915#4077
>         <https://gitlab.freedesktop.org/drm/intel/issues/4077>) +1
>         similar issue
>  *
>
>     igt@prime_vgem@basic-userptr:
>
>      o
>
>         fi-icl-u2: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-icl-u2/igt@prime_vgem@basic-userptr.html>
>         (i915#3301 <https://gitlab.freedesktop.org/drm/intel/issues/3301>)
>
>      o
>
>         bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@prime_vgem@basic-userptr.html>
>         (i915#3708
>         <https://gitlab.freedesktop.org/drm/intel/issues/3708> /
>         i915#4873 <https://gitlab.freedesktop.org/drm/intel/issues/4873>)
>
>  *
>
>     igt@prime_vgem@basic-write:
>
>       o bat-dg1-5: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@prime_vgem@basic-write.html>
>         (i915#3708
>         <https://gitlab.freedesktop.org/drm/intel/issues/3708>) +3
>         similar issues
>  *
>
>     igt@runner@aborted:
>
>      o
>
>         bat-dg1-5: NOTRUN -> FAIL
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg1-5/igt@runner@aborted.html>
>         (i915#4312
>         <https://gitlab.freedesktop.org/drm/intel/issues/4312> /
>         i915#5257 <https://gitlab.freedesktop.org/drm/intel/issues/5257>)
>
>      o
>
>         fi-blb-e6850: NOTRUN -> FAIL
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-blb-e6850/igt@runner@aborted.html>
>         (fdo#109271
>         <https://bugs.freedesktop.org/show_bug.cgi?id=109271> /
>         i915#2403
>         <https://gitlab.freedesktop.org/drm/intel/issues/2403> /
>         i915#4312 <https://gitlab.freedesktop.org/drm/intel/issues/4312>)
>
>
>         Possible fixes
>
>  *
>
>     igt@gem_exec_suspend@basic-s0@smem:
>
>       o {fi-ehl-2}: DMESG-WARN
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11649/fi-ehl-2/igt@gem_exec_suspend@basic-s0@smem.html>
>         (i915#5122
>         <https://gitlab.freedesktop.org/drm/intel/issues/5122>) ->
>         PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-ehl-2/igt@gem_exec_suspend@basic-s0@smem.html>
>  *
>
>     igt@i915_selftest@live@gt_heartbeat:
>
>       o {fi-jsl-1}: DMESG-FAIL
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11649/fi-jsl-1/igt@i915_selftest@live@gt_heartbeat.html>
>         (i915#5334
>         <https://gitlab.freedesktop.org/drm/intel/issues/5334>) ->
>         PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-jsl-1/igt@i915_selftest@live@gt_heartbeat.html>
>  *
>
>     igt@i915_selftest@live@hangcheck:
>
>       o fi-hsw-4770: INCOMPLETE
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11649/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html>
>         (i915#4785
>         <https://gitlab.freedesktop.org/drm/intel/issues/4785>) ->
>         PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html>
>  *
>
>     igt@i915_suspend@system-suspend-without-i915:
>
>       o {bat-dg2-9}: DMESG-WARN
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11649/bat-dg2-9/igt@i915_suspend@system-suspend-without-i915.html>
>         (i915#5763
>         <https://gitlab.freedesktop.org/drm/intel/issues/5763>) ->
>         PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-dg2-9/igt@i915_suspend@system-suspend-without-i915.html>
>  *
>
>     igt@kms_flip@basic-flip-vs-modeset@a-edp1:
>
>       o {bat-adlp-6}: DMESG-WARN
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11649/bat-adlp-6/igt@kms_flip@basic-flip-vs-modeset@a-edp1.html>
>         (i915#3576
>         <https://gitlab.freedesktop.org/drm/intel/issues/3576>) ->
>         PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_103981v1/bat-adlp-6/igt@kms_flip@basic-flip-vs-modeset@a-edp1.html>
>
> {name}: This element is suppressed. This means it is ignored when 
> computing
> the status of the difference (SUCCESS, WARNING, or FAILURE).
>
>
>     Build changes
>
>   * Linux: CI_DRM_11649 -> Patchwork_103981v1
>
> CI-20190529: 20190529
> CI_DRM_11649: 41053495dd77aa5604144477ef59334a9492a169 @ 
> git://anongit.freedesktop.org/gfx-ci/linux
> IGT_6472: c815c94f0ceb33ae852622538f0136cf44c5725d @ 
> https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
> Patchwork_103981v1: 41053495dd77aa5604144477ef59334a9492a169 @ 
> git://anongit.freedesktop.org/gfx-ci/linux
>
>
>       Linux commits
>
> 4a604aeca9d8 drm/i915: individualize fences before adding
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 4f6db539571a..f987fc1264c0 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -23,6 +23,7 @@ 
  */
 
 #include <linux/sched/mm.h>
+#include <linux/dma-fence-array.h>
 #include <drm/drm_gem.h>
 
 #include "display/intel_frontbuffer.h"
@@ -1840,8 +1841,12 @@  int _i915_vma_move_to_active(struct i915_vma *vma,
 		}
 
 		if (fence) {
-			dma_resv_add_fence(vma->obj->base.resv, fence,
-					   DMA_RESV_USAGE_WRITE);
+			int idx;
+			struct dma_fence *curr;
+
+			dma_fence_array_for_each(curr, idx, fence)
+				dma_resv_add_fence(vma->obj->base.resv, curr,
+						   DMA_RESV_USAGE_WRITE);
 			obj->write_domain = I915_GEM_DOMAIN_RENDER;
 			obj->read_domains = 0;
 		}
@@ -1853,8 +1858,12 @@  int _i915_vma_move_to_active(struct i915_vma *vma,
 		}
 
 		if (fence) {
-			dma_resv_add_fence(vma->obj->base.resv, fence,
-					   DMA_RESV_USAGE_READ);
+			int idx;
+			struct dma_fence *curr;
+
+			dma_fence_array_for_each(curr, idx, fence)
+				dma_resv_add_fence(vma->obj->base.resv, curr,
+						   DMA_RESV_USAGE_READ);
 			obj->write_domain = 0;
 		}
 	}