Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: Move fd_install after last use of fence
@ 2023-02-03 16:49 Rob Clark
  2023-02-03 18:15 ` Rob Clark
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rob Clark @ 2023-02-03 16:49 UTC (permalink / raw)
  To: dri-devel
  Cc: Rob Clark, Jason A. Donenfeld, Andrzej Hajda, intel-gfx,
	open list, Matthew Auld, Daniel Vetter, Rodrigo Vivi,
	David Airlie, Thomas Hellström, Nirmoy Das

From: Rob Clark <robdclark@chromium.org>

Because eb_composite_fence_create() drops the fence_array reference
after creation of the sync_file, only the sync_file holds a ref to the
fence.  But fd_install() makes that reference visable to userspace, so
it must be the last thing we do with the fence.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index f266b68cf012..0f2e056c02dd 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -3476,38 +3476,38 @@ i915_gem_do_execbuffer(struct drm_device *dev,
 
 err_request:
 	eb_requests_get(&eb);
 	err = eb_requests_add(&eb, err);
 
 	if (eb.fences)
 		signal_fence_array(&eb, eb.composite_fence ?
 				   eb.composite_fence :
 				   &eb.requests[0]->fence);
 
+	if (unlikely(eb.gem_context->syncobj)) {
+		drm_syncobj_replace_fence(eb.gem_context->syncobj,
+					  eb.composite_fence ?
+					  eb.composite_fence :
+					  &eb.requests[0]->fence);
+	}
+
 	if (out_fence) {
 		if (err == 0) {
 			fd_install(out_fence_fd, out_fence->file);
 			args->rsvd2 &= GENMASK_ULL(31, 0); /* keep in-fence */
 			args->rsvd2 |= (u64)out_fence_fd << 32;
 			out_fence_fd = -1;
 		} else {
 			fput(out_fence->file);
 		}
 	}
 
-	if (unlikely(eb.gem_context->syncobj)) {
-		drm_syncobj_replace_fence(eb.gem_context->syncobj,
-					  eb.composite_fence ?
-					  eb.composite_fence :
-					  &eb.requests[0]->fence);
-	}
-
 	if (!out_fence && eb.composite_fence)
 		dma_fence_put(eb.composite_fence);
 
 	eb_requests_put(&eb);
 
 err_vma:
 	eb_release_vmas(&eb, true);
 	WARN_ON(err == -EDEADLK);
 	i915_gem_ww_ctx_fini(&eb.ww);
 
-- 
2.38.1


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

* Re: [Intel-gfx] [PATCH] drm/i915: Move fd_install after last use of fence
  2023-02-03 16:49 [Intel-gfx] [PATCH] drm/i915: Move fd_install after last use of fence Rob Clark
@ 2023-02-03 18:15 ` Rob Clark
  2023-02-06  9:35   ` Tvrtko Ursulin
  2023-02-03 19:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
  2023-02-05  5:34 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 1 reply; 5+ messages in thread
From: Rob Clark @ 2023-02-03 18:15 UTC (permalink / raw)
  To: dri-devel
  Cc: Rob Clark, Jason A. Donenfeld, Andrzej Hajda, jason.ekstrand,
	intel-gfx, open list, Matthew Auld, Daniel Vetter, Rodrigo Vivi,
	David Airlie, Thomas Hellström, Nirmoy Das

On Fri, Feb 3, 2023 at 8:49 AM Rob Clark <robdclark@gmail.com> wrote:
>
> From: Rob Clark <robdclark@chromium.org>
>
> Because eb_composite_fence_create() drops the fence_array reference
> after creation of the sync_file, only the sync_file holds a ref to the
> fence.  But fd_install() makes that reference visable to userspace, so
> it must be the last thing we do with the fence.
>

Fixes: 00dae4d3d35d ("drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)")

> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index f266b68cf012..0f2e056c02dd 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -3476,38 +3476,38 @@ i915_gem_do_execbuffer(struct drm_device *dev,
>
>  err_request:
>         eb_requests_get(&eb);
>         err = eb_requests_add(&eb, err);
>
>         if (eb.fences)
>                 signal_fence_array(&eb, eb.composite_fence ?
>                                    eb.composite_fence :
>                                    &eb.requests[0]->fence);
>
> +       if (unlikely(eb.gem_context->syncobj)) {
> +               drm_syncobj_replace_fence(eb.gem_context->syncobj,
> +                                         eb.composite_fence ?
> +                                         eb.composite_fence :
> +                                         &eb.requests[0]->fence);
> +       }
> +
>         if (out_fence) {
>                 if (err == 0) {
>                         fd_install(out_fence_fd, out_fence->file);
>                         args->rsvd2 &= GENMASK_ULL(31, 0); /* keep in-fence */
>                         args->rsvd2 |= (u64)out_fence_fd << 32;
>                         out_fence_fd = -1;
>                 } else {
>                         fput(out_fence->file);
>                 }
>         }
>
> -       if (unlikely(eb.gem_context->syncobj)) {
> -               drm_syncobj_replace_fence(eb.gem_context->syncobj,
> -                                         eb.composite_fence ?
> -                                         eb.composite_fence :
> -                                         &eb.requests[0]->fence);
> -       }
> -
>         if (!out_fence && eb.composite_fence)
>                 dma_fence_put(eb.composite_fence);
>
>         eb_requests_put(&eb);
>
>  err_vma:
>         eb_release_vmas(&eb, true);
>         WARN_ON(err == -EDEADLK);
>         i915_gem_ww_ctx_fini(&eb.ww);
>
> --
> 2.38.1
>

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

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Move fd_install after last use of fence
  2023-02-03 16:49 [Intel-gfx] [PATCH] drm/i915: Move fd_install after last use of fence Rob Clark
  2023-02-03 18:15 ` Rob Clark
@ 2023-02-03 19:04 ` Patchwork
  2023-02-05  5:34 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-02-03 19:04 UTC (permalink / raw)
  To: Rob Clark; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 2872 bytes --]

== Series Details ==

Series: drm/i915: Move fd_install after last use of fence
URL   : https://patchwork.freedesktop.org/series/113660/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12691 -> Patchwork_113660v1
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/index.html

Participating hosts (28 -> 25)
------------------------------

  Missing    (3): fi-kbl-soraka bat-atsm-1 fi-snb-2520m 

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

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

### IGT changes ###

#### Possible fixes ####

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-apl-guc:         [DMESG-FAIL][1] ([i915#5334]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@migrate:
    - {bat-adlp-9}:       [DMESG-FAIL][3] ([i915#7699]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/bat-adlp-9/igt@i915_selftest@live@migrate.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/bat-adlp-9/igt@i915_selftest@live@migrate.html

  * igt@i915_selftest@live@slpc:
    - {bat-adln-1}:       [DMESG-FAIL][5] ([i915#6997]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/bat-adln-1/igt@i915_selftest@live@slpc.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/bat-adln-1/igt@i915_selftest@live@slpc.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
  [i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609
  [i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913


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

  * Linux: CI_DRM_12691 -> Patchwork_113660v1

  CI-20190529: 20190529
  CI_DRM_12691: 2153bc2944d37403c6d5c4e1082d074a34d39ae9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7148: ee8e31cf39c44d3fdbd04d8db239f8a815f86121 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_113660v1: 2153bc2944d37403c6d5c4e1082d074a34d39ae9 @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

8bb63e2a63e2 drm/i915: Move fd_install after last use of fence

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/index.html

[-- Attachment #2: Type: text/html, Size: 3340 bytes --]

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

* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Move fd_install after last use of fence
  2023-02-03 16:49 [Intel-gfx] [PATCH] drm/i915: Move fd_install after last use of fence Rob Clark
  2023-02-03 18:15 ` Rob Clark
  2023-02-03 19:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
@ 2023-02-05  5:34 ` Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-02-05  5:34 UTC (permalink / raw)
  To: Rob Clark; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 20411 bytes --]

== Series Details ==

Series: drm/i915: Move fd_install after last use of fence
URL   : https://patchwork.freedesktop.org/series/113660/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12691_full -> Patchwork_113660v1_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/index.html

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

  Additional (1): shard-rkl0 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_113660v1_full:

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@gem_softpin@noreloc-s3:
    - {shard-tglu}:       NOTRUN -> [ABORT][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-1/igt@gem_softpin@noreloc-s3.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fair@basic-none@rcs0:
    - shard-glk:          [PASS][2] -> [FAIL][3] ([i915#2842])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk5/igt@gem_exec_fair@basic-none@rcs0.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-glk2/igt@gem_exec_fair@basic-none@rcs0.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-glk:          [PASS][4] -> [ABORT][5] ([i915#5566])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk3/igt@gen9_exec_parse@allowed-single.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-glk6/igt@gen9_exec_parse@allowed-single.html

  
#### Possible fixes ####

  * igt@drm_read@short-buffer-nonblock:
    - {shard-tglu}:       [SKIP][6] ([i915#1845]) -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@drm_read@short-buffer-nonblock.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-7/igt@drm_read@short-buffer-nonblock.html

  * igt@fbdev@nullptr:
    - {shard-tglu}:       [SKIP][8] ([i915#2582]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@fbdev@nullptr.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-7/igt@fbdev@nullptr.html

  * igt@gem_bad_reloc@negative-reloc:
    - {shard-rkl}:        [SKIP][10] ([i915#3281]) -> [PASS][11] +10 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-2/igt@gem_bad_reloc@negative-reloc.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-5/igt@gem_bad_reloc@negative-reloc.html

  * igt@gem_ctx_persistence@hang:
    - {shard-rkl}:        [SKIP][12] ([i915#6252]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-5/igt@gem_ctx_persistence@hang.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@gem_ctx_persistence@hang.html

  * igt@gem_eio@suspend:
    - {shard-rkl}:        [FAIL][14] ([i915#5115] / [i915#7052]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@gem_eio@suspend.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-5/igt@gem_eio@suspend.html

  * igt@gem_exec_endless@dispatch@bcs0:
    - {shard-rkl}:        [SKIP][16] ([i915#6247]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-5/igt@gem_exec_endless@dispatch@bcs0.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@gem_exec_endless@dispatch@bcs0.html

  * igt@gem_mmap_wc@set-cache-level:
    - {shard-tglu}:       [SKIP][18] ([i915#1850]) -> [PASS][19]
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@gem_mmap_wc@set-cache-level.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-7/igt@gem_mmap_wc@set-cache-level.html

  * igt@gem_partial_pwrite_pread@writes-after-reads-uncached:
    - {shard-rkl}:        [SKIP][20] ([i915#3282]) -> [PASS][21] +3 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-5/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html

  * igt@gen9_exec_parse@bb-start-out:
    - {shard-rkl}:        [SKIP][22] ([i915#2527]) -> [PASS][23] +2 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-2/igt@gen9_exec_parse@bb-start-out.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-5/igt@gen9_exec_parse@bb-start-out.html

  * igt@i915_pm_dc@dc9-dpms:
    - {shard-rkl}:        [SKIP][24] ([i915#3361]) -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-5/igt@i915_pm_dc@dc9-dpms.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@i915_pm_dc@dc9-dpms.html

  * igt@i915_pm_rpm@dpms-mode-unset-lpsp:
    - {shard-rkl}:        [SKIP][26] ([i915#1397]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html

  * igt@i915_pm_sseu@full-enable:
    - {shard-rkl}:        [SKIP][28] ([i915#4387]) -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-2/igt@i915_pm_sseu@full-enable.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-5/igt@i915_pm_sseu@full-enable.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip:
    - {shard-rkl}:        [SKIP][30] ([i915#1845] / [i915#4098]) -> [PASS][31] +12 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-5/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html

  * igt@kms_big_fb@y-tiled-64bpp-rotate-180:
    - {shard-tglu}:       [SKIP][32] ([i915#1845] / [i915#7651]) -> [PASS][33] +3 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-7/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html

  * igt@kms_fbcon_fbt@psr:
    - {shard-rkl}:        [SKIP][34] ([i915#3955]) -> [PASS][35]
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@kms_fbcon_fbt@psr.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@kms_fbcon_fbt@psr.html

  * igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2:
    - shard-glk:          [FAIL][36] ([i915#79]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk7/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-glk4/igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a2.html

  * igt@kms_frontbuffer_tracking@fbc-modesetfrombusy:
    - shard-glk:          [FAIL][38] -> [PASS][39]
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-glk6/igt@kms_frontbuffer_tracking@fbc-modesetfrombusy.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-glk5/igt@kms_frontbuffer_tracking@fbc-modesetfrombusy.html

  * igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-blt:
    - {shard-tglu}:       [SKIP][40] ([i915#1849]) -> [PASS][41] +3 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-blt.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-7/igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-blt.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-shrfb-pgflip-blt:
    - {shard-rkl}:        [SKIP][42] ([i915#1849] / [i915#4098]) -> [PASS][43] +9 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-shrfb-pgflip-blt.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-shrfb-pgflip-blt.html

  * igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes:
    - {shard-tglu}:       [SKIP][44] ([i915#1849] / [i915#3558]) -> [PASS][45] +1 similar issue
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-7/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes.html

  * igt@kms_plane@plane-panning-bottom-right@pipe-a-planes:
    - {shard-rkl}:        [SKIP][46] ([i915#1849]) -> [PASS][47] +2 similar issues
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-5/igt@kms_plane@plane-panning-bottom-right@pipe-a-planes.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@kms_plane@plane-panning-bottom-right@pipe-a-planes.html

  * igt@kms_psr@sprite_plane_onoff:
    - {shard-rkl}:        [SKIP][48] ([i915#1072]) -> [PASS][49] +1 similar issue
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@kms_psr@sprite_plane_onoff.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-6/igt@kms_psr@sprite_plane_onoff.html

  * igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-a:
    - {shard-tglu}:       [SKIP][50] ([fdo#109274]) -> [PASS][51]
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-a.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-7/igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-a.html

  * igt@kms_vblank@pipe-a-query-forked-busy:
    - {shard-tglu}:       [SKIP][52] ([i915#7651]) -> [PASS][53] +5 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-tglu-6/igt@kms_vblank@pipe-a-query-forked-busy.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-tglu-7/igt@kms_vblank@pipe-a-query-forked-busy.html

  * igt@perf@gen8-unprivileged-single-ctx-counters:
    - {shard-rkl}:        [SKIP][54] ([i915#2436]) -> [PASS][55]
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12691/shard-rkl-4/igt@perf@gen8-unprivileged-single-ctx-counters.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/shard-rkl-5/igt@perf@gen8-unprivileged-single-ctx-counters.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
  [i915#2436]: https://gitlab.freedesktop.org/drm/intel/issues/2436
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
  [i915#3536]: https://gitlab.freedesktop.org/drm/intel/issues/3536
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
  [i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#4036]: https://gitlab.freedesktop.org/drm/intel/issues/4036
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
  [i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
  [i915#4778]: https://gitlab.freedesktop.org/drm/intel/issues/4778
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
  [i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
  [i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
  [i915#5115]: https://gitlab.freedesktop.org/drm/intel/issues/5115
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
  [i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
  [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
  [i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
  [i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
  [i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
  [i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
  [i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
  [i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
  [i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
  [i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
  [i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178
  [i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
  [i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
  [i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949
  [i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957
  [i915#7997]: https://gitlab.freedesktop.org/drm/intel/issues/7997


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

  * Linux: CI_DRM_12691 -> Patchwork_113660v1

  CI-20190529: 20190529
  CI_DRM_12691: 2153bc2944d37403c6d5c4e1082d074a34d39ae9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7148: ee8e31cf39c44d3fdbd04d8db239f8a815f86121 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_113660v1: 2153bc2944d37403c6d5c4e1082d074a34d39ae9 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113660v1/index.html

[-- Attachment #2: Type: text/html, Size: 15187 bytes --]

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

* Re: [Intel-gfx] [PATCH] drm/i915: Move fd_install after last use of fence
  2023-02-03 18:15 ` Rob Clark
