Skip to contentSkip to conversation

drm/i915: add schedule out notification of completed request during unwind

PATCH Superseded Weinan Li 3 participants 5 messages Feb 8, 2018

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Weinan Li

author
#0 lore raw

PATCH 1/1 drm/i915: add schedule out notification of completed request during unwind

There is one corner case missing schedule out notification for GVT-g in __unwind_incomplete_requests, it may cause vgpu no response. Add notification when ensure one request has been completed during doing unwind.

---
 drivers/gpu/drm/i915/intel_lrc.c | 63 ++++++++++++++++++++--------------------
 1 file changed, 32 insertions(+), 31 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +32 -31
index deeedfc..5b937d3 100644
@@ -274,6 +274,35 @@ static void unwind_wa_tail(struct drm_i915_gem_request *rq)
 	assert_ring_tail_valid(rq->ring, rq->tail);
 }
 
+static inline void
+execlists_context_status_change(struct drm_i915_gem_request *rq,
+				unsigned long status)
+{
+	/*
+	 * Only used when GVT-g is enabled now. When GVT-g is disabled,
+	 * The compiler should eliminate this function as dead-code.
+	 */
+	if (!IS_ENABLED(CONFIG_DRM_I915_GVT))
+		return;
+
+	atomic_notifier_call_chain(&rq->engine->context_status_notifier,
+				   status, rq);
+}
+
+static inline void
+execlists_context_schedule_in(struct drm_i915_gem_request *rq)
+{
+	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
+	intel_engine_context_in(rq->engine);
+}
+
+static inline void
+execlists_context_schedule_out(struct drm_i915_gem_request *rq)
+{
+	intel_engine_context_out(rq->engine);
+	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
+}
+
 static void __unwind_incomplete_requests(struct intel_engine_cs *engine)
 {
 	struct drm_i915_gem_request *rq, *rn;
@@ -285,9 +314,10 @@ static void __unwind_incomplete_requests(struct intel_engine_cs *engine)
 	list_for_each_entry_safe_reverse(rq, rn,
 					 &engine->timeline->requests,
 					 link) {
-		if (i915_gem_request_completed(rq))
+		if (i915_gem_request_completed(rq)) {
+			execlists_context_schedule_out(rq);
 			return;
-
+		}
 		__i915_gem_request_unsubmit(rq);
 		unwind_wa_tail(rq);
 
@@ -316,35 +346,6 @@ static void __unwind_incomplete_requests(struct intel_engine_cs *engine)
 	spin_unlock_irq(&engine->timeline->lock);
 }
 
-static inline void
-execlists_context_status_change(struct drm_i915_gem_request *rq,
-				unsigned long status)
-{
-	/*
-	 * Only used when GVT-g is enabled now. When GVT-g is disabled,
-	 * The compiler should eliminate this function as dead-code.
-	 */
-	if (!IS_ENABLED(CONFIG_DRM_I915_GVT))
-		return;
-
-	atomic_notifier_call_chain(&rq->engine->context_status_notifier,
-				   status, rq);
-}
-
-static inline void
-execlists_context_schedule_in(struct drm_i915_gem_request *rq)
-{
-	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
-	intel_engine_context_in(rq->engine);
-}
-
-static inline void
-execlists_context_schedule_out(struct drm_i915_gem_request *rq)
-{
-	intel_engine_context_out(rq->engine);
-	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
-}
-
 static void
 execlists_update_context_pdps(struct i915_hw_ppgtt *ppgtt, u32 *reg_state)
 {
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915: add schedule out notification of completed request during unwind

== Series Details ==

== Series Details ==

Series: drm/i915: add schedule out notification of completed request during unwind
URL : https://patchwork.freedesktop.org/series/37860/
State : success

== Summary ==

Series 37860v1 drm/i915: add schedule out notification of completed request during unwind
https://patchwork.freedesktop.org/api/1.0/series/37860/revisions/1/mbox/

Test debugfs_test:

        Subgroup read_all_entries:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:418s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:426s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:371s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:486s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:287s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:481s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:488s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:469s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:455s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:573s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:420s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:286s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:516s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:388s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:415s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:456s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:414s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:456s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:502s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:451s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:499s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:599s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:425s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:511s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:524s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:488s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:485s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:413s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:427s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:397s

Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:468s

3a0a17a6152eeae75653d005494cc83f6f2bf47b drm-tip: 2018y-02m-07d-22h-59m-51s UTC integration manifest 49eb846375fe drm/i915: add schedule out notification of completed request during unwind

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7934/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Weinan Li

Quoting Weinan Li (2018-02-08 01:17:59)

Quoted 4 lines

There is one corner case missing schedule out notification for GVT-g in __unwind_incomplete_requests, it may cause vgpu no response. Add notification when ensure one request has been completed during doing unwind.

You never get the schedule-in for those, only ELSP. -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Thursday, February 8, 2018 3:37 PM
To: Li, Weinan Z <[email protected]>; [email protected]
Cc: [email protected]; Li, Weinan Z <[email protected]>; Zhenyu Wang <[email protected]>
Subject: Re: [PATCH] drm/i915: add schedule out notification of completed request during unwind

Quoting Weinan Li (2018-02-08 01:17:59)

Quoted 4 lines

There is one corner case missing schedule out notification for GVT-g in __unwind_incomplete_requests, it may cause vgpu no response. Add notification when ensure one request has been completed during doing unwind.

You never get the schedule-in for those, only ELSP. -Chris

@@ -285,9 +314,10 @@ static void __unwind_incomplete_requests(struct intel_engine_cs *engine)
list_for_each_entry_safe_reverse(rq, rn,
&engine->timeline->requests,
link) {
- if (i915_gem_request_completed(rq))
+ if (i915_gem_request_completed(rq)) {
Thanks Chris, Do you mean it won't run to here, I am not sure but I indeed found notification missing in GVT-g with linux guest.
+ execlists_context_schedule_out(rq);
return;
-
+ }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✓ Fi.CI.IGT: success for drm/i915: add schedule out notification of completed request during unwind

In reply to Weinan Li
== Series Details ==

== Series Details ==

Series: drm/i915: add schedule out notification of completed request during unwind
URL : https://patchwork.freedesktop.org/series/37860/
State : success

== Summary ==

Warning: bzip CI_DRM_3739/shard-glkb6/results17.json.bz2 wasn't in correct JSON format Test kms_sysfs_edid_timing:

                warn       -> PASS       (shard-apl) fdo#100047
Test pm_rpm:
        Subgroup legacy-planes-dpms:
                skip       -> PASS       (shard-apl)
        Subgroup modeset-non-lpsp-stress:
                skip       -> PASS       (shard-apl)
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-atomic:
                skip       -> PASS       (shard-apl)
        Subgroup flip-vs-cursor-busy-crc-atomic:
                skip       -> PASS       (shard-apl)
        Subgroup cursora-vs-flipa-toggle:
                skip       -> PASS       (shard-apl)
Test gem_mmap_wc:
        Subgroup set-cache-level:
                skip       -> PASS       (shard-apl)
Test kms_chv_cursor_fail:
        Subgroup pipe-a-64x64-top-edge:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-c-64x64-bottom-edge:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-c-64x64-top-edge:
                skip       -> PASS       (shard-apl)
Test kms_plane_lowres:
        Subgroup pipe-b-tiling-yf:
                skip       -> PASS       (shard-apl) fdo#103166 +1
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-primscrn-cur-indfb-draw-blt:
                skip       -> PASS       (shard-apl) fdo#103167 +2
        Subgroup fbc-indfb-scaledprimary:
                skip       -> PASS       (shard-apl)
        Subgroup fbc-1p-primscrn-pri-indfb-draw-render:
                skip       -> PASS       (shard-apl) fdo#101623 +1
        Subgroup fbc-1p-offscren-pri-shrfb-draw-mmap-gtt:
                skip       -> PASS       (shard-apl)
Test kms_fbcon_fbt:
        Subgroup fbc:
                skip       -> PASS       (shard-apl)
Test kms_flip:
        Subgroup flip-vs-fences:
                skip       -> PASS       (shard-apl)
        Subgroup flip-vs-dpms-interruptible:
                skip       -> PASS       (shard-apl)
        Subgroup flip-vs-panning-interruptible:
                skip       -> PASS       (shard-apl)
        Subgroup nonexisting-fb:
                skip       -> PASS       (shard-apl)
        Subgroup blocking-absolute-wf_vblank-interruptible:
                skip       -> PASS       (shard-apl)
        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (shard-hsw) fdo#100368
Test kms_atomic:
        Subgroup test_only:
                skip       -> PASS       (shard-apl)
        Subgroup plane_overlay_legacy:
                skip       -> PASS       (shard-apl)
Test kms_vblank:
        Subgroup pipe-b-wait-idle:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-b-wait-forked-busy:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-c-ts-continuation-idle-hang:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-a-wait-busy:
                skip       -> PASS       (shard-apl)
Test kms_color:
        Subgroup pipe-a-ctm-blue-to-red:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-b-legacy-gamma-reset:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-a-ctm-0-25:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-c-ctm-0-75:
                skip       -> PASS       (shard-apl)
        Subgroup pipe-c-ctm-blue-to-red:
                skip       -> PASS       (shard-apl)
Test kms_busy:
        Subgroup extended-modeset-hang-oldfb-with-reset-render-b:
                skip       -> PASS       (shard-apl)
Test gem_eio:
        Subgroup hibernate:
                pass       -> INCOMPLETE (shard-hsw) fdo#103540
Test kms_cursor_crc:
        Subgroup cursor-256x85-sliding:
                skip       -> PASS       (shard-apl)
        Subgroup cursor-256x256-onscreen:
                skip       -> PASS       (shard-apl)
        Subgroup cursor-64x21-offscreen:
                skip       -> PASS       (shard-apl)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-c-frame-sequence:
                skip       -> PASS       (shard-apl) fdo#103481
        Subgroup nonblocking-crc-pipe-b:
                skip       -> PASS       (shard-apl)
Test kms_ccs:
        Subgroup pipe-b-bad-pixel-format:
                skip       -> PASS       (shard-apl)
Test kms_plane:
        Subgroup plane-panning-bottom-right-suspend-pipe-c-planes:
                dmesg-warn -> PASS       (shard-apl) fdo#104164
Test kms_draw_crc:
        Subgroup draw-method-rgb565-pwrite-untiled:
                skip       -> PASS       (shard-apl)
        Subgroup draw-method-xrgb2101010-pwrite-untiled:
                skip       -> PASS       (shard-apl)
        Subgroup draw-method-xrgb2101010-render-xtiled:
                skip       -> PASS       (shard-apl)
        Subgroup draw-method-xrgb8888-mmap-gtt-xtiled:
                skip       -> PASS       (shard-apl)
        Subgroup draw-method-xrgb8888-render-xtiled:
                skip       -> PASS       (shard-apl)
Test kms_rmfb:
        Subgroup close-fd:
                skip       -> PASS       (shard-apl)
Test drv_suspend:
        Subgroup fence-restore-untiled-hibernate:
                fail       -> SKIP       (shard-snb) fdo#103375
Test perf:
        Subgroup oa-exponents:
                fail       -> PASS       (shard-apl) fdo#102254

fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#104164 https://bugs.freedesktop.org/show_bug.cgi?id=104164
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254

shard-apl        total:3413 pass:1769 dwarn:1   dfail:0   fail:19  skip:1623 time:12425s
shard-hsw        total:3376 pass:1733 dwarn:1   dfail:0   fail:10  skip:1630 time:11445s
shard-snb        total:3444 pass:1351 dwarn:1   dfail:0   fail:9   skip:2083 time:6567s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7934/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx