All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Wrap context schedule notification
@ 2017-09-25 19:52 Chris Wilson
  2017-09-25 19:52 ` [PATCH 2/2] drm/i915/execlists: Notify context-out for lost requests Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-09-25 19:52 UTC (permalink / raw)
  To: intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

No functional change just something which will be handy in the
following patch.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170925151543.7395-6-tvrtko.ursulin@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_lrc.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 2c07f3c08bd3..c07da6af58cd 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -363,6 +363,18 @@ execlists_context_status_change(struct drm_i915_gem_request *rq,
 				   status, rq);
 }
 
+static inline void
+execlists_context_schedule_in(struct drm_i915_gem_request *rq)
+{
+	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
+}
+
+static inline void
+execlists_context_schedule_out(struct drm_i915_gem_request *rq)
+{
+	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
+}
+
 static void
 execlists_update_context_pdps(struct i915_hw_ppgtt *ppgtt, u32 *reg_state)
 {
@@ -408,7 +420,7 @@ static void execlists_submit_ports(struct intel_engine_cs *engine)
 		if (rq) {
 			GEM_BUG_ON(count > !n);
 			if (!count++)
-				execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
+				execlists_context_schedule_in(rq);
 			port_set(&port[n], port_pack(rq, count));
 			desc = execlists_update_context(rq);
 			GEM_DEBUG_EXEC(port[n].context_id = upper_32_bits(desc));
@@ -749,8 +761,7 @@ static void intel_lrc_irq_handler(unsigned long data)
 			if (--count == 0) {
 				GEM_BUG_ON(status & GEN8_CTX_STATUS_PREEMPTED);
 				GEM_BUG_ON(!i915_gem_request_completed(rq));
-				execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
-
+				execlists_context_schedule_out(rq);
 				trace_i915_gem_request_out(rq);
 				i915_gem_request_put(rq);
 
-- 
2.14.1

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

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

* [PATCH 2/2] drm/i915/execlists: Notify context-out for lost requests
  2017-09-25 19:52 [PATCH 1/2] drm/i915: Wrap context schedule notification Chris Wilson
@ 2017-09-25 19:52 ` Chris Wilson
  2017-09-26 10:17   ` Mika Kuoppala
  2017-09-25 20:26 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Wrap context schedule notification Patchwork
  2017-09-26  0:43 ` ✗ Fi.CI.IGT: failure " Patchwork
  2 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2017-09-25 19:52 UTC (permalink / raw)
  To: intel-gfx

When cancelling requests, also send the notification to any listeners
(gvt) that the request is no longer scheduler on hw. They may require to
keep the in/out exactly balanced, and so the reuse after the reset may
confuse the listener.

Fixes: 221ab9719bf3 ("drm/i915/execlists: Unwind incomplete requests on resets")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Zhenyu Wang" <zhenyuw@linux.intel.com>
Cc: "Wang, Zhi A" <zhi.a.wang@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index c07da6af58cd..e7d9f49128f5 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -590,7 +590,11 @@ execlist_cancel_port_requests(struct intel_engine_execlists *execlists)
 	unsigned int num_ports = ARRAY_SIZE(execlists->port);
 
 	while (num_ports-- && port_isset(port)) {
-		i915_gem_request_put(port_request(port));
+		struct drm_i915_gem_request *rq = port_request(port);
+
+		execlists_context_schedule_out(rq);
+		i915_gem_request_put(rq);
+
 		memset(port, 0, sizeof(*port));
 		port++;
 	}
-- 
2.14.1

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

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

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Wrap context schedule notification
  2017-09-25 19:52 [PATCH 1/2] drm/i915: Wrap context schedule notification Chris Wilson
  2017-09-25 19:52 ` [PATCH 2/2] drm/i915/execlists: Notify context-out for lost requests Chris Wilson
@ 2017-09-25 20:26 ` Patchwork
  2017-09-26  0:43 ` ✗ Fi.CI.IGT: failure " Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-09-25 20:26 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Wrap context schedule notification
URL   : https://patchwork.freedesktop.org/series/30854/
State : success

== Summary ==

Series 30854v1 series starting with [1/2] drm/i915: Wrap context schedule notification
https://patchwork.freedesktop.org/api/1.0/series/30854/revisions/1/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                pass       -> FAIL       (fi-kbl-7500u) fdo#102514
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-c:
                incomplete -> PASS       (fi-kbl-r)
Test drv_module_reload:
        Subgroup basic-reload-inject:
                dmesg-warn -> PASS       (fi-glk-1) fdo#102777

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

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:439s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:470s
fi-blb-e6850     total:289  pass:224  dwarn:1   dfail:0   fail:0   skip:64  time:420s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:516s
fi-bwr-2160      total:289  pass:184  dwarn:0   dfail:0   fail:0   skip:105 time:275s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:495s
fi-byt-j1900     total:289  pass:254  dwarn:1   dfail:0   fail:0   skip:34  time:493s
fi-byt-n2820     total:289  pass:250  dwarn:1   dfail:0   fail:0   skip:38  time:495s
fi-cfl-s         total:289  pass:223  dwarn:34  dfail:0   fail:0   skip:32  time:545s
fi-cnl-y         total:289  pass:256  dwarn:0   dfail:0   fail:6   skip:27  time:647s
fi-elk-e7500     total:289  pass:230  dwarn:0   dfail:0   fail:0   skip:59  time:419s
fi-glk-1         total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:564s
fi-hsw-4770      total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:421s
fi-hsw-4770r     total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:401s
fi-ilk-650       total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:434s
fi-ivb-3520m     total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:493s
fi-ivb-3770      total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:462s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:0   fail:1   skip:24  time:464s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:574s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:581s
fi-pnv-d510      total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:544s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:449s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:749s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:487s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:467s
fi-snb-2520m     total:289  pass:251  dwarn:0   dfail:0   fail:0   skip:38  time:561s
fi-snb-2600      total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:415s

f4eb3c100b0bd3e63af7f2083e3d4b1e0cd4fa7d drm-tip: 2017y-09m-25d-19h-36m-33s UTC integration manifest
4b3908581e0f drm/i915/execlists: Notify context-out for lost requests
47bc0fa8fa51 drm/i915: Wrap context schedule notification

== Logs ==

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

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

* ✗ Fi.CI.IGT: failure for series starting with [1/2] drm/i915: Wrap context schedule notification
  2017-09-25 19:52 [PATCH 1/2] drm/i915: Wrap context schedule notification Chris Wilson
  2017-09-25 19:52 ` [PATCH 2/2] drm/i915/execlists: Notify context-out for lost requests Chris Wilson
  2017-09-25 20:26 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Wrap context schedule notification Patchwork
@ 2017-09-26  0:43 ` Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-09-26  0:43 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Wrap context schedule notification
URL   : https://patchwork.freedesktop.org/series/30854/
State : failure

== Summary ==

Test kms_cursor_legacy:
        Subgroup flip-vs-cursor-crc-legacy:
                pass       -> FAIL       (shard-hsw)
Test perf:
        Subgroup blocking:
                fail       -> PASS       (shard-hsw) fdo#102252

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

shard-hsw        total:2380 pass:1292 dwarn:5   dfail:0   fail:17  skip:1066 time:9662s

== Logs ==

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

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

* Re: [PATCH 2/2] drm/i915/execlists: Notify context-out for lost requests
  2017-09-25 19:52 ` [PATCH 2/2] drm/i915/execlists: Notify context-out for lost requests Chris Wilson
@ 2017-09-26 10:17   ` Mika Kuoppala
  0 siblings, 0 replies; 5+ messages in thread
From: Mika Kuoppala @ 2017-09-26 10:17 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> When cancelling requests, also send the notification to any listeners
> (gvt) that the request is no longer scheduler on hw. They may require to

s/scheduler/scheduled.

lgtm
-Mika

> keep the in/out exactly balanced, and so the reuse after the reset may
> confuse the listener.
>
> Fixes: 221ab9719bf3 ("drm/i915/execlists: Unwind incomplete requests on resets")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: "Zhenyu Wang" <zhenyuw@linux.intel.com>
> Cc: "Wang, Zhi A" <zhi.a.wang@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index c07da6af58cd..e7d9f49128f5 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -590,7 +590,11 @@ execlist_cancel_port_requests(struct intel_engine_execlists *execlists)
>  	unsigned int num_ports = ARRAY_SIZE(execlists->port);
>  
>  	while (num_ports-- && port_isset(port)) {
> -		i915_gem_request_put(port_request(port));
> +		struct drm_i915_gem_request *rq = port_request(port);
> +
> +		execlists_context_schedule_out(rq);
> +		i915_gem_request_put(rq);
> +
>  		memset(port, 0, sizeof(*port));
>  		port++;
>  	}
> -- 
> 2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-09-26 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25 19:52 [PATCH 1/2] drm/i915: Wrap context schedule notification Chris Wilson
2017-09-25 19:52 ` [PATCH 2/2] drm/i915/execlists: Notify context-out for lost requests Chris Wilson
2017-09-26 10:17   ` Mika Kuoppala
2017-09-25 20:26 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Wrap context schedule notification Patchwork
2017-09-26  0:43 ` ✗ Fi.CI.IGT: failure " Patchwork

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.