@ 2023-02-06  9:35   ` Tvrtko Ursulin
  0 siblings, 0 replies; 5+ messages in thread
From: Tvrtko Ursulin @ 2023-02-06  9:35 UTC (permalink / raw)
  To: Rob Clark, dri-devel, Matthew Brost
  Cc: Rob Clark, Thomas Hellström, Jason A. Donenfeld,
	Andrzej Hajda, jason.ekstrand, intel-gfx, open list, Matthew Auld,
	Daniel Vetter, Rodrigo Vivi, David Airlie, Nirmoy Das


On 03/02/2023 18:15, Rob Clark wrote:
> On Fri, Feb 3, 2023 at 8:49 AM Rob Clark <robdclark@gmail.com> wrote:
>>
>> From: Rob Clark <robdclark@chromium.org>
>>
>> Because eb_composite_fence_create() drops the fence_array reference
>> after creation of the sync_file, only the sync_file holds a ref to the
>> fence.  But fd_install() makes that reference visable to userspace, so
>> it must be the last thing we do with the fence.
>>
> 
> Fixes: 00dae4d3d35d ("drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)")

This is correct and the fix looks good to me.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

CI is green so I will merge it, thanks again for a fix Rob!

Followup up question for Matthew Brost however is whether the composite 
fence flow could be simplified. This block here comes late in 
i915_gem_do_execbuffer and may mislead the user the composite fence is 
held to the end of the function:

	if (!out_fence && eb.composite_fence)
		dma_fence_put(eb.composite_fence);

Question is would it work to remove the !out_fence condition from here, 
and remove "consumption" of the reference from eb_composite_fence_create 
success path.

Regards,

Tvrtko

>> Signed-off-by: Rob Clark <robdclark@chromium.org>
>> ---
>>   drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 14 +++++++-------
>>   1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
>> index f266b68cf012..0f2e056c02dd 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
>> @@ -3476,38 +3476,38 @@ i915_gem_do_execbuffer(struct drm_device *dev,
>>
>>   err_request:
>>          eb_requests_get(&eb);
>>          err = eb_requests_add(&eb, err);
>>
>>          if (eb.fences)
>>                  signal_fence_array(&eb, eb.composite_fence ?
>>                                     eb.composite_fence :
>>                                     &eb.requests[0]->fence);
>>
>> +       if (unlikely(eb.gem_context->syncobj)) {
>> +               drm_syncobj_replace_fence(eb.gem_context->syncobj,
>> +                                         eb.composite_fence ?
>> +                                         eb.composite_fence :
>> +                                         &eb.requests[0]->fence);
>> +       }
>> +
>>          if (out_fence) {
>>                  if (err == 0) {
>>                          fd_install(out_fence_fd, out_fence->file);
>>                          args->rsvd2 &= GENMASK_ULL(31, 0); /* keep in-fence */
>>                          args->rsvd2 |= (u64)out_fence_fd << 32;
>>                          out_fence_fd = -1;
>>                  } else {
>>                          fput(out_fence->file);
>>                  }
>>          }
>>
>> -       if (unlikely(eb.gem_context->syncobj)) {
>> -               drm_syncobj_replace_fence(eb.gem_context->syncobj,
>> -                                         eb.composite_fence ?
>> -                                         eb.composite_fence :
>> -                                         &eb.requests[0]->fence);
>> -       }
>> -
>>          if (!out_fence && eb.composite_fence)
>>                  dma_fence_put(eb.composite_fence);
>>
>>          eb_requests_put(&eb);
>>
>>   err_vma:
>>          eb_release_vmas(&eb, true);
>>          WARN_ON(err == -EDEADLK);
>>          i915_gem_ww_ctx_fini(&eb.ww);
>>
>> --
>> 2.38.1
>>

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

end of thread, other threads:[~2023-02-06  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-03 16:49 [Intel-gfx] [PATCH] drm/i915: Move fd_install after last use of fence Rob Clark
2023-02-03 18:15 ` Rob Clark
2023-02-06  9:35   ` Tvrtko Ursulin
2023-02-03 19:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-02-05  5:34 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox