All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption
@ 2018-05-01 15:13 Chris Wilson
  2018-05-01 15:13 ` [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Chris Wilson @ 2018-05-01 15:13 UTC (permalink / raw)
  To: intel-gfx

Move the tracepoint into the common execlists_context_schedule_out() and
call it from preemption completion as well. A small bit of refactoring
code should help with when tracing, or else we end up with requests
mysteriously disappearing and some being emitted to HW multiple times.

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 57396a2a6ea2..ffc74f562f77 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -398,10 +398,11 @@ execlists_context_schedule_in(struct i915_request *rq)
 }
 
 static inline void
-execlists_context_schedule_out(struct i915_request *rq)
+execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
 {
 	intel_engine_context_out(rq->engine);
-	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
+	execlists_context_status_change(rq, status);
+	trace_i915_request_out(rq);
 }
 
 static void
@@ -772,12 +773,10 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists)
 			  intel_engine_get_seqno(rq->engine));
 
 		GEM_BUG_ON(!execlists->active);
-		intel_engine_context_out(rq->engine);
-
-		execlists_context_status_change(rq,
-						i915_request_completed(rq) ?
-						INTEL_CONTEXT_SCHEDULE_OUT :
-						INTEL_CONTEXT_SCHEDULE_PREEMPTED);
+		execlists_context_schedule_out(rq,
+					       i915_request_completed(rq) ?
+					       INTEL_CONTEXT_SCHEDULE_OUT :
+					       INTEL_CONTEXT_SCHEDULE_PREEMPTED);
 
 		i915_request_put(rq);
 
@@ -1105,8 +1104,8 @@ static void execlists_submission_tasklet(unsigned long data)
 				 */
 				GEM_BUG_ON(!i915_request_completed(rq));
 
-				execlists_context_schedule_out(rq);
-				trace_i915_request_out(rq);
+				execlists_context_schedule_out(rq,
+							       INTEL_CONTEXT_SCHEDULE_OUT);
 				i915_request_put(rq);
 
 				GEM_TRACE("%s completed ctx=%d\n",
-- 
2.17.0

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

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

* [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints
  2018-05-01 15:13 [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Chris Wilson
@ 2018-05-01 15:13 ` Chris Wilson
  2018-05-01 15:26   ` Tvrtko Ursulin
                     ` (2 more replies)
  2018-05-01 15:26 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 12+ messages in thread
From: Chris Wilson @ 2018-05-01 15:13 UTC (permalink / raw)
  To: intel-gfx

Include a bool to show whether the request is complete in every
tracepoint. This especially helps when tracing the flow of requests
through the HW.

v2: Limit to in/out HW events, not all general request tracepoints.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_trace.h           | 17 +++++++++++------
 drivers/gpu/drm/i915/intel_guc_submission.c |  2 +-
 drivers/gpu/drm/i915/intel_lrc.c            |  2 +-
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 408827bf5d96..66956af25da3 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -691,6 +691,8 @@ DECLARE_EVENT_CLASS(i915_request_hw,
 				     __field(u32, seqno)
 				     __field(u32, global_seqno)
 				     __field(u32, port)
+				     __field(u32, prio)
+				     __field(u32, completed)
 				    ),
 
 		    TP_fast_assign(
@@ -701,12 +703,15 @@ DECLARE_EVENT_CLASS(i915_request_hw,
 				   __entry->seqno = rq->fence.seqno;
 				   __entry->global_seqno = rq->global_seqno;
 				   __entry->port = port;
+				   __entry->prio = rq->sched.attr.priority;
+				   __entry->completed = i915_request_completed(rq);
 				  ),
 
-		    TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
+		    TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, prio=%u, global=%u, port=%u, completed?=%d",
 			      __entry->dev, __entry->hw_id, __entry->ring,
-			      __entry->ctx, __entry->seqno,
-			      __entry->global_seqno, __entry->port)
+			      __entry->ctx, __entry->seqno, __entry->prio,
+			      __entry->global_seqno, __entry->port,
+			      __entry->completed)
 );
 
 DEFINE_EVENT(i915_request_hw, i915_request_in,
@@ -714,9 +719,9 @@ DEFINE_EVENT(i915_request_hw, i915_request_in,
 	     TP_ARGS(rq, port)
 );
 
-DEFINE_EVENT(i915_request, i915_request_out,
-	     TP_PROTO(struct i915_request *rq),
-	     TP_ARGS(rq)
+DEFINE_EVENT(i915_request_hw, i915_request_out,
+	     TP_PROTO(struct i915_request *rq, unsigned int port),
+	     TP_ARGS(rq, port)
 );
 #else
 #if !defined(TRACE_HEADER_MULTI_READ)
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index c6bb5bebddfc..bd440687892a 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -762,7 +762,7 @@ static void guc_submission_tasklet(unsigned long data)
 
 	rq = port_request(port);
 	while (rq && i915_request_completed(rq)) {
-		trace_i915_request_out(rq);
+		trace_i915_request_out(rq, 0);
 		i915_request_put(rq);
 
 		port = execlists_port_complete(execlists, port);
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index ffc74f562f77..396d9596d0aa 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -402,7 +402,7 @@ execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
 {
 	intel_engine_context_out(rq->engine);
 	execlists_context_status_change(rq, status);
-	trace_i915_request_out(rq);
+	trace_i915_request_out(rq, 0);
 }
 
 static void
-- 
2.17.0

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

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

* Re: [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints
  2018-05-01 15:13 ` [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints Chris Wilson
@ 2018-05-01 15:26   ` Tvrtko Ursulin
  2018-05-01 15:41     ` Tvrtko Ursulin
  2018-05-01 15:34   ` [PATCH v3] " Chris Wilson
  2018-05-01 16:05   ` [PATCH 2/2] " kbuild test robot
  2 siblings, 1 reply; 12+ messages in thread
From: Tvrtko Ursulin @ 2018-05-01 15:26 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 01/05/2018 16:13, Chris Wilson wrote:
> Include a bool to show whether the request is complete in every
> tracepoint. This especially helps when tracing the flow of requests
> through the HW.
> 
> v2: Limit to in/out HW events, not all general request tracepoints.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/i915_trace.h           | 17 +++++++++++------
>   drivers/gpu/drm/i915/intel_guc_submission.c |  2 +-
>   drivers/gpu/drm/i915/intel_lrc.c            |  2 +-
>   3 files changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index 408827bf5d96..66956af25da3 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -691,6 +691,8 @@ DECLARE_EVENT_CLASS(i915_request_hw,
>   				     __field(u32, seqno)
>   				     __field(u32, global_seqno)
>   				     __field(u32, port)
> +				     __field(u32, prio)
> +				     __field(u32, completed)
>   				    ),
>   
>   		    TP_fast_assign(
> @@ -701,12 +703,15 @@ DECLARE_EVENT_CLASS(i915_request_hw,
>   				   __entry->seqno = rq->fence.seqno;
>   				   __entry->global_seqno = rq->global_seqno;
>   				   __entry->port = port;
> +				   __entry->prio = rq->sched.attr.priority;
> +				   __entry->completed = i915_request_completed(rq);
>   				  ),
>   
> -		    TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
> +		    TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, prio=%u, global=%u, port=%u, completed?=%d",
>   			      __entry->dev, __entry->hw_id, __entry->ring,
> -			      __entry->ctx, __entry->seqno,
> -			      __entry->global_seqno, __entry->port)
> +			      __entry->ctx, __entry->seqno, __entry->prio,
> +			      __entry->global_seqno, __entry->port,
> +			      __entry->completed)
>   );
>   
>   DEFINE_EVENT(i915_request_hw, i915_request_in,
> @@ -714,9 +719,9 @@ DEFINE_EVENT(i915_request_hw, i915_request_in,
>   	     TP_ARGS(rq, port)
>   );
>   
> -DEFINE_EVENT(i915_request, i915_request_out,
> -	     TP_PROTO(struct i915_request *rq),
> -	     TP_ARGS(rq)
> +DEFINE_EVENT(i915_request_hw, i915_request_out,
> +	     TP_PROTO(struct i915_request *rq, unsigned int port),
> +	     TP_ARGS(rq, port)
>   );
>   #else
>   #if !defined(TRACE_HEADER_MULTI_READ)
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index c6bb5bebddfc..bd440687892a 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -762,7 +762,7 @@ static void guc_submission_tasklet(unsigned long data)
>   
>   	rq = port_request(port);
>   	while (rq && i915_request_completed(rq)) {
> -		trace_i915_request_out(rq);
> +		trace_i915_request_out(rq, 0);
>   		i915_request_put(rq);
>   
>   		port = execlists_port_complete(execlists, port);
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index ffc74f562f77..396d9596d0aa 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -402,7 +402,7 @@ execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
>   {
>   	intel_engine_context_out(rq->engine);
>   	execlists_context_status_change(rq, status);
> -	trace_i915_request_out(rq);
> +	trace_i915_request_out(rq, 0);
>   }
>   
>   static void
> 

Another one! :) For simplicity:

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

Regards,

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

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

* ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption
  2018-05-01 15:13 [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Chris Wilson
  2018-05-01 15:13 ` [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints Chris Wilson
@ 2018-05-01 15:26 ` Patchwork
  2018-05-01 16:05 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption (rev2) Patchwork
  2018-05-01 16:59 ` ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-05-01 15:26 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption
URL   : https://patchwork.freedesktop.org/series/42522/
State : failure

== Summary ==

CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  DESCEND  objtool
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  CC [M]  drivers/gpu/drm/i915/intel_lrc.o
drivers/gpu/drm/i915/intel_lrc.c: In function ‘execlists_context_schedule_out’:
drivers/gpu/drm/i915/intel_lrc.c:404:2: error: too many arguments to function ‘trace_i915_request_out’
  trace_i915_request_out(rq, 0);
  ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/i915_drv.h:2668:0,
                 from drivers/gpu/drm/i915/intel_lrc.c:138:
drivers/gpu/drm/i915/i915_trace.h:744:1: note: declared here
 trace_i915_request_out(struct i915_request *rq)
 ^~~~~~~~~~~~~~~~~~~~~~
scripts/Makefile.build:312: recipe for target 'drivers/gpu/drm/i915/intel_lrc.o' failed
make[4]: *** [drivers/gpu/drm/i915/intel_lrc.o] Error 1
scripts/Makefile.build:559: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:559: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:559: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1060: recipe for target 'drivers' failed
make: *** [drivers] Error 2

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

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

* [PATCH v3] drm/i915: Include completed status in HW request tracepoints
  2018-05-01 15:13 ` [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints Chris Wilson
  2018-05-01 15:26   ` Tvrtko Ursulin
@ 2018-05-01 15:34   ` Chris Wilson
  2018-05-01 16:05   ` [PATCH 2/2] " kbuild test robot
  2 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-05-01 15:34 UTC (permalink / raw)
  To: intel-gfx

Include a bool to show whether the request is complete in every
tracepoint. This especially helps when tracing the flow of requests
through the HW.

v2: Limit to in/out HW events, not all general request tracepoints.
v3: ifdeffery

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_trace.h           | 19 ++++++++++++-------
 drivers/gpu/drm/i915/intel_guc_submission.c |  2 +-
 drivers/gpu/drm/i915/intel_lrc.c            |  2 +-
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 408827bf5d96..1de3cf442e36 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -691,6 +691,8 @@ DECLARE_EVENT_CLASS(i915_request_hw,
 				     __field(u32, seqno)
 				     __field(u32, global_seqno)
 				     __field(u32, port)
+				     __field(u32, prio)
+				     __field(u32, completed)
 				    ),
 
 		    TP_fast_assign(
@@ -701,12 +703,15 @@ DECLARE_EVENT_CLASS(i915_request_hw,
 				   __entry->seqno = rq->fence.seqno;
 				   __entry->global_seqno = rq->global_seqno;
 				   __entry->port = port;
+				   __entry->prio = rq->sched.attr.priority;
+				   __entry->completed = i915_request_completed(rq);
 				  ),
 
-		    TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, global=%u, port=%u",
+		    TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, prio=%u, global=%u, port=%u, completed?=%d",
 			      __entry->dev, __entry->hw_id, __entry->ring,
-			      __entry->ctx, __entry->seqno,
-			      __entry->global_seqno, __entry->port)
+			      __entry->ctx, __entry->seqno, __entry->prio,
+			      __entry->global_seqno, __entry->port,
+			      __entry->completed)
 );
 
 DEFINE_EVENT(i915_request_hw, i915_request_in,
@@ -714,9 +719,9 @@ DEFINE_EVENT(i915_request_hw, i915_request_in,
 	     TP_ARGS(rq, port)
 );
 
-DEFINE_EVENT(i915_request, i915_request_out,
-	     TP_PROTO(struct i915_request *rq),
-	     TP_ARGS(rq)
+DEFINE_EVENT(i915_request_hw, i915_request_out,
+	     TP_PROTO(struct i915_request *rq, unsigned int port),
+	     TP_ARGS(rq, port)
 );
 #else
 #if !defined(TRACE_HEADER_MULTI_READ)
@@ -736,7 +741,7 @@ trace_i915_request_in(struct i915_request *rq, unsigned int port)
 }
 
 static inline void
-trace_i915_request_out(struct i915_request *rq)
+trace_i915_request_out(struct i915_request *rq, unsigned int port)
 {
 }
 #endif
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index c6bb5bebddfc..bd440687892a 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -762,7 +762,7 @@ static void guc_submission_tasklet(unsigned long data)
 
 	rq = port_request(port);
 	while (rq && i915_request_completed(rq)) {
-		trace_i915_request_out(rq);
+		trace_i915_request_out(rq, 0);
 		i915_request_put(rq);
 
 		port = execlists_port_complete(execlists, port);
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index ffc74f562f77..396d9596d0aa 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -402,7 +402,7 @@ execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
 {
 	intel_engine_context_out(rq->engine);
 	execlists_context_status_change(rq, status);
-	trace_i915_request_out(rq);
+	trace_i915_request_out(rq, 0);
 }
 
 static void
-- 
2.17.0

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

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

* Re: [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints
  2018-05-01 15:26   ` Tvrtko Ursulin
@ 2018-05-01 15:41     ` Tvrtko Ursulin
  2018-05-01 15:43       ` Chris Wilson
  0 siblings, 1 reply; 12+ messages in thread
From: Tvrtko Ursulin @ 2018-05-01 15:41 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 01/05/2018 16:26, Tvrtko Ursulin wrote:
> 
> On 01/05/2018 16:13, Chris Wilson wrote:
>> Include a bool to show whether the request is complete in every
>> tracepoint. This especially helps when tracing the flow of requests
>> through the HW.
>>
>> v2: Limit to in/out HW events, not all general request tracepoints.
>>
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> ---
>>   drivers/gpu/drm/i915/i915_trace.h           | 17 +++++++++++------
>>   drivers/gpu/drm/i915/intel_guc_submission.c |  2 +-
>>   drivers/gpu/drm/i915/intel_lrc.c            |  2 +-
>>   3 files changed, 13 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_trace.h 
>> b/drivers/gpu/drm/i915/i915_trace.h
>> index 408827bf5d96..66956af25da3 100644
>> --- a/drivers/gpu/drm/i915/i915_trace.h
>> +++ b/drivers/gpu/drm/i915/i915_trace.h
>> @@ -691,6 +691,8 @@ DECLARE_EVENT_CLASS(i915_request_hw,
>>                        __field(u32, seqno)
>>                        __field(u32, global_seqno)
>>                        __field(u32, port)
>> +                     __field(u32, prio)
>> +                     __field(u32, completed)
>>                       ),
>>               TP_fast_assign(
>> @@ -701,12 +703,15 @@ DECLARE_EVENT_CLASS(i915_request_hw,
>>                      __entry->seqno = rq->fence.seqno;
>>                      __entry->global_seqno = rq->global_seqno;
>>                      __entry->port = port;
>> +                   __entry->prio = rq->sched.attr.priority;
>> +                   __entry->completed = i915_request_completed(rq);
>>                     ),
>> -            TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, 
>> global=%u, port=%u",
>> +            TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, 
>> prio=%u, global=%u, port=%u, completed?=%d",
>>                     __entry->dev, __entry->hw_id, __entry->ring,
>> -                  __entry->ctx, __entry->seqno,
>> -                  __entry->global_seqno, __entry->port)
>> +                  __entry->ctx, __entry->seqno, __entry->prio,
>> +                  __entry->global_seqno, __entry->port,
>> +                  __entry->completed)
>>   );
>>   DEFINE_EVENT(i915_request_hw, i915_request_in,
>> @@ -714,9 +719,9 @@ DEFINE_EVENT(i915_request_hw, i915_request_in,
>>            TP_ARGS(rq, port)
>>   );
>> -DEFINE_EVENT(i915_request, i915_request_out,
>> -         TP_PROTO(struct i915_request *rq),
>> -         TP_ARGS(rq)
>> +DEFINE_EVENT(i915_request_hw, i915_request_out,
>> +         TP_PROTO(struct i915_request *rq, unsigned int port),
>> +         TP_ARGS(rq, port)
>>   );
>>   #else
>>   #if !defined(TRACE_HEADER_MULTI_READ)
>> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c 
>> b/drivers/gpu/drm/i915/intel_guc_submission.c
>> index c6bb5bebddfc..bd440687892a 100644
>> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
>> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
>> @@ -762,7 +762,7 @@ static void guc_submission_tasklet(unsigned long 
>> data)
>>       rq = port_request(port);
>>       while (rq && i915_request_completed(rq)) {
>> -        trace_i915_request_out(rq);
>> +        trace_i915_request_out(rq, 0);
>>           i915_request_put(rq);
>>           port = execlists_port_complete(execlists, port);
>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c 
>> b/drivers/gpu/drm/i915/intel_lrc.c
>> index ffc74f562f77..396d9596d0aa 100644
>> --- a/drivers/gpu/drm/i915/intel_lrc.c
>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
>> @@ -402,7 +402,7 @@ execlists_context_schedule_out(struct i915_request 
>> *rq, unsigned long status)
>>   {
>>       intel_engine_context_out(rq->engine);
>>       execlists_context_status_change(rq, status);
>> -    trace_i915_request_out(rq);
>> +    trace_i915_request_out(rq, 0);
>>   }
>>   static void
>>
> 
> Another one! :) For simplicity:
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Well actually on a second thought I think it would be tidier to define 
in and out separately so not to pollute the logs with pointless fields. 
If you are busy I am happy to do that.

Regards,

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

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

* Re: [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints
  2018-05-01 15:41     ` Tvrtko Ursulin
@ 2018-05-01 15:43       ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-05-01 15:43 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx

Quoting Tvrtko Ursulin (2018-05-01 16:41:15)
> 
> On 01/05/2018 16:26, Tvrtko Ursulin wrote:
> > 
> > On 01/05/2018 16:13, Chris Wilson wrote:
> >> Include a bool to show whether the request is complete in every
> >> tracepoint. This especially helps when tracing the flow of requests
> >> through the HW.
> >>
> >> v2: Limit to in/out HW events, not all general request tracepoints.
> >>
> >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >> ---
> >>   drivers/gpu/drm/i915/i915_trace.h           | 17 +++++++++++------
> >>   drivers/gpu/drm/i915/intel_guc_submission.c |  2 +-
> >>   drivers/gpu/drm/i915/intel_lrc.c            |  2 +-
> >>   3 files changed, 13 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/i915_trace.h 
> >> b/drivers/gpu/drm/i915/i915_trace.h
> >> index 408827bf5d96..66956af25da3 100644
> >> --- a/drivers/gpu/drm/i915/i915_trace.h
> >> +++ b/drivers/gpu/drm/i915/i915_trace.h
> >> @@ -691,6 +691,8 @@ DECLARE_EVENT_CLASS(i915_request_hw,
> >>                        __field(u32, seqno)
> >>                        __field(u32, global_seqno)
> >>                        __field(u32, port)
> >> +                     __field(u32, prio)
> >> +                     __field(u32, completed)
> >>                       ),
> >>               TP_fast_assign(
> >> @@ -701,12 +703,15 @@ DECLARE_EVENT_CLASS(i915_request_hw,
> >>                      __entry->seqno = rq->fence.seqno;
> >>                      __entry->global_seqno = rq->global_seqno;
> >>                      __entry->port = port;
> >> +                   __entry->prio = rq->sched.attr.priority;
> >> +                   __entry->completed = i915_request_completed(rq);
> >>                     ),
> >> -            TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, 
> >> global=%u, port=%u",
> >> +            TP_printk("dev=%u, hw_id=%u, ring=%u, ctx=%u, seqno=%u, 
> >> prio=%u, global=%u, port=%u, completed?=%d",
> >>                     __entry->dev, __entry->hw_id, __entry->ring,
> >> -                  __entry->ctx, __entry->seqno,
> >> -                  __entry->global_seqno, __entry->port)
> >> +                  __entry->ctx, __entry->seqno, __entry->prio,
> >> +                  __entry->global_seqno, __entry->port,
> >> +                  __entry->completed)
> >>   );
> >>   DEFINE_EVENT(i915_request_hw, i915_request_in,
> >> @@ -714,9 +719,9 @@ DEFINE_EVENT(i915_request_hw, i915_request_in,
> >>            TP_ARGS(rq, port)
> >>   );
> >> -DEFINE_EVENT(i915_request, i915_request_out,
> >> -         TP_PROTO(struct i915_request *rq),
> >> -         TP_ARGS(rq)
> >> +DEFINE_EVENT(i915_request_hw, i915_request_out,
> >> +         TP_PROTO(struct i915_request *rq, unsigned int port),
> >> +         TP_ARGS(rq, port)
> >>   );
> >>   #else
> >>   #if !defined(TRACE_HEADER_MULTI_READ)
> >> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c 
> >> b/drivers/gpu/drm/i915/intel_guc_submission.c
> >> index c6bb5bebddfc..bd440687892a 100644
> >> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> >> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> >> @@ -762,7 +762,7 @@ static void guc_submission_tasklet(unsigned long 
> >> data)
> >>       rq = port_request(port);
> >>       while (rq && i915_request_completed(rq)) {
> >> -        trace_i915_request_out(rq);
> >> +        trace_i915_request_out(rq, 0);
> >>           i915_request_put(rq);
> >>           port = execlists_port_complete(execlists, port);
> >> diff --git a/drivers/gpu/drm/i915/intel_lrc.c 
> >> b/drivers/gpu/drm/i915/intel_lrc.c
> >> index ffc74f562f77..396d9596d0aa 100644
> >> --- a/drivers/gpu/drm/i915/intel_lrc.c
> >> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> >> @@ -402,7 +402,7 @@ execlists_context_schedule_out(struct i915_request 
> >> *rq, unsigned long status)
> >>   {
> >>       intel_engine_context_out(rq->engine);
> >>       execlists_context_status_change(rq, status);
> >> -    trace_i915_request_out(rq);
> >> +    trace_i915_request_out(rq, 0);
> >>   }
> >>   static void
> >>
> > 
> > Another one! :) For simplicity:
> > 
> > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Well actually on a second thought I think it would be tidier to define 
> in and out separately so not to pollute the logs with pointless fields. 
> If you are busy I am happy to do that.

If your fingers are on the keyboard already, go for it.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption (rev2)
  2018-05-01 15:13 [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Chris Wilson
  2018-05-01 15:13 ` [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints Chris Wilson
  2018-05-01 15:26 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Patchwork
@ 2018-05-01 16:05 ` Patchwork
  2018-05-01 16:59 ` ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-05-01 16:05 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption (rev2)
URL   : https://patchwork.freedesktop.org/series/42522/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4116 -> Patchwork_8861 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/42522/revisions/2/mbox/

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s4-devices:
      fi-kbl-7500u:       PASS -> DMESG-WARN (fdo#105128)

    igt@gem_mmap_gtt@basic-small-bo-tiledx:
      fi-gdg-551:         PASS -> FAIL (fdo#102575)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-4200u:       PASS -> DMESG-FAIL (fdo#106103)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-ivb-3520m:       PASS -> DMESG-WARN (fdo#106084)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-ivb-3520m:       DMESG-WARN (fdo#106084) -> PASS
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

    
  fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
  fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103


== Participating hosts (38 -> 34) ==

  Missing    (4): fi-byt-j1900 fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq 


== Build changes ==

    * Linux: CI_DRM_4116 -> Patchwork_8861

  CI_DRM_4116: 7ff375cb94000d93f7a9d541cb0c8180fbea80f2 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4453: 29ae12bd764e3b1876356e7628a32192b4ec9066 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8861: 24aba802ddc4ec95fb627dbd63d636bb3fdb1857 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4453: d0a0bca2194a673c4d9a70a2256837c59213c64b @ git://anongit.freedesktop.org/piglit


== Linux commits ==

24aba802ddc4 drm/i915: Include completed status in HW request tracepoints
04fff5705b58 drm/i915/execlists: Emit i915_trace_request_out for preemption

== Logs ==

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

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

* Re: [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints
  2018-05-01 15:13 ` [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints Chris Wilson
  2018-05-01 15:26   ` Tvrtko Ursulin
  2018-05-01 15:34   ` [PATCH v3] " Chris Wilson
@ 2018-05-01 16:05   ` kbuild test robot
  2 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2018-05-01 16:05 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, kbuild-all

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

Hi Chris,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20180501]
[cannot apply to v4.17-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-execlists-Emit-i915_trace_request_out-for-preemption/20180501-233343
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x011-201817 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/intel_lrc.c: In function 'execlists_context_schedule_out':
>> drivers/gpu/drm/i915/intel_lrc.c:404:2: error: too many arguments to function 'trace_i915_request_out'
     trace_i915_request_out(rq, 0);
     ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/i915/i915_drv.h:2668:0,
                    from drivers/gpu/drm/i915/intel_lrc.c:138:
   drivers/gpu/drm/i915/i915_trace.h:744:1: note: declared here
    trace_i915_request_out(struct i915_request *rq)
    ^~~~~~~~~~~~~~~~~~~~~~
--
   drivers/gpu/drm/i915/intel_guc_submission.c: In function 'guc_submission_tasklet':
>> drivers/gpu/drm/i915/intel_guc_submission.c:763:3: error: too many arguments to function 'trace_i915_request_out'
      trace_i915_request_out(rq, 0);
      ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/i915/i915_drv.h:2668:0,
                    from drivers/gpu/drm/i915/intel_guc_submission.c:30:
   drivers/gpu/drm/i915/i915_trace.h:744:1: note: declared here
    trace_i915_request_out(struct i915_request *rq)
    ^~~~~~~~~~~~~~~~~~~~~~

vim +/trace_i915_request_out +404 drivers/gpu/drm/i915/intel_lrc.c

   398	
   399	static inline void
   400	execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
   401	{
   402		intel_engine_context_out(rq->engine);
   403		execlists_context_status_change(rq, status);
 > 404		trace_i915_request_out(rq, 0);
   405	}
   406	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33254 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

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

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

* ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption (rev2)
  2018-05-01 15:13 [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Chris Wilson
                   ` (2 preceding siblings ...)
  2018-05-01 16:05 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption (rev2) Patchwork
@ 2018-05-01 16:59 ` Patchwork
  3 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-05-01 16:59 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption (rev2)
URL   : https://patchwork.freedesktop.org/series/42522/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4116_full -> Patchwork_8861_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_8861_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_8861_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/42522/revisions/2/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-blt:
      shard-kbl:          PASS -> SKIP +1

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_setmode@basic:
      shard-kbl:          PASS -> FAIL (fdo#99912)

    
    ==== Possible fixes ====

    igt@kms_flip@2x-plain-flip-ts-check:
      shard-hsw:          FAIL (fdo#103928) -> PASS

    igt@kms_flip@flip-vs-blocking-wf-vblank:
      shard-kbl:          DMESG-FAIL (fdo#103558) -> PASS +1

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#102887) -> PASS

    igt@kms_flip@modeset-vs-vblank-race-interruptible:
      shard-kbl:          DMESG-WARN (fdo#105602, fdo#103558, fdo#103313) -> PASS

    igt@kms_flip@plain-flip-fb-recreate-interruptible:
      shard-glk:          FAIL (fdo#100368) -> PASS +1

    igt@kms_flip_event_leak:
      shard-kbl:          DMESG-WARN (fdo#105602, fdo#103558) -> PASS +33

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
  fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (9 -> 8) ==

  Missing    (1): shard-glkb 


== Build changes ==

    * Linux: CI_DRM_4116 -> Patchwork_8861

  CI_DRM_4116: 7ff375cb94000d93f7a9d541cb0c8180fbea80f2 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4453: 29ae12bd764e3b1876356e7628a32192b4ec9066 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8861: 24aba802ddc4ec95fb627dbd63d636bb3fdb1857 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4453: d0a0bca2194a673c4d9a70a2256837c59213c64b @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* Re: [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption
  2018-05-01 13:41 [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Chris Wilson
@ 2018-05-01 14:37 ` Tvrtko Ursulin
  0 siblings, 0 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2018-05-01 14:37 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 01/05/2018 14:41, Chris Wilson wrote:
> Move the tracepoint into the common execlists_context_schedule_out() and
> call it from preemption completion as well. A small bit of refactoring
> code should help with when tracing, or else we end up with requests
> mysteriously disappearing and some being emitted to HW multiple times.
> 
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_lrc.c | 19 +++++++++----------
>   1 file changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 57396a2a6ea2..ffc74f562f77 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -398,10 +398,11 @@ execlists_context_schedule_in(struct i915_request *rq)
>   }
>   
>   static inline void
> -execlists_context_schedule_out(struct i915_request *rq)
> +execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
>   {
>   	intel_engine_context_out(rq->engine);
> -	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
> +	execlists_context_status_change(rq, status);
> +	trace_i915_request_out(rq);
>   }
>   
>   static void
> @@ -772,12 +773,10 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists)
>   			  intel_engine_get_seqno(rq->engine));
>   
>   		GEM_BUG_ON(!execlists->active);
> -		intel_engine_context_out(rq->engine);
> -
> -		execlists_context_status_change(rq,
> -						i915_request_completed(rq) ?
> -						INTEL_CONTEXT_SCHEDULE_OUT :
> -						INTEL_CONTEXT_SCHEDULE_PREEMPTED);
> +		execlists_context_schedule_out(rq,
> +					       i915_request_completed(rq) ?
> +					       INTEL_CONTEXT_SCHEDULE_OUT :
> +					       INTEL_CONTEXT_SCHEDULE_PREEMPTED);
>   
>   		i915_request_put(rq);
>   
> @@ -1105,8 +1104,8 @@ static void execlists_submission_tasklet(unsigned long data)
>   				 */
>   				GEM_BUG_ON(!i915_request_completed(rq));
>   
> -				execlists_context_schedule_out(rq);
> -				trace_i915_request_out(rq);
> +				execlists_context_schedule_out(rq,
> +							       INTEL_CONTEXT_SCHEDULE_OUT);
>   				i915_request_put(rq);
>   
>   				GEM_TRACE("%s completed ctx=%d\n",
> 

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

Regards,

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

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

* [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption
@ 2018-05-01 13:41 Chris Wilson
  2018-05-01 14:37 ` Tvrtko Ursulin
  0 siblings, 1 reply; 12+ messages in thread
From: Chris Wilson @ 2018-05-01 13:41 UTC (permalink / raw)
  To: intel-gfx

Move the tracepoint into the common execlists_context_schedule_out() and
call it from preemption completion as well. A small bit of refactoring
code should help with when tracing, or else we end up with requests
mysteriously disappearing and some being emitted to HW multiple times.

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 57396a2a6ea2..ffc74f562f77 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -398,10 +398,11 @@ execlists_context_schedule_in(struct i915_request *rq)
 }
 
 static inline void
-execlists_context_schedule_out(struct i915_request *rq)
+execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
 {
 	intel_engine_context_out(rq->engine);
-	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
+	execlists_context_status_change(rq, status);
+	trace_i915_request_out(rq);
 }
 
 static void
@@ -772,12 +773,10 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists)
 			  intel_engine_get_seqno(rq->engine));
 
 		GEM_BUG_ON(!execlists->active);
-		intel_engine_context_out(rq->engine);
-
-		execlists_context_status_change(rq,
-						i915_request_completed(rq) ?
-						INTEL_CONTEXT_SCHEDULE_OUT :
-						INTEL_CONTEXT_SCHEDULE_PREEMPTED);
+		execlists_context_schedule_out(rq,
+					       i915_request_completed(rq) ?
+					       INTEL_CONTEXT_SCHEDULE_OUT :
+					       INTEL_CONTEXT_SCHEDULE_PREEMPTED);
 
 		i915_request_put(rq);
 
@@ -1105,8 +1104,8 @@ static void execlists_submission_tasklet(unsigned long data)
 				 */
 				GEM_BUG_ON(!i915_request_completed(rq));
 
-				execlists_context_schedule_out(rq);
-				trace_i915_request_out(rq);
+				execlists_context_schedule_out(rq,
+							       INTEL_CONTEXT_SCHEDULE_OUT);
 				i915_request_put(rq);
 
 				GEM_TRACE("%s completed ctx=%d\n",
-- 
2.17.0

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

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

end of thread, other threads:[~2018-05-01 16:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 15:13 [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Chris Wilson
2018-05-01 15:13 ` [PATCH 2/2] drm/i915: Include completed status in HW request tracepoints Chris Wilson
2018-05-01 15:26   ` Tvrtko Ursulin
2018-05-01 15:41     ` Tvrtko Ursulin
2018-05-01 15:43       ` Chris Wilson
2018-05-01 15:34   ` [PATCH v3] " Chris Wilson
2018-05-01 16:05   ` [PATCH 2/2] " kbuild test robot
2018-05-01 15:26 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Patchwork
2018-05-01 16:05 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption (rev2) Patchwork
2018-05-01 16:59 ` ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2018-05-01 13:41 [PATCH 1/2] drm/i915/execlists: Emit i915_trace_request_out for preemption Chris Wilson
2018-05-01 14:37 ` Tvrtko Ursulin

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.