All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
@ 2018-08-08 15:14 Tvrtko Ursulin
  2018-08-08 15:20 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (11 more replies)
  0 siblings, 12 replies; 22+ messages in thread
From: Tvrtko Ursulin @ 2018-08-08 15:14 UTC (permalink / raw)
  To: Intel-gfx

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

Keep the user interrupt enabled and emit intel_engine_notify tracepoint
every time as long as it is enabled.

Premise is that if someone is listening, they want to see interrupts
logged.

We use tracepoint (de)registration callbacks to enable user interrupts on
all devices (future proofing and avoiding ugly global pointers) and all
engines.

For this to work we also have to add another call site of
trace_intel_engine_notify, notably to the early return from notify_ring
otherwise we still depend on waiters being present.

v2:
 * Improve makefile. (Chris Wilson)
 * Simplify by dropping the pointeless global driver list. (Chris Wilson)
 * Emit tracepoint when there are no waiters, not just the user interrupt.
 * Commit message tidy.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Cc: svetlana.kukanova@intel.com
---
 drivers/gpu/drm/i915/Makefile       |  3 +
 drivers/gpu/drm/i915/i915_drv.c     |  5 ++
 drivers/gpu/drm/i915/i915_drv.h     |  2 +
 drivers/gpu/drm/i915/i915_irq.c     |  4 +-
 drivers/gpu/drm/i915/i915_trace.h   | 50 ++++++++-------
 drivers/gpu/drm/i915/i915_tracing.c | 98 +++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_tracing.h | 13 ++++
 7 files changed, 151 insertions(+), 24 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_tracing.c
 create mode 100644 drivers/gpu/drm/i915/i915_tracing.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 5794f102f9b8..dfc940b32078 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -182,6 +182,9 @@ i915-y += i915_perf.o \
 	  i915_oa_cnl.o \
 	  i915_oa_icl.o
 
+# tracing
+i915-$(CONFIG_TRACEPOINTS) += i915_tracing.o
+
 ifeq ($(CONFIG_DRM_I915_GVT),y)
 i915-y += intel_gvt.o
 include $(src)/gvt/Makefile
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9dce55182c3a..03e224ebc28c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1281,6 +1281,9 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
 	 */
 	if (INTEL_INFO(dev_priv)->num_pipes)
 		drm_kms_helper_poll_init(dev);
+
+	/* Notify our tracepoints driver has been registered. */
+	i915_tracing_register(dev_priv);
 }
 
 /**
@@ -1292,6 +1295,8 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
 	intel_fbdev_unregister(dev_priv);
 	intel_audio_deinit(dev_priv);
 
+	i915_tracing_unregister(dev_priv);
+
 	/*
 	 * After flushing the fbdev (incl. a late async config which will
 	 * have delayed queuing of a hotplug event), then flush the hotplug
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 0b10a30b7d96..a15f8be0ece0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2141,6 +2141,8 @@ struct drm_i915_private {
 
 	struct i915_pmu pmu;
 
+	struct list_head driver_list_link;
+
 	/*
 	 * NOTE: This is the dri1/ums dungeon, don't add stuff here. Your patch
 	 * will be rejected. Instead look for a better place.
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 8084e35b25c5..8cba798b666d 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1159,8 +1159,10 @@ static void notify_ring(struct intel_engine_cs *engine)
 	struct task_struct *tsk = NULL;
 	struct intel_wait *wait;
 
-	if (unlikely(!engine->breadcrumbs.irq_armed))
+	if (unlikely(!engine->breadcrumbs.irq_armed)) {
+		trace_intel_engine_notify(engine, false);
 		return;
+	}
 
 	rcu_read_lock();
 
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index c0352a1b036c..12555d2388fd 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -8,6 +8,7 @@
 
 #include <drm/drmP.h>
 #include "i915_drv.h"
+#include "i915_tracing.h"
 #include "intel_drv.h"
 #include "intel_ringbuffer.h"
 
@@ -750,29 +751,32 @@ TRACE_EVENT(i915_request_out,
 			      __entry->global_seqno, __entry->completed)
 );
 
-TRACE_EVENT(intel_engine_notify,
-	    TP_PROTO(struct intel_engine_cs *engine, bool waiters),
-	    TP_ARGS(engine, waiters),
-
-	    TP_STRUCT__entry(
-			     __field(u32, dev)
-			     __field(u16, class)
-			     __field(u16, instance)
-			     __field(u32, seqno)
-			     __field(bool, waiters)
-			     ),
-
-	    TP_fast_assign(
-			   __entry->dev = engine->i915->drm.primary->index;
-			   __entry->class = engine->uabi_class;
-			   __entry->instance = engine->instance;
-			   __entry->seqno = intel_engine_get_seqno(engine);
-			   __entry->waiters = waiters;
-			   ),
-
-	    TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
-		      __entry->dev, __entry->class, __entry->instance,
-		      __entry->seqno, __entry->waiters)
+TRACE_EVENT_FN(intel_engine_notify,
+	       TP_PROTO(struct intel_engine_cs *engine, bool waiters),
+	       TP_ARGS(engine, waiters),
+
+	       TP_STRUCT__entry(
+			        __field(u32, dev)
+			        __field(u16, class)
+			        __field(u16, instance)
+			        __field(u32, seqno)
+			        __field(bool, waiters)
+			        ),
+
+	       TP_fast_assign(
+			      __entry->dev = engine->i915->drm.primary->index;
+			      __entry->class = engine->uabi_class;
+			      __entry->instance = engine->instance;
+			      __entry->seqno = intel_engine_get_seqno(engine);
+			      __entry->waiters = waiters;
+			      ),
+
+	       TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
+			 __entry->dev, __entry->class, __entry->instance,
+			 __entry->seqno, __entry->waiters),
+
+	       intel_engine_notify_tracepoint_register,
+	       intel_engine_notify_tracepoint_unregister
 );
 
 DEFINE_EVENT(i915_request, i915_request_retire,
diff --git a/drivers/gpu/drm/i915/i915_tracing.c b/drivers/gpu/drm/i915/i915_tracing.c
new file mode 100644
index 000000000000..b7ca89fb61ce
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_tracing.c
@@ -0,0 +1,98 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ */
+
+#include "i915_tracing.h"
+
+#include "i915_drv.h"
+#include "intel_ringbuffer.h"
+
+static DEFINE_MUTEX(driver_list_lock);
+static LIST_HEAD(driver_list);
+static bool notify_enabled;
+
+static void __i915_enable_notify(struct drm_i915_private *i915)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
+	for_each_engine(engine, i915, id)
+		intel_engine_pin_breadcrumbs_irq(engine);
+}
+
+static void __i915_disable_notify(struct drm_i915_private *i915)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
+	for_each_engine(engine, i915, id)
+		intel_engine_unpin_breadcrumbs_irq(engine);
+}
+
+void i915_tracing_register(struct drm_i915_private *i915)
+{
+	INIT_LIST_HEAD(&i915->driver_list_link);
+
+	mutex_lock(&driver_list_lock);
+
+	list_add_tail(&i915->driver_list_link, &driver_list);
+
+	if (notify_enabled)
+		__i915_enable_notify(i915);
+
+	mutex_unlock(&driver_list_lock);
+}
+
+void i915_tracing_unregister(struct drm_i915_private *i915)
+{
+	mutex_lock(&driver_list_lock);
+
+	if (notify_enabled)
+		__i915_disable_notify(i915);
+
+	list_del(&i915->driver_list_link);
+
+	mutex_unlock(&driver_list_lock);
+}
+
+int intel_engine_notify_tracepoint_register(void)
+{
+	struct drm_i915_private *i915;
+
+	mutex_lock(&driver_list_lock);
+
+	GEM_BUG_ON(notify_enabled);
+
+	list_for_each_entry(i915, &driver_list, driver_list_link) {
+		intel_runtime_pm_get(i915);
+		__i915_enable_notify(i915);
+		intel_runtime_pm_put(i915);
+	}
+
+	notify_enabled = true;
+
+	mutex_unlock(&driver_list_lock);
+
+	return 0;
+}
+
+void intel_engine_notify_tracepoint_unregister(void)
+{
+	struct drm_i915_private *i915;
+
+	mutex_lock(&driver_list_lock);
+
+	GEM_BUG_ON(!notify_enabled);
+
+	list_for_each_entry(i915, &driver_list, driver_list_link) {
+		intel_runtime_pm_get(i915);
+		__i915_disable_notify(i915);
+		intel_runtime_pm_put(i915);
+	}
+
+	notify_enabled = false;
+
+	mutex_unlock(&driver_list_lock);
+}
diff --git a/drivers/gpu/drm/i915/i915_tracing.h b/drivers/gpu/drm/i915/i915_tracing.h
new file mode 100644
index 000000000000..f5ed92428ff1
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_tracing.h
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ */
+
+#include "i915_drv.h"
+
+void i915_tracing_register(struct drm_i915_private *i915);
+void i915_tracing_unregister(struct drm_i915_private *i915);
+
+int intel_engine_notify_tracepoint_register(void);
+void intel_engine_notify_tracepoint_unregister(void);
-- 
2.17.1

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

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

* ✗ Fi.CI.BAT: failure for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
@ 2018-08-08 15:20 ` Patchwork
  2018-08-08 15:34 ` [PATCH v2] " Chris Wilson
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-08 15:20 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
URL   : https://patchwork.freedesktop.org/series/47897/
State : failure

== Summary ==

Applying: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/i915_trace.h
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/i915_trace.h
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_trace.h
error: Failed to merge in the changes.
Patch failed at 0001 drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

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

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

* Re: [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
  2018-08-08 15:20 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-08-08 15:34 ` Chris Wilson
  2018-08-09  9:07   ` [PATCH v3] " Tvrtko Ursulin
  2018-08-09  9:29 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2) Patchwork
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Chris Wilson @ 2018-08-08 15:34 UTC (permalink / raw)
  To: Intel-gfx, Tvrtko Ursulin

Quoting Tvrtko Ursulin (2018-08-08 16:14:24)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Keep the user interrupt enabled and emit intel_engine_notify tracepoint
> every time as long as it is enabled.
> 
> Premise is that if someone is listening, they want to see interrupts
> logged.
> 
> We use tracepoint (de)registration callbacks to enable user interrupts on
> all devices (future proofing and avoiding ugly global pointers) and all
> engines.
> 
> For this to work we also have to add another call site of
> trace_intel_engine_notify, notably to the early return from notify_ring
> otherwise we still depend on waiters being present.

That confused me. "We use... For this to work" I took as meaning we
needed the tracepoint in the irq to enable the user interrupts. But what
you meant was that we always want to fire the irq tracepoint when it is

being traced, irrespective of clients waiting.
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 0b10a30b7d96..a15f8be0ece0 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2141,6 +2141,8 @@ struct drm_i915_private {
>  
>         struct i915_pmu pmu;
>  
> +       struct list_head driver_list_link;

Nit: mostly we keep to _list being the list_head, and _link being the
node. Also link tends to indicate which list it is in, e.g
obj->vma_list and vma->obj_link -- but you'll be forgiven if that's
confusing and you have a better idea.

So i915_tracing_driver_list and tracing_link ?

> +
>         /*
>          * NOTE: This is the dri1/ums dungeon, don't add stuff here. Your patch
>          * will be rejected. Instead look for a better place.
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 8084e35b25c5..8cba798b666d 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1159,8 +1159,10 @@ static void notify_ring(struct intel_engine_cs *engine)
>         struct task_struct *tsk = NULL;
>         struct intel_wait *wait;
>  
> -       if (unlikely(!engine->breadcrumbs.irq_armed))
> +       if (unlikely(!engine->breadcrumbs.irq_armed)) {
> +               trace_intel_engine_notify(engine, false);
>                 return;
> +       }
>  
>         rcu_read_lock();
>  
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index c0352a1b036c..12555d2388fd 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -8,6 +8,7 @@
>  
>  #include <drm/drmP.h>
>  #include "i915_drv.h"
> +#include "i915_tracing.h"
>  #include "intel_drv.h"
>  #include "intel_ringbuffer.h"
>  
> @@ -750,29 +751,32 @@ TRACE_EVENT(i915_request_out,
>                               __entry->global_seqno, __entry->completed)
>  );
>  
> -TRACE_EVENT(intel_engine_notify,
> -           TP_PROTO(struct intel_engine_cs *engine, bool waiters),
> -           TP_ARGS(engine, waiters),
> -
> -           TP_STRUCT__entry(
> -                            __field(u32, dev)
> -                            __field(u16, class)
> -                            __field(u16, instance)
> -                            __field(u32, seqno)
> -                            __field(bool, waiters)
> -                            ),
> -
> -           TP_fast_assign(
> -                          __entry->dev = engine->i915->drm.primary->index;
> -                          __entry->class = engine->uabi_class;
> -                          __entry->instance = engine->instance;
> -                          __entry->seqno = intel_engine_get_seqno(engine);
> -                          __entry->waiters = waiters;
> -                          ),
> -
> -           TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
> -                     __entry->dev, __entry->class, __entry->instance,
> -                     __entry->seqno, __entry->waiters)
> +TRACE_EVENT_FN(intel_engine_notify,
> +              TP_PROTO(struct intel_engine_cs *engine, bool waiters),
> +              TP_ARGS(engine, waiters),
> +
> +              TP_STRUCT__entry(
> +                               __field(u32, dev)
> +                               __field(u16, class)
> +                               __field(u16, instance)
> +                               __field(u32, seqno)
> +                               __field(bool, waiters)
> +                               ),
> +
> +              TP_fast_assign(
> +                             __entry->dev = engine->i915->drm.primary->index;
> +                             __entry->class = engine->uabi_class;
> +                             __entry->instance = engine->instance;
> +                             __entry->seqno = intel_engine_get_seqno(engine);
> +                             __entry->waiters = waiters;
> +                             ),
> +
> +              TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
> +                        __entry->dev, __entry->class, __entry->instance,
> +                        __entry->seqno, __entry->waiters),
> +
> +              intel_engine_notify_tracepoint_register,
> +              intel_engine_notify_tracepoint_unregister
>  );
>  
>  DEFINE_EVENT(i915_request, i915_request_retire,
> diff --git a/drivers/gpu/drm/i915/i915_tracing.c b/drivers/gpu/drm/i915/i915_tracing.c
> new file mode 100644
> index 000000000000..b7ca89fb61ce
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/i915_tracing.c
> @@ -0,0 +1,98 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright © 2018 Intel Corporation
> + *
> + */
> +
> +#include "i915_tracing.h"
> +
> +#include "i915_drv.h"
> +#include "intel_ringbuffer.h"
> +
> +static DEFINE_MUTEX(driver_list_lock);
> +static LIST_HEAD(driver_list);
> +static bool notify_enabled;
> +
> +static void __i915_enable_notify(struct drm_i915_private *i915)
> +{
> +       struct intel_engine_cs *engine;
> +       enum intel_engine_id id;
> +
> +       for_each_engine(engine, i915, id)
> +               intel_engine_pin_breadcrumbs_irq(engine);
> +}
> +
> +static void __i915_disable_notify(struct drm_i915_private *i915)
> +{
> +       struct intel_engine_cs *engine;
> +       enum intel_engine_id id;
> +
> +       for_each_engine(engine, i915, id)
> +               intel_engine_unpin_breadcrumbs_irq(engine);
> +}
> +
> +void i915_tracing_register(struct drm_i915_private *i915)
> +{
> +       INIT_LIST_HEAD(&i915->driver_list_link);
> +
> +       mutex_lock(&driver_list_lock);
> +
> +       list_add_tail(&i915->driver_list_link, &driver_list);
> +
> +       if (notify_enabled)
> +               __i915_enable_notify(i915);
> +
> +       mutex_unlock(&driver_list_lock);
> +}
> +
> +void i915_tracing_unregister(struct drm_i915_private *i915)
> +{
> +       mutex_lock(&driver_list_lock);
> +
> +       if (notify_enabled)
> +               __i915_disable_notify(i915);

The caller doesn't hold the rpm wakeref. I think it will be tidier to
push the rpm_get/rpm_put into
__i915_enable_notify/__i915_disable_notify.

> +
> +       list_del(&i915->driver_list_link);
> +
> +       mutex_unlock(&driver_list_lock);
> +}
> +
> +int intel_engine_notify_tracepoint_register(void)
> +{
> +       struct drm_i915_private *i915;
> +
> +       mutex_lock(&driver_list_lock);
> +
> +       GEM_BUG_ON(notify_enabled);
> +
> +       list_for_each_entry(i915, &driver_list, driver_list_link) {
> +               intel_runtime_pm_get(i915);
> +               __i915_enable_notify(i915);
> +               intel_runtime_pm_put(i915);
> +       }
> +
> +       notify_enabled = true;
> +
> +       mutex_unlock(&driver_list_lock);
> +
> +       return 0;
> +}
> +
> +void intel_engine_notify_tracepoint_unregister(void)
> +{
> +       struct drm_i915_private *i915;
> +
> +       mutex_lock(&driver_list_lock);
> +
> +       GEM_BUG_ON(!notify_enabled);
> +
> +       list_for_each_entry(i915, &driver_list, driver_list_link) {
> +               intel_runtime_pm_get(i915);
> +               __i915_disable_notify(i915);
> +               intel_runtime_pm_put(i915);
> +       }
> +
> +       notify_enabled = false;
> +
> +       mutex_unlock(&driver_list_lock);
> +}
> diff --git a/drivers/gpu/drm/i915/i915_tracing.h b/drivers/gpu/drm/i915/i915_tracing.h
> new file mode 100644
> index 000000000000..f5ed92428ff1
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/i915_tracing.h
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright © 2018 Intel Corporation
> + *
> + */
> +
> +#include "i915_drv.h"
> +

#if IS_ENABLED(CONFIG_TRACEPOINTS)

> +void i915_tracing_register(struct drm_i915_private *i915);
> +void i915_tracing_unregister(struct drm_i915_private *i915);
> +
> +int intel_engine_notify_tracepoint_register(void);
> +void intel_engine_notify_tracepoint_unregister(void);

#else

static inline void i915_tracing_register(struct drm_i915_private *i915) {}
static inline void i915_tracing_unregister(struct drm_i915_private *i915) {}

#endif

Otherwise, to the best of my knowledge this will just work. With the
fixes and any of the nits,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v3] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-08 15:34 ` [PATCH v2] " Chris Wilson
@ 2018-08-09  9:07   ` Tvrtko Ursulin
  2018-08-09  9:09     ` Tvrtko Ursulin
  2018-08-09  9:22     ` Chris Wilson
  0 siblings, 2 replies; 22+ messages in thread
From: Tvrtko Ursulin @ 2018-08-09  9:07 UTC (permalink / raw)
  To: Intel-gfx

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

Keep the user interrupt enabled and emit intel_engine_notify tracepoint
every time as long as it is enabled. Premise is that if someone is
listening, they want to see interrupts logged.

We use tracepoint (de)registration callbacks to enable user interrupts on
all devices (future proofing and avoiding ugly global pointers) and all
engines. And in the user interrupt handler we make sure
trace_intel_engine_notify is called even when there are no waiters.

v2:
 * Improve makefile. (Chris Wilson)
 * Simplify by dropping the pointeless global driver list. (Chris Wilson)
 * Emit tracepoint when there are no waiters, not just the user interrupt.
 * Commit message tidy.

v3:
 * Favour one return from notify_ring.
 Chris Wilson:
 * Reword commit message a bit for clarity.
 * Add RPM references to driver (un)registration paths.
 * Rename list link member.
 * Handle !CONFIG_TRACEPOINTS in the header.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Cc: svetlana.kukanova@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/Makefile       |   3 +
 drivers/gpu/drm/i915/i915_drv.c     |   5 ++
 drivers/gpu/drm/i915/i915_drv.h     |   2 +
 drivers/gpu/drm/i915/i915_irq.c     |   5 +-
 drivers/gpu/drm/i915/i915_trace.h   |  50 +++++++-------
 drivers/gpu/drm/i915/i915_tracing.c | 100 ++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_tracing.h |  29 ++++++++
 7 files changed, 169 insertions(+), 25 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_tracing.c
 create mode 100644 drivers/gpu/drm/i915/i915_tracing.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 5794f102f9b8..dfc940b32078 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -182,6 +182,9 @@ i915-y += i915_perf.o \
 	  i915_oa_cnl.o \
 	  i915_oa_icl.o
 
+# tracing
+i915-$(CONFIG_TRACEPOINTS) += i915_tracing.o
+
 ifeq ($(CONFIG_DRM_I915_GVT),y)
 i915-y += intel_gvt.o
 include $(src)/gvt/Makefile
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9dce55182c3a..03e224ebc28c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1281,6 +1281,9 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
 	 */
 	if (INTEL_INFO(dev_priv)->num_pipes)
 		drm_kms_helper_poll_init(dev);
+
+	/* Notify our tracepoints driver has been registered. */
+	i915_tracing_register(dev_priv);
 }
 
 /**
@@ -1292,6 +1295,8 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
 	intel_fbdev_unregister(dev_priv);
 	intel_audio_deinit(dev_priv);
 
+	i915_tracing_unregister(dev_priv);
+
 	/*
 	 * After flushing the fbdev (incl. a late async config which will
 	 * have delayed queuing of a hotplug event), then flush the hotplug
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 0b10a30b7d96..00d9e9f65739 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2141,6 +2141,8 @@ struct drm_i915_private {
 
 	struct i915_pmu pmu;
 
+	struct list_head tracing_link;
+
 	/*
 	 * NOTE: This is the dri1/ums dungeon, don't add stuff here. Your patch
 	 * will be rejected. Instead look for a better place.
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 8084e35b25c5..0f007a46249e 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1157,10 +1157,10 @@ static void notify_ring(struct intel_engine_cs *engine)
 	const u32 seqno = intel_engine_get_seqno(engine);
 	struct i915_request *rq = NULL;
 	struct task_struct *tsk = NULL;
-	struct intel_wait *wait;
+	struct intel_wait *wait = NULL;
 
 	if (unlikely(!engine->breadcrumbs.irq_armed))
-		return;
+		goto out;
 
 	rcu_read_lock();
 
@@ -1219,6 +1219,7 @@ static void notify_ring(struct intel_engine_cs *engine)
 
 	rcu_read_unlock();
 
+out:
 	trace_intel_engine_notify(engine, wait);
 }
 
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index b50c6b829715..212e7fc1e80e 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -8,6 +8,7 @@
 
 #include <drm/drmP.h>
 #include "i915_drv.h"
+#include "i915_tracing.h"
 #include "intel_drv.h"
 #include "intel_ringbuffer.h"
 
@@ -780,29 +781,32 @@ trace_i915_request_out(struct i915_request *rq)
 #endif
 #endif
 
-TRACE_EVENT(intel_engine_notify,
-	    TP_PROTO(struct intel_engine_cs *engine, bool waiters),
-	    TP_ARGS(engine, waiters),
-
-	    TP_STRUCT__entry(
-			     __field(u32, dev)
-			     __field(u16, class)
-			     __field(u16, instance)
-			     __field(u32, seqno)
-			     __field(bool, waiters)
-			     ),
-
-	    TP_fast_assign(
-			   __entry->dev = engine->i915->drm.primary->index;
-			   __entry->class = engine->uabi_class;
-			   __entry->instance = engine->instance;
-			   __entry->seqno = intel_engine_get_seqno(engine);
-			   __entry->waiters = waiters;
-			   ),
-
-	    TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
-		      __entry->dev, __entry->class, __entry->instance,
-		      __entry->seqno, __entry->waiters)
+TRACE_EVENT_FN(intel_engine_notify,
+	       TP_PROTO(struct intel_engine_cs *engine, bool waiters),
+	       TP_ARGS(engine, waiters),
+
+	       TP_STRUCT__entry(
+			        __field(u32, dev)
+			        __field(u16, class)
+			        __field(u16, instance)
+			        __field(u32, seqno)
+			        __field(bool, waiters)
+			        ),
+
+	       TP_fast_assign(
+			      __entry->dev = engine->i915->drm.primary->index;
+			      __entry->class = engine->uabi_class;
+			      __entry->instance = engine->instance;
+			      __entry->seqno = intel_engine_get_seqno(engine);
+			      __entry->waiters = waiters;
+			      ),
+
+	       TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
+			 __entry->dev, __entry->class, __entry->instance,
+			 __entry->seqno, __entry->waiters),
+
+	       intel_engine_notify_tracepoint_register,
+	       intel_engine_notify_tracepoint_unregister
 );
 
 DEFINE_EVENT(i915_request, i915_request_retire,
diff --git a/drivers/gpu/drm/i915/i915_tracing.c b/drivers/gpu/drm/i915/i915_tracing.c
new file mode 100644
index 000000000000..65074f0fcf95
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_tracing.c
@@ -0,0 +1,100 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ */
+
+#include "i915_tracing.h"
+
+#include "i915_drv.h"
+#include "intel_ringbuffer.h"
+
+static DEFINE_MUTEX(driver_list_lock);
+static LIST_HEAD(driver_list);
+static bool notify_enabled;
+
+static void __i915_enable_notify(struct drm_i915_private *i915)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id)
+		intel_engine_pin_breadcrumbs_irq(engine);
+
+	intel_runtime_pm_put(i915);
+}
+
+static void __i915_disable_notify(struct drm_i915_private *i915)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id)
+		intel_engine_unpin_breadcrumbs_irq(engine);
+
+	intel_runtime_pm_put(i915);
+}
+
+void i915_tracing_register(struct drm_i915_private *i915)
+{
+	INIT_LIST_HEAD(&i915->tracing_link);
+
+	mutex_lock(&driver_list_lock);
+
+	list_add_tail(&i915->tracing_link, &driver_list);
+
+	if (notify_enabled)
+		__i915_enable_notify(i915);
+
+	mutex_unlock(&driver_list_lock);
+}
+
+void i915_tracing_unregister(struct drm_i915_private *i915)
+{
+	mutex_lock(&driver_list_lock);
+
+	if (notify_enabled)
+		__i915_disable_notify(i915);
+
+	list_del(&i915->tracing_link);
+
+	mutex_unlock(&driver_list_lock);
+}
+
+int intel_engine_notify_tracepoint_register(void)
+{
+	struct drm_i915_private *i915;
+
+	mutex_lock(&driver_list_lock);
+
+	GEM_BUG_ON(notify_enabled);
+
+	list_for_each_entry(i915, &driver_list, tracing_link)
+		__i915_enable_notify(i915);
+
+	notify_enabled = true;
+
+	mutex_unlock(&driver_list_lock);
+
+	return 0;
+}
+
+void intel_engine_notify_tracepoint_unregister(void)
+{
+	struct drm_i915_private *i915;
+
+	mutex_lock(&driver_list_lock);
+
+	GEM_BUG_ON(!notify_enabled);
+
+	list_for_each_entry(i915, &driver_list, tracing_link)
+		__i915_disable_notify(i915);
+
+	notify_enabled = false;
+
+	mutex_unlock(&driver_list_lock);
+}
diff --git a/drivers/gpu/drm/i915/i915_tracing.h b/drivers/gpu/drm/i915/i915_tracing.h
new file mode 100644
index 000000000000..4d8710f5687b
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_tracing.h
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright © 2018 Intel Corporation
+ *
+ */
+#ifndef _I915_TRACING_H_
+#define _I915_TRACING_H_
+
+#if IS_ENABLED(CONFIG_TRACEPOINTS)
+
+#include "i915_drv.h"
+
+void i915_tracing_register(struct drm_i915_private *i915);
+void i915_tracing_unregister(struct drm_i915_private *i915);
+
+int intel_engine_notify_tracepoint_register(void);
+void intel_engine_notify_tracepoint_unregister(void);
+
+#else
+
+static inline void i915_tracing_register(struct drm_i915_private *i915) { }
+static inline void i915_tracing_unregister(struct drm_i915_private *i915) { }
+
+static inline int intel_engine_notify_tracepoint_register(void) { }
+static inline void intel_engine_notify_tracepoint_unregister(void) { }
+
+#endif
+
+#endif
-- 
2.17.1

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

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

* Re: [PATCH v3] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-09  9:07   ` [PATCH v3] " Tvrtko Ursulin
@ 2018-08-09  9:09     ` Tvrtko Ursulin
  2018-08-09  9:22     ` Chris Wilson
  1 sibling, 0 replies; 22+ messages in thread
From: Tvrtko Ursulin @ 2018-08-09  9:09 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx


On 09/08/2018 10:07, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Keep the user interrupt enabled and emit intel_engine_notify tracepoint
> every time as long as it is enabled. Premise is that if someone is
> listening, they want to see interrupts logged.
> 
> We use tracepoint (de)registration callbacks to enable user interrupts on
> all devices (future proofing and avoiding ugly global pointers) and all
> engines. And in the user interrupt handler we make sure
> trace_intel_engine_notify is called even when there are no waiters.
> 
> v2:
>   * Improve makefile. (Chris Wilson)
>   * Simplify by dropping the pointeless global driver list. (Chris Wilson)
>   * Emit tracepoint when there are no waiters, not just the user interrupt.
>   * Commit message tidy.
> 
> v3:
>   * Favour one return from notify_ring.
>   Chris Wilson:
>   * Reword commit message a bit for clarity.
>   * Add RPM references to driver (un)registration paths.
>   * Rename list link member.
>   * Handle !CONFIG_TRACEPOINTS in the header.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
> Cc: John Harrison <John.C.Harrison@intel.com>
> Cc: svetlana.kukanova@intel.com
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Also forgot to credit for tracepoint hooks discovery:

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

Regards,

Tvrtko

> ---
>   drivers/gpu/drm/i915/Makefile       |   3 +
>   drivers/gpu/drm/i915/i915_drv.c     |   5 ++
>   drivers/gpu/drm/i915/i915_drv.h     |   2 +
>   drivers/gpu/drm/i915/i915_irq.c     |   5 +-
>   drivers/gpu/drm/i915/i915_trace.h   |  50 +++++++-------
>   drivers/gpu/drm/i915/i915_tracing.c | 100 ++++++++++++++++++++++++++++
>   drivers/gpu/drm/i915/i915_tracing.h |  29 ++++++++
>   7 files changed, 169 insertions(+), 25 deletions(-)
>   create mode 100644 drivers/gpu/drm/i915/i915_tracing.c
>   create mode 100644 drivers/gpu/drm/i915/i915_tracing.h
> 
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 5794f102f9b8..dfc940b32078 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -182,6 +182,9 @@ i915-y += i915_perf.o \
>   	  i915_oa_cnl.o \
>   	  i915_oa_icl.o
>   
> +# tracing
> +i915-$(CONFIG_TRACEPOINTS) += i915_tracing.o
> +
>   ifeq ($(CONFIG_DRM_I915_GVT),y)
>   i915-y += intel_gvt.o
>   include $(src)/gvt/Makefile
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 9dce55182c3a..03e224ebc28c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1281,6 +1281,9 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
>   	 */
>   	if (INTEL_INFO(dev_priv)->num_pipes)
>   		drm_kms_helper_poll_init(dev);
> +
> +	/* Notify our tracepoints driver has been registered. */
> +	i915_tracing_register(dev_priv);
>   }
>   
>   /**
> @@ -1292,6 +1295,8 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
>   	intel_fbdev_unregister(dev_priv);
>   	intel_audio_deinit(dev_priv);
>   
> +	i915_tracing_unregister(dev_priv);
> +
>   	/*
>   	 * After flushing the fbdev (incl. a late async config which will
>   	 * have delayed queuing of a hotplug event), then flush the hotplug
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 0b10a30b7d96..00d9e9f65739 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2141,6 +2141,8 @@ struct drm_i915_private {
>   
>   	struct i915_pmu pmu;
>   
> +	struct list_head tracing_link;
> +
>   	/*
>   	 * NOTE: This is the dri1/ums dungeon, don't add stuff here. Your patch
>   	 * will be rejected. Instead look for a better place.
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 8084e35b25c5..0f007a46249e 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1157,10 +1157,10 @@ static void notify_ring(struct intel_engine_cs *engine)
>   	const u32 seqno = intel_engine_get_seqno(engine);
>   	struct i915_request *rq = NULL;
>   	struct task_struct *tsk = NULL;
> -	struct intel_wait *wait;
> +	struct intel_wait *wait = NULL;
>   
>   	if (unlikely(!engine->breadcrumbs.irq_armed))
> -		return;
> +		goto out;
>   
>   	rcu_read_lock();
>   
> @@ -1219,6 +1219,7 @@ static void notify_ring(struct intel_engine_cs *engine)
>   
>   	rcu_read_unlock();
>   
> +out:
>   	trace_intel_engine_notify(engine, wait);
>   }
>   
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index b50c6b829715..212e7fc1e80e 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -8,6 +8,7 @@
>   
>   #include <drm/drmP.h>
>   #include "i915_drv.h"
> +#include "i915_tracing.h"
>   #include "intel_drv.h"
>   #include "intel_ringbuffer.h"
>   
> @@ -780,29 +781,32 @@ trace_i915_request_out(struct i915_request *rq)
>   #endif
>   #endif
>   
> -TRACE_EVENT(intel_engine_notify,
> -	    TP_PROTO(struct intel_engine_cs *engine, bool waiters),
> -	    TP_ARGS(engine, waiters),
> -
> -	    TP_STRUCT__entry(
> -			     __field(u32, dev)
> -			     __field(u16, class)
> -			     __field(u16, instance)
> -			     __field(u32, seqno)
> -			     __field(bool, waiters)
> -			     ),
> -
> -	    TP_fast_assign(
> -			   __entry->dev = engine->i915->drm.primary->index;
> -			   __entry->class = engine->uabi_class;
> -			   __entry->instance = engine->instance;
> -			   __entry->seqno = intel_engine_get_seqno(engine);
> -			   __entry->waiters = waiters;
> -			   ),
> -
> -	    TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
> -		      __entry->dev, __entry->class, __entry->instance,
> -		      __entry->seqno, __entry->waiters)
> +TRACE_EVENT_FN(intel_engine_notify,
> +	       TP_PROTO(struct intel_engine_cs *engine, bool waiters),
> +	       TP_ARGS(engine, waiters),
> +
> +	       TP_STRUCT__entry(
> +			        __field(u32, dev)
> +			        __field(u16, class)
> +			        __field(u16, instance)
> +			        __field(u32, seqno)
> +			        __field(bool, waiters)
> +			        ),
> +
> +	       TP_fast_assign(
> +			      __entry->dev = engine->i915->drm.primary->index;
> +			      __entry->class = engine->uabi_class;
> +			      __entry->instance = engine->instance;
> +			      __entry->seqno = intel_engine_get_seqno(engine);
> +			      __entry->waiters = waiters;
> +			      ),
> +
> +	       TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
> +			 __entry->dev, __entry->class, __entry->instance,
> +			 __entry->seqno, __entry->waiters),
> +
> +	       intel_engine_notify_tracepoint_register,
> +	       intel_engine_notify_tracepoint_unregister
>   );
>   
>   DEFINE_EVENT(i915_request, i915_request_retire,
> diff --git a/drivers/gpu/drm/i915/i915_tracing.c b/drivers/gpu/drm/i915/i915_tracing.c
> new file mode 100644
> index 000000000000..65074f0fcf95
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/i915_tracing.c
> @@ -0,0 +1,100 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright © 2018 Intel Corporation
> + *
> + */
> +
> +#include "i915_tracing.h"
> +
> +#include "i915_drv.h"
> +#include "intel_ringbuffer.h"
> +
> +static DEFINE_MUTEX(driver_list_lock);
> +static LIST_HEAD(driver_list);
> +static bool notify_enabled;
> +
> +static void __i915_enable_notify(struct drm_i915_private *i915)
> +{
> +	struct intel_engine_cs *engine;
> +	enum intel_engine_id id;
> +
> +	intel_runtime_pm_get(i915);
> +
> +	for_each_engine(engine, i915, id)
> +		intel_engine_pin_breadcrumbs_irq(engine);
> +
> +	intel_runtime_pm_put(i915);
> +}
> +
> +static void __i915_disable_notify(struct drm_i915_private *i915)
> +{
> +	struct intel_engine_cs *engine;
> +	enum intel_engine_id id;
> +
> +	intel_runtime_pm_get(i915);
> +
> +	for_each_engine(engine, i915, id)
> +		intel_engine_unpin_breadcrumbs_irq(engine);
> +
> +	intel_runtime_pm_put(i915);
> +}
> +
> +void i915_tracing_register(struct drm_i915_private *i915)
> +{
> +	INIT_LIST_HEAD(&i915->tracing_link);
> +
> +	mutex_lock(&driver_list_lock);
> +
> +	list_add_tail(&i915->tracing_link, &driver_list);
> +
> +	if (notify_enabled)
> +		__i915_enable_notify(i915);
> +
> +	mutex_unlock(&driver_list_lock);
> +}
> +
> +void i915_tracing_unregister(struct drm_i915_private *i915)
> +{
> +	mutex_lock(&driver_list_lock);
> +
> +	if (notify_enabled)
> +		__i915_disable_notify(i915);
> +
> +	list_del(&i915->tracing_link);
> +
> +	mutex_unlock(&driver_list_lock);
> +}
> +
> +int intel_engine_notify_tracepoint_register(void)
> +{
> +	struct drm_i915_private *i915;
> +
> +	mutex_lock(&driver_list_lock);
> +
> +	GEM_BUG_ON(notify_enabled);
> +
> +	list_for_each_entry(i915, &driver_list, tracing_link)
> +		__i915_enable_notify(i915);
> +
> +	notify_enabled = true;
> +
> +	mutex_unlock(&driver_list_lock);
> +
> +	return 0;
> +}
> +
> +void intel_engine_notify_tracepoint_unregister(void)
> +{
> +	struct drm_i915_private *i915;
> +
> +	mutex_lock(&driver_list_lock);
> +
> +	GEM_BUG_ON(!notify_enabled);
> +
> +	list_for_each_entry(i915, &driver_list, tracing_link)
> +		__i915_disable_notify(i915);
> +
> +	notify_enabled = false;
> +
> +	mutex_unlock(&driver_list_lock);
> +}
> diff --git a/drivers/gpu/drm/i915/i915_tracing.h b/drivers/gpu/drm/i915/i915_tracing.h
> new file mode 100644
> index 000000000000..4d8710f5687b
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/i915_tracing.h
> @@ -0,0 +1,29 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright © 2018 Intel Corporation
> + *
> + */
> +#ifndef _I915_TRACING_H_
> +#define _I915_TRACING_H_
> +
> +#if IS_ENABLED(CONFIG_TRACEPOINTS)
> +
> +#include "i915_drv.h"
> +
> +void i915_tracing_register(struct drm_i915_private *i915);
> +void i915_tracing_unregister(struct drm_i915_private *i915);
> +
> +int intel_engine_notify_tracepoint_register(void);
> +void intel_engine_notify_tracepoint_unregister(void);
> +
> +#else
> +
> +static inline void i915_tracing_register(struct drm_i915_private *i915) { }
> +static inline void i915_tracing_unregister(struct drm_i915_private *i915) { }
> +
> +static inline int intel_engine_notify_tracepoint_register(void) { }
> +static inline void intel_engine_notify_tracepoint_unregister(void) { }
> +
> +#endif
> +
> +#endif
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v3] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-09  9:07   ` [PATCH v3] " Tvrtko Ursulin
  2018-08-09  9:09     ` Tvrtko Ursulin
@ 2018-08-09  9:22     ` Chris Wilson
  2018-08-09  9:31       ` Tvrtko Ursulin
  1 sibling, 1 reply; 22+ messages in thread
From: Chris Wilson @ 2018-08-09  9:22 UTC (permalink / raw)
  To: Intel-gfx, Tvrtko Ursulin

Quoting Tvrtko Ursulin (2018-08-09 10:07:51)
> diff --git a/drivers/gpu/drm/i915/i915_tracing.h b/drivers/gpu/drm/i915/i915_tracing.h
> new file mode 100644
> index 000000000000..4d8710f5687b
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/i915_tracing.h
> @@ -0,0 +1,29 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright © 2018 Intel Corporation
> + *
> + */
> +#ifndef _I915_TRACING_H_
> +#define _I915_TRACING_H_
> +
> +#if IS_ENABLED(CONFIG_TRACEPOINTS)
> +
> +#include "i915_drv.h"

Nit here. You can just have a struct drm_i915_private; forward decl,
that you need for both paths.

> +
> +void i915_tracing_register(struct drm_i915_private *i915);
> +void i915_tracing_unregister(struct drm_i915_private *i915);
> +
> +int intel_engine_notify_tracepoint_register(void);
> +void intel_engine_notify_tracepoint_unregister(void);
> +
> +#else
> +
> +static inline void i915_tracing_register(struct drm_i915_private *i915) { }
> +static inline void i915_tracing_unregister(struct drm_i915_private *i915) { }
> +
> +static inline int intel_engine_notify_tracepoint_register(void) { }
> +static inline void intel_engine_notify_tracepoint_unregister(void) { }
> +
> +#endif
> +
> +#endif
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
  2018-08-08 15:20 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2018-08-08 15:34 ` [PATCH v2] " Chris Wilson
@ 2018-08-09  9:29 ` Patchwork
  2018-08-09  9:30 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09  9:29 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2)
URL   : https://patchwork.freedesktop.org/series/47897/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
dea5a6eb6bc8 drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
-:155: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#155: FILE: drivers/gpu/drm/i915/i915_trace.h:788:
+	       TP_STRUCT__entry(

-:156: ERROR:CODE_INDENT: code indent should use tabs where possible
#156: FILE: drivers/gpu/drm/i915/i915_trace.h:789:
+^I^I^I        __field(u32, dev)$

-:157: ERROR:CODE_INDENT: code indent should use tabs where possible
#157: FILE: drivers/gpu/drm/i915/i915_trace.h:790:
+^I^I^I        __field(u16, class)$

-:158: ERROR:CODE_INDENT: code indent should use tabs where possible
#158: FILE: drivers/gpu/drm/i915/i915_trace.h:791:
+^I^I^I        __field(u16, instance)$

-:159: ERROR:CODE_INDENT: code indent should use tabs where possible
#159: FILE: drivers/gpu/drm/i915/i915_trace.h:792:
+^I^I^I        __field(u32, seqno)$

-:160: ERROR:CODE_INDENT: code indent should use tabs where possible
#160: FILE: drivers/gpu/drm/i915/i915_trace.h:793:
+^I^I^I        __field(bool, waiters)$

-:161: ERROR:CODE_INDENT: code indent should use tabs where possible
#161: FILE: drivers/gpu/drm/i915/i915_trace.h:794:
+^I^I^I        ),$

-:163: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#163: FILE: drivers/gpu/drm/i915/i915_trace.h:796:
+	       TP_fast_assign(

-:181: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#181: 
new file mode 100644

-:292: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#292: FILE: drivers/gpu/drm/i915/i915_tracing.h:1:
+// SPDX-License-Identifier: GPL-2.0

total: 6 errors, 2 warnings, 2 checks, 244 lines checked

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

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

* ✗ Fi.CI.SPARSE: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (2 preceding siblings ...)
  2018-08-09  9:29 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2) Patchwork
@ 2018-08-09  9:30 ` Patchwork
  2018-08-09  9:46 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09  9:30 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2)
URL   : https://patchwork.freedesktop.org/series/47897/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3675:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3677:16: warning: expression using sizeof(void)
+./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0)

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

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

* Re: [PATCH v3] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-09  9:22     ` Chris Wilson
@ 2018-08-09  9:31       ` Tvrtko Ursulin
  2018-08-09 10:01         ` [PATCH v4] " Tvrtko Ursulin
  0 siblings, 1 reply; 22+ messages in thread
From: Tvrtko Ursulin @ 2018-08-09  9:31 UTC (permalink / raw)
  To: Chris Wilson, Intel-gfx, Tvrtko Ursulin


On 09/08/2018 10:22, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-08-09 10:07:51)
>> diff --git a/drivers/gpu/drm/i915/i915_tracing.h b/drivers/gpu/drm/i915/i915_tracing.h
>> new file mode 100644
>> index 000000000000..4d8710f5687b
>> --- /dev/null
>> +++ b/drivers/gpu/drm/i915/i915_tracing.h
>> @@ -0,0 +1,29 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright © 2018 Intel Corporation
>> + *
>> + */
>> +#ifndef _I915_TRACING_H_
>> +#define _I915_TRACING_H_
>> +
>> +#if IS_ENABLED(CONFIG_TRACEPOINTS)
>> +
>> +#include "i915_drv.h"
> 
> Nit here. You can just have a struct drm_i915_private; forward decl,
> that you need for both paths.

Yes thanks, I'll do that.

I also need to add some comments to i915_tracing.c since it still looks 
rather like a prototype.

Regards,

Tvrtko


>> +
>> +void i915_tracing_register(struct drm_i915_private *i915);
>> +void i915_tracing_unregister(struct drm_i915_private *i915);
>> +
>> +int intel_engine_notify_tracepoint_register(void);
>> +void intel_engine_notify_tracepoint_unregister(void);
>> +
>> +#else
>> +
>> +static inline void i915_tracing_register(struct drm_i915_private *i915) { }
>> +static inline void i915_tracing_unregister(struct drm_i915_private *i915) { }
>> +
>> +static inline int intel_engine_notify_tracepoint_register(void) { }
>> +static inline void intel_engine_notify_tracepoint_unregister(void) { }
>> +
>> +#endif
>> +
>> +#endif
>>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (3 preceding siblings ...)
  2018-08-09  9:30 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-08-09  9:46 ` Patchwork
  2018-08-09 10:12 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3) Patchwork
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09  9:46 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2)
URL   : https://patchwork.freedesktop.org/series/47897/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4636 -> Patchwork_9901 =

== Summary - SUCCESS ==

  No regressions found.

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

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@gem_exec_suspend@basic-s3:
      {fi-kbl-soraka}:    NOTRUN -> INCOMPLETE

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      fi-skl-guc:         PASS -> DMESG-FAIL (fdo#107174)

    
    ==== Warnings ====

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         DMESG-WARN (fdo#107372) -> DMESG-FAIL (fdo#107372)

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

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


== Participating hosts (50 -> 48) ==

  Additional (2): fi-kbl-soraka fi-kbl-7560u 
  Missing    (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * Linux: CI_DRM_4636 -> Patchwork_9901

  CI_DRM_4636: 084bb2fb549650b6da80976c9bc594779ce342b4 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4590: e6ddaca7a8ea9d3d27f0ecaa36b357cc02e2df3b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9901: dea5a6eb6bc8e92a386e9d9e5aedbffa26981d34 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

dea5a6eb6bc8 drm/i915/tracing: Enable user interrupts while intel_engine_notify is active

== Logs ==

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

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

* [PATCH v4] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-09  9:31       ` Tvrtko Ursulin
@ 2018-08-09 10:01         ` Tvrtko Ursulin
  2018-08-09 10:04           ` Chris Wilson
                             ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Tvrtko Ursulin @ 2018-08-09 10:01 UTC (permalink / raw)
  To: Intel-gfx

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

Keep the user interrupt enabled and emit intel_engine_notify tracepoint
every time as long as it is enabled. Premise is that if someone is
listening, they want to see interrupts logged.

We use tracepoint (de)registration callbacks to enable user interrupts on
all devices (future proofing and avoiding ugly global pointers) and all
engines. And in the user interrupt handler we make sure
trace_intel_engine_notify is called even when there are no waiters.

v2:
 * Improve makefile. (Chris Wilson)
 * Simplify by dropping the pointeless global driver list. (Chris Wilson)
 * Emit tracepoint when there are no waiters, not just the user interrupt.
 * Commit message tidy.

v3:
 * Favour one return from notify_ring.
 Chris Wilson:
 * Reword commit message a bit for clarity.
 * Add RPM references to driver (un)registration paths.
 * Rename list link member.
 * Handle !CONFIG_TRACEPOINTS in the header.

v4:
 * I forgot to add comments while removing the RFC status.
 * License header tidy.
 * Forward declaration of drm_i915_private is enough. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Cc: svetlana.kukanova@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/Makefile       |   3 +
 drivers/gpu/drm/i915/i915_drv.c     |   5 +
 drivers/gpu/drm/i915/i915_drv.h     |   2 +
 drivers/gpu/drm/i915/i915_irq.c     |   5 +-
 drivers/gpu/drm/i915/i915_trace.h   |  50 +++++-----
 drivers/gpu/drm/i915/i915_tracing.c | 137 ++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_tracing.h |  30 ++++++
 7 files changed, 207 insertions(+), 25 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_tracing.c
 create mode 100644 drivers/gpu/drm/i915/i915_tracing.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 5794f102f9b8..dfc940b32078 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -182,6 +182,9 @@ i915-y += i915_perf.o \
 	  i915_oa_cnl.o \
 	  i915_oa_icl.o
 
+# tracing
+i915-$(CONFIG_TRACEPOINTS) += i915_tracing.o
+
 ifeq ($(CONFIG_DRM_I915_GVT),y)
 i915-y += intel_gvt.o
 include $(src)/gvt/Makefile
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9dce55182c3a..03e224ebc28c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1281,6 +1281,9 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
 	 */
 	if (INTEL_INFO(dev_priv)->num_pipes)
 		drm_kms_helper_poll_init(dev);
+
+	/* Notify our tracepoints driver has been registered. */
+	i915_tracing_register(dev_priv);
 }
 
 /**
@@ -1292,6 +1295,8 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
 	intel_fbdev_unregister(dev_priv);
 	intel_audio_deinit(dev_priv);
 
+	i915_tracing_unregister(dev_priv);
+
 	/*
 	 * After flushing the fbdev (incl. a late async config which will
 	 * have delayed queuing of a hotplug event), then flush the hotplug
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 0b10a30b7d96..00d9e9f65739 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2141,6 +2141,8 @@ struct drm_i915_private {
 
 	struct i915_pmu pmu;
 
+	struct list_head tracing_link;
+
 	/*
 	 * NOTE: This is the dri1/ums dungeon, don't add stuff here. Your patch
 	 * will be rejected. Instead look for a better place.
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 8084e35b25c5..0f007a46249e 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1157,10 +1157,10 @@ static void notify_ring(struct intel_engine_cs *engine)
 	const u32 seqno = intel_engine_get_seqno(engine);
 	struct i915_request *rq = NULL;
 	struct task_struct *tsk = NULL;
-	struct intel_wait *wait;
+	struct intel_wait *wait = NULL;
 
 	if (unlikely(!engine->breadcrumbs.irq_armed))
-		return;
+		goto out;
 
 	rcu_read_lock();
 
@@ -1219,6 +1219,7 @@ static void notify_ring(struct intel_engine_cs *engine)
 
 	rcu_read_unlock();
 
+out:
 	trace_intel_engine_notify(engine, wait);
 }
 
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index b50c6b829715..212e7fc1e80e 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -8,6 +8,7 @@
 
 #include <drm/drmP.h>
 #include "i915_drv.h"
+#include "i915_tracing.h"
 #include "intel_drv.h"
 #include "intel_ringbuffer.h"
 
@@ -780,29 +781,32 @@ trace_i915_request_out(struct i915_request *rq)
 #endif
 #endif
 
-TRACE_EVENT(intel_engine_notify,
-	    TP_PROTO(struct intel_engine_cs *engine, bool waiters),
-	    TP_ARGS(engine, waiters),
-
-	    TP_STRUCT__entry(
-			     __field(u32, dev)
-			     __field(u16, class)
-			     __field(u16, instance)
-			     __field(u32, seqno)
-			     __field(bool, waiters)
-			     ),
-
-	    TP_fast_assign(
-			   __entry->dev = engine->i915->drm.primary->index;
-			   __entry->class = engine->uabi_class;
-			   __entry->instance = engine->instance;
-			   __entry->seqno = intel_engine_get_seqno(engine);
-			   __entry->waiters = waiters;
-			   ),
-
-	    TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
-		      __entry->dev, __entry->class, __entry->instance,
-		      __entry->seqno, __entry->waiters)
+TRACE_EVENT_FN(intel_engine_notify,
+	       TP_PROTO(struct intel_engine_cs *engine, bool waiters),
+	       TP_ARGS(engine, waiters),
+
+	       TP_STRUCT__entry(
+			        __field(u32, dev)
+			        __field(u16, class)
+			        __field(u16, instance)
+			        __field(u32, seqno)
+			        __field(bool, waiters)
+			        ),
+
+	       TP_fast_assign(
+			      __entry->dev = engine->i915->drm.primary->index;
+			      __entry->class = engine->uabi_class;
+			      __entry->instance = engine->instance;
+			      __entry->seqno = intel_engine_get_seqno(engine);
+			      __entry->waiters = waiters;
+			      ),
+
+	       TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
+			 __entry->dev, __entry->class, __entry->instance,
+			 __entry->seqno, __entry->waiters),
+
+	       intel_engine_notify_tracepoint_register,
+	       intel_engine_notify_tracepoint_unregister
 );
 
 DEFINE_EVENT(i915_request, i915_request_retire,
diff --git a/drivers/gpu/drm/i915/i915_tracing.c b/drivers/gpu/drm/i915/i915_tracing.c
new file mode 100644
index 000000000000..86c68173d61b
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_tracing.c
@@ -0,0 +1,137 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright © 2018 Intel Corporation
+ *
+ */
+
+#include "i915_tracing.h"
+
+#include "i915_drv.h"
+#include "intel_ringbuffer.h"
+
+static DEFINE_MUTEX(driver_list_lock);
+static LIST_HEAD(driver_list);
+static bool notify_enabled;
+
+static void __i915_enable_notify(struct drm_i915_private *i915)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id)
+		intel_engine_pin_breadcrumbs_irq(engine);
+
+	intel_runtime_pm_put(i915);
+}
+
+static void __i915_disable_notify(struct drm_i915_private *i915)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id)
+		intel_engine_unpin_breadcrumbs_irq(engine);
+
+	intel_runtime_pm_put(i915);
+}
+
+/**
+ * i915_tracing_register - registers driver tracepoints support
+ * @i915: the drm_i915_private device
+ *
+ * Registers the tracepoints support from the driver registration path.
+ *
+ * Puts the driver on the local list and enables the unconditional notifications
+ * for the intel_engine_notify tracepoint if they should be enabled.
+ */
+void i915_tracing_register(struct drm_i915_private *i915)
+{
+	INIT_LIST_HEAD(&i915->tracing_link);
+
+	mutex_lock(&driver_list_lock);
+
+	list_add_tail(&i915->tracing_link, &driver_list);
+
+	if (notify_enabled)
+		__i915_enable_notify(i915);
+
+	mutex_unlock(&driver_list_lock);
+}
+
+/**
+ * i915_tracing_unregister - unregisters driver tracepoints support
+ * @i915: the drm_i915_private device
+ *
+ * Un-registers the tracepoints support from the driver un-registration path.
+ *
+ * Removes the driver from the local list and disables the unconditional
+ * notifications for the intel_engine_notify tracepoint if they were enabled.
+ */
+void i915_tracing_unregister(struct drm_i915_private *i915)
+{
+	mutex_lock(&driver_list_lock);
+
+	if (notify_enabled)
+		__i915_disable_notify(i915);
+
+	list_del(&i915->tracing_link);
+
+	mutex_unlock(&driver_list_lock);
+}
+
+/**
+ * intel_engine_notify_tracepoint_register - tracepoint registration callback
+ *
+ * This is called as the intel_engine_notify registration callback, ie. when
+ * the tracepoint is first activated.
+ */
+int intel_engine_notify_tracepoint_register(void)
+{
+	struct drm_i915_private *i915;
+
+	mutex_lock(&driver_list_lock);
+
+	GEM_BUG_ON(notify_enabled);
+
+	/*
+	 * Enable user interrupts / constant intel_engine_notify notifications.
+	 */
+	list_for_each_entry(i915, &driver_list, tracing_link)
+		__i915_enable_notify(i915);
+
+	notify_enabled = true;
+
+	mutex_unlock(&driver_list_lock);
+
+	return 0;
+}
+
+/**
+ * intel_engine_notify_tracepoint_unregister - tracepoint unregistration callback
+ *
+ * This is called as the intel_engine_notify unregistration callback, ie. when
+ * the last listener of this tracepoint goes away.
+ */
+void intel_engine_notify_tracepoint_unregister(void)
+{
+	struct drm_i915_private *i915;
+
+	mutex_lock(&driver_list_lock);
+
+	GEM_BUG_ON(!notify_enabled);
+
+	/*
+	 * Disable user interrupts / constant intel_engine_notify notifications.
+	 */
+	list_for_each_entry(i915, &driver_list, tracing_link)
+		__i915_disable_notify(i915);
+
+	notify_enabled = false;
+
+	mutex_unlock(&driver_list_lock);
+}
diff --git a/drivers/gpu/drm/i915/i915_tracing.h b/drivers/gpu/drm/i915/i915_tracing.h
new file mode 100644
index 000000000000..c89f2ed18e63
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_tracing.h
@@ -0,0 +1,30 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright © 2018 Intel Corporation
+ *
+ */
+#ifndef _I915_TRACING_H_
+#define _I915_TRACING_H_
+
+struct drm_i915_private;
+
+#if IS_ENABLED(CONFIG_TRACEPOINTS)
+
+void i915_tracing_register(struct drm_i915_private *i915);
+void i915_tracing_unregister(struct drm_i915_private *i915);
+
+int intel_engine_notify_tracepoint_register(void);
+void intel_engine_notify_tracepoint_unregister(void);
+
+#else
+
+static inline void i915_tracing_register(struct drm_i915_private *i915) { }
+static inline void i915_tracing_unregister(struct drm_i915_private *i915) { }
+
+static inline int intel_engine_notify_tracepoint_register(void) { }
+static inline void intel_engine_notify_tracepoint_unregister(void) { }
+
+#endif
+
+#endif
-- 
2.17.1

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

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

* Re: [PATCH v4] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-09 10:01         ` [PATCH v4] " Tvrtko Ursulin
@ 2018-08-09 10:04           ` Chris Wilson
  2018-08-09 10:12             ` [PATCH v5] " Tvrtko Ursulin
  2018-08-11 22:39           ` [PATCH v4] " kbuild test robot
  2018-08-11 22:47           ` kbuild test robot
  2 siblings, 1 reply; 22+ messages in thread
From: Chris Wilson @ 2018-08-09 10:04 UTC (permalink / raw)
  To: Intel-gfx, Tvrtko Ursulin

Quoting Tvrtko Ursulin (2018-08-09 11:01:28)
> +#if IS_ENABLED(CONFIG_TRACEPOINTS)
> +
> +void i915_tracing_register(struct drm_i915_private *i915);
> +void i915_tracing_unregister(struct drm_i915_private *i915);
> +
> +int intel_engine_notify_tracepoint_register(void);
> +void intel_engine_notify_tracepoint_unregister(void);
> +
> +#else
> +
> +static inline void i915_tracing_register(struct drm_i915_private *i915) { }
> +static inline void i915_tracing_unregister(struct drm_i915_private *i915) { }
> +
> +static inline int intel_engine_notify_tracepoint_register(void) { }

I was blind, return 0;
Better keep the compiler happy before kbuild complains.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v5] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-09 10:04           ` Chris Wilson
@ 2018-08-09 10:12             ` Tvrtko Ursulin
  0 siblings, 0 replies; 22+ messages in thread
From: Tvrtko Ursulin @ 2018-08-09 10:12 UTC (permalink / raw)
  To: Intel-gfx

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

Keep the user interrupt enabled and emit intel_engine_notify tracepoint
every time as long as it is enabled. Premise is that if someone is
listening, they want to see interrupts logged.

We use tracepoint (de)registration callbacks to enable user interrupts on
all devices (future proofing and avoiding ugly global pointers) and all
engines. And in the user interrupt handler we make sure
trace_intel_engine_notify is called even when there are no waiters.

v2:
 * Improve makefile. (Chris Wilson)
 * Simplify by dropping the pointeless global driver list. (Chris Wilson)
 * Emit tracepoint when there are no waiters, not just the user interrupt.
 * Commit message tidy.

v3:
 * Favour one return from notify_ring.
 Chris Wilson:
 * Reword commit message a bit for clarity.
 * Add RPM references to driver (un)registration paths.
 * Rename list link member.
 * Handle !CONFIG_TRACEPOINTS in the header.

v4:
 * I forgot to add comments while removing the RFC status.
 * License header tidy.
 * Forward declaration of drm_i915_private is enough. (Chris Wilson)

v5:
 * Fix !CONFIG_TRACEPOINTS header fail. (Chris Wilson)
 * Rememberd to add suggested by tag!

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Cc: svetlana.kukanova@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/Makefile       |   3 +
 drivers/gpu/drm/i915/i915_drv.c     |   5 +
 drivers/gpu/drm/i915/i915_drv.h     |   2 +
 drivers/gpu/drm/i915/i915_irq.c     |   5 +-
 drivers/gpu/drm/i915/i915_trace.h   |  50 +++++-----
 drivers/gpu/drm/i915/i915_tracing.c | 137 ++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_tracing.h |  30 ++++++
 7 files changed, 207 insertions(+), 25 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_tracing.c
 create mode 100644 drivers/gpu/drm/i915/i915_tracing.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 5794f102f9b8..dfc940b32078 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -182,6 +182,9 @@ i915-y += i915_perf.o \
 	  i915_oa_cnl.o \
 	  i915_oa_icl.o
 
+# tracing
+i915-$(CONFIG_TRACEPOINTS) += i915_tracing.o
+
 ifeq ($(CONFIG_DRM_I915_GVT),y)
 i915-y += intel_gvt.o
 include $(src)/gvt/Makefile
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9dce55182c3a..03e224ebc28c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1281,6 +1281,9 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
 	 */
 	if (INTEL_INFO(dev_priv)->num_pipes)
 		drm_kms_helper_poll_init(dev);
+
+	/* Notify our tracepoints driver has been registered. */
+	i915_tracing_register(dev_priv);
 }
 
 /**
@@ -1292,6 +1295,8 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
 	intel_fbdev_unregister(dev_priv);
 	intel_audio_deinit(dev_priv);
 
+	i915_tracing_unregister(dev_priv);
+
 	/*
 	 * After flushing the fbdev (incl. a late async config which will
 	 * have delayed queuing of a hotplug event), then flush the hotplug
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 0b10a30b7d96..00d9e9f65739 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2141,6 +2141,8 @@ struct drm_i915_private {
 
 	struct i915_pmu pmu;
 
+	struct list_head tracing_link;
+
 	/*
 	 * NOTE: This is the dri1/ums dungeon, don't add stuff here. Your patch
 	 * will be rejected. Instead look for a better place.
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 8084e35b25c5..0f007a46249e 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1157,10 +1157,10 @@ static void notify_ring(struct intel_engine_cs *engine)
 	const u32 seqno = intel_engine_get_seqno(engine);
 	struct i915_request *rq = NULL;
 	struct task_struct *tsk = NULL;
-	struct intel_wait *wait;
+	struct intel_wait *wait = NULL;
 
 	if (unlikely(!engine->breadcrumbs.irq_armed))
-		return;
+		goto out;
 
 	rcu_read_lock();
 
@@ -1219,6 +1219,7 @@ static void notify_ring(struct intel_engine_cs *engine)
 
 	rcu_read_unlock();
 
+out:
 	trace_intel_engine_notify(engine, wait);
 }
 
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index b50c6b829715..212e7fc1e80e 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -8,6 +8,7 @@
 
 #include <drm/drmP.h>
 #include "i915_drv.h"
+#include "i915_tracing.h"
 #include "intel_drv.h"
 #include "intel_ringbuffer.h"
 
@@ -780,29 +781,32 @@ trace_i915_request_out(struct i915_request *rq)
 #endif
 #endif
 
-TRACE_EVENT(intel_engine_notify,
-	    TP_PROTO(struct intel_engine_cs *engine, bool waiters),
-	    TP_ARGS(engine, waiters),
-
-	    TP_STRUCT__entry(
-			     __field(u32, dev)
-			     __field(u16, class)
-			     __field(u16, instance)
-			     __field(u32, seqno)
-			     __field(bool, waiters)
-			     ),
-
-	    TP_fast_assign(
-			   __entry->dev = engine->i915->drm.primary->index;
-			   __entry->class = engine->uabi_class;
-			   __entry->instance = engine->instance;
-			   __entry->seqno = intel_engine_get_seqno(engine);
-			   __entry->waiters = waiters;
-			   ),
-
-	    TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
-		      __entry->dev, __entry->class, __entry->instance,
-		      __entry->seqno, __entry->waiters)
+TRACE_EVENT_FN(intel_engine_notify,
+	       TP_PROTO(struct intel_engine_cs *engine, bool waiters),
+	       TP_ARGS(engine, waiters),
+
+	       TP_STRUCT__entry(
+			        __field(u32, dev)
+			        __field(u16, class)
+			        __field(u16, instance)
+			        __field(u32, seqno)
+			        __field(bool, waiters)
+			        ),
+
+	       TP_fast_assign(
+			      __entry->dev = engine->i915->drm.primary->index;
+			      __entry->class = engine->uabi_class;
+			      __entry->instance = engine->instance;
+			      __entry->seqno = intel_engine_get_seqno(engine);
+			      __entry->waiters = waiters;
+			      ),
+
+	       TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u",
+			 __entry->dev, __entry->class, __entry->instance,
+			 __entry->seqno, __entry->waiters),
+
+	       intel_engine_notify_tracepoint_register,
+	       intel_engine_notify_tracepoint_unregister
 );
 
 DEFINE_EVENT(i915_request, i915_request_retire,
diff --git a/drivers/gpu/drm/i915/i915_tracing.c b/drivers/gpu/drm/i915/i915_tracing.c
new file mode 100644
index 000000000000..86c68173d61b
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_tracing.c
@@ -0,0 +1,137 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright © 2018 Intel Corporation
+ *
+ */
+
+#include "i915_tracing.h"
+
+#include "i915_drv.h"
+#include "intel_ringbuffer.h"
+
+static DEFINE_MUTEX(driver_list_lock);
+static LIST_HEAD(driver_list);
+static bool notify_enabled;
+
+static void __i915_enable_notify(struct drm_i915_private *i915)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id)
+		intel_engine_pin_breadcrumbs_irq(engine);
+
+	intel_runtime_pm_put(i915);
+}
+
+static void __i915_disable_notify(struct drm_i915_private *i915)
+{
+	struct intel_engine_cs *engine;
+	enum intel_engine_id id;
+
+	intel_runtime_pm_get(i915);
+
+	for_each_engine(engine, i915, id)
+		intel_engine_unpin_breadcrumbs_irq(engine);
+
+	intel_runtime_pm_put(i915);
+}
+
+/**
+ * i915_tracing_register - registers driver tracepoints support
+ * @i915: the drm_i915_private device
+ *
+ * Registers the tracepoints support from the driver registration path.
+ *
+ * Puts the driver on the local list and enables the unconditional notifications
+ * for the intel_engine_notify tracepoint if they should be enabled.
+ */
+void i915_tracing_register(struct drm_i915_private *i915)
+{
+	INIT_LIST_HEAD(&i915->tracing_link);
+
+	mutex_lock(&driver_list_lock);
+
+	list_add_tail(&i915->tracing_link, &driver_list);
+
+	if (notify_enabled)
+		__i915_enable_notify(i915);
+
+	mutex_unlock(&driver_list_lock);
+}
+
+/**
+ * i915_tracing_unregister - unregisters driver tracepoints support
+ * @i915: the drm_i915_private device
+ *
+ * Un-registers the tracepoints support from the driver un-registration path.
+ *
+ * Removes the driver from the local list and disables the unconditional
+ * notifications for the intel_engine_notify tracepoint if they were enabled.
+ */
+void i915_tracing_unregister(struct drm_i915_private *i915)
+{
+	mutex_lock(&driver_list_lock);
+
+	if (notify_enabled)
+		__i915_disable_notify(i915);
+
+	list_del(&i915->tracing_link);
+
+	mutex_unlock(&driver_list_lock);
+}
+
+/**
+ * intel_engine_notify_tracepoint_register - tracepoint registration callback
+ *
+ * This is called as the intel_engine_notify registration callback, ie. when
+ * the tracepoint is first activated.
+ */
+int intel_engine_notify_tracepoint_register(void)
+{
+	struct drm_i915_private *i915;
+
+	mutex_lock(&driver_list_lock);
+
+	GEM_BUG_ON(notify_enabled);
+
+	/*
+	 * Enable user interrupts / constant intel_engine_notify notifications.
+	 */
+	list_for_each_entry(i915, &driver_list, tracing_link)
+		__i915_enable_notify(i915);
+
+	notify_enabled = true;
+
+	mutex_unlock(&driver_list_lock);
+
+	return 0;
+}
+
+/**
+ * intel_engine_notify_tracepoint_unregister - tracepoint unregistration callback
+ *
+ * This is called as the intel_engine_notify unregistration callback, ie. when
+ * the last listener of this tracepoint goes away.
+ */
+void intel_engine_notify_tracepoint_unregister(void)
+{
+	struct drm_i915_private *i915;
+
+	mutex_lock(&driver_list_lock);
+
+	GEM_BUG_ON(!notify_enabled);
+
+	/*
+	 * Disable user interrupts / constant intel_engine_notify notifications.
+	 */
+	list_for_each_entry(i915, &driver_list, tracing_link)
+		__i915_disable_notify(i915);
+
+	notify_enabled = false;
+
+	mutex_unlock(&driver_list_lock);
+}
diff --git a/drivers/gpu/drm/i915/i915_tracing.h b/drivers/gpu/drm/i915/i915_tracing.h
new file mode 100644
index 000000000000..31ed3e535159
--- /dev/null
+++ b/drivers/gpu/drm/i915/i915_tracing.h
@@ -0,0 +1,30 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright © 2018 Intel Corporation
+ *
+ */
+#ifndef _I915_TRACING_H_
+#define _I915_TRACING_H_
+
+struct drm_i915_private;
+
+#if IS_ENABLED(CONFIG_TRACEPOINTS)
+
+void i915_tracing_register(struct drm_i915_private *i915);
+void i915_tracing_unregister(struct drm_i915_private *i915);
+
+int intel_engine_notify_tracepoint_register(void);
+void intel_engine_notify_tracepoint_unregister(void);
+
+#else
+
+static inline void i915_tracing_register(struct drm_i915_private *i915) { }
+static inline void i915_tracing_unregister(struct drm_i915_private *i915) { }
+
+static inline int intel_engine_notify_tracepoint_register(void) { return 0; }
+static inline void intel_engine_notify_tracepoint_unregister(void) { }
+
+#endif
+
+#endif
-- 
2.17.1

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

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (4 preceding siblings ...)
  2018-08-09  9:46 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-08-09 10:12 ` Patchwork
  2018-08-09 10:13 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09 10:12 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3)
URL   : https://patchwork.freedesktop.org/series/47897/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
877808443224 drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
-:160: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#160: FILE: drivers/gpu/drm/i915/i915_trace.h:788:
+	       TP_STRUCT__entry(

-:161: ERROR:CODE_INDENT: code indent should use tabs where possible
#161: FILE: drivers/gpu/drm/i915/i915_trace.h:789:
+^I^I^I        __field(u32, dev)$

-:162: ERROR:CODE_INDENT: code indent should use tabs where possible
#162: FILE: drivers/gpu/drm/i915/i915_trace.h:790:
+^I^I^I        __field(u16, class)$

-:163: ERROR:CODE_INDENT: code indent should use tabs where possible
#163: FILE: drivers/gpu/drm/i915/i915_trace.h:791:
+^I^I^I        __field(u16, instance)$

-:164: ERROR:CODE_INDENT: code indent should use tabs where possible
#164: FILE: drivers/gpu/drm/i915/i915_trace.h:792:
+^I^I^I        __field(u32, seqno)$

-:165: ERROR:CODE_INDENT: code indent should use tabs where possible
#165: FILE: drivers/gpu/drm/i915/i915_trace.h:793:
+^I^I^I        __field(bool, waiters)$

-:166: ERROR:CODE_INDENT: code indent should use tabs where possible
#166: FILE: drivers/gpu/drm/i915/i915_trace.h:794:
+^I^I^I        ),$

-:168: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#168: FILE: drivers/gpu/drm/i915/i915_trace.h:796:
+	       TP_fast_assign(

-:186: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#186: 
new file mode 100644

-:191: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#191: FILE: drivers/gpu/drm/i915/i915_tracing.c:1:
+/*

-:334: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#334: FILE: drivers/gpu/drm/i915/i915_tracing.h:1:
+/*

total: 6 errors, 3 warnings, 2 checks, 282 lines checked

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

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

* ✗ Fi.CI.SPARSE: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (5 preceding siblings ...)
  2018-08-09 10:12 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3) Patchwork
@ 2018-08-09 10:13 ` Patchwork
  2018-08-09 10:29 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09 10:13 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3)
URL   : https://patchwork.freedesktop.org/series/47897/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3675:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3677:16: warning: expression using sizeof(void)
+./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0)

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

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

* ✓ Fi.CI.BAT: success for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (6 preceding siblings ...)
  2018-08-09 10:13 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-08-09 10:29 ` Patchwork
  2018-08-09 10:33 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4) Patchwork
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09 10:29 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3)
URL   : https://patchwork.freedesktop.org/series/47897/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4636 -> Patchwork_9903 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/47897/revisions/3/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@gem_exec_suspend@basic-s3:
      {fi-kbl-soraka}:    NOTRUN -> INCOMPLETE

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      fi-skl-guc:         PASS -> DMESG-FAIL (fdo#107174)

    igt@kms_frontbuffer_tracking@basic:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#103167)

    
    ==== Warnings ====

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         DMESG-WARN (fdo#107372) -> DMESG-FAIL (fdo#107372)

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

  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
  fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372


== Participating hosts (50 -> 47) ==

  Additional (2): fi-kbl-soraka fi-kbl-7560u 
  Missing    (5): fi-byt-squawks fi-ilk-m540 fi-bxt-dsi fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * Linux: CI_DRM_4636 -> Patchwork_9903

  CI_DRM_4636: 084bb2fb549650b6da80976c9bc594779ce342b4 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4590: e6ddaca7a8ea9d3d27f0ecaa36b357cc02e2df3b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9903: 877808443224cf75a4d75b03d49009ce8e9abb9b @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

877808443224 drm/i915/tracing: Enable user interrupts while intel_engine_notify is active

== Logs ==

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

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (7 preceding siblings ...)
  2018-08-09 10:29 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-08-09 10:33 ` Patchwork
  2018-08-09 10:34 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09 10:33 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4)
URL   : https://patchwork.freedesktop.org/series/47897/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
424835b61710 drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
-:165: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#165: FILE: drivers/gpu/drm/i915/i915_trace.h:788:
+	       TP_STRUCT__entry(

-:166: ERROR:CODE_INDENT: code indent should use tabs where possible
#166: FILE: drivers/gpu/drm/i915/i915_trace.h:789:
+^I^I^I        __field(u32, dev)$

-:167: ERROR:CODE_INDENT: code indent should use tabs where possible
#167: FILE: drivers/gpu/drm/i915/i915_trace.h:790:
+^I^I^I        __field(u16, class)$

-:168: ERROR:CODE_INDENT: code indent should use tabs where possible
#168: FILE: drivers/gpu/drm/i915/i915_trace.h:791:
+^I^I^I        __field(u16, instance)$

-:169: ERROR:CODE_INDENT: code indent should use tabs where possible
#169: FILE: drivers/gpu/drm/i915/i915_trace.h:792:
+^I^I^I        __field(u32, seqno)$

-:170: ERROR:CODE_INDENT: code indent should use tabs where possible
#170: FILE: drivers/gpu/drm/i915/i915_trace.h:793:
+^I^I^I        __field(bool, waiters)$

-:171: ERROR:CODE_INDENT: code indent should use tabs where possible
#171: FILE: drivers/gpu/drm/i915/i915_trace.h:794:
+^I^I^I        ),$

-:173: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#173: FILE: drivers/gpu/drm/i915/i915_trace.h:796:
+	       TP_fast_assign(

-:191: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#191: 
new file mode 100644

-:196: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#196: FILE: drivers/gpu/drm/i915/i915_tracing.c:1:
+/*

-:339: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#339: FILE: drivers/gpu/drm/i915/i915_tracing.h:1:
+/*

total: 6 errors, 3 warnings, 2 checks, 282 lines checked

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

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

* ✗ Fi.CI.SPARSE: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (8 preceding siblings ...)
  2018-08-09 10:33 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4) Patchwork
@ 2018-08-09 10:34 ` Patchwork
  2018-08-09 10:51 ` ✓ Fi.CI.BAT: success " Patchwork
  2018-08-09 11:41 ` ✓ Fi.CI.IGT: " Patchwork
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09 10:34 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4)
URL   : https://patchwork.freedesktop.org/series/47897/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3675:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3677:16: warning: expression using sizeof(void)
+./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0)

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

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

* ✓ Fi.CI.BAT: success for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (9 preceding siblings ...)
  2018-08-09 10:34 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-08-09 10:51 ` Patchwork
  2018-08-09 11:41 ` ✓ Fi.CI.IGT: " Patchwork
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09 10:51 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4)
URL   : https://patchwork.freedesktop.org/series/47897/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4636 -> Patchwork_9904 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/47897/revisions/4/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@gem_exec_suspend@basic-s3:
      {fi-kbl-soraka}:    NOTRUN -> INCOMPLETE

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload-inject:
      fi-hsw-4770r:       PASS -> DMESG-WARN (fdo#107425)

    igt@drv_selftest@live_hangcheck:
      fi-skl-guc:         PASS -> DMESG-FAIL (fdo#107174)
      {fi-icl-u}:         NOTRUN -> INCOMPLETE (fdo#107399)

    igt@drv_selftest@live_workarounds:
      {fi-cfl-8109u}:     PASS -> DMESG-FAIL (fdo#107292)

    igt@kms_frontbuffer_tracking@basic:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      {fi-icl-u}:         NOTRUN -> DMESG-WARN (fdo#107382) +4

    {igt@kms_psr@primary_page_flip}:
      {fi-icl-u}:         NOTRUN -> FAIL (fdo#107383) +3

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         PASS -> FAIL (fdo#104008)

    
    ==== Warnings ====

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         DMESG-WARN (fdo#107372) -> DMESG-FAIL (fdo#107372)

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

  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
  fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
  fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372
  fdo#107382 https://bugs.freedesktop.org/show_bug.cgi?id=107382
  fdo#107383 https://bugs.freedesktop.org/show_bug.cgi?id=107383
  fdo#107399 https://bugs.freedesktop.org/show_bug.cgi?id=107399
  fdo#107425 https://bugs.freedesktop.org/show_bug.cgi?id=107425


== Participating hosts (50 -> 49) ==

  Additional (3): fi-kbl-soraka fi-kbl-7560u fi-icl-u 
  Missing    (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * Linux: CI_DRM_4636 -> Patchwork_9904

  CI_DRM_4636: 084bb2fb549650b6da80976c9bc594779ce342b4 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4590: e6ddaca7a8ea9d3d27f0ecaa36b357cc02e2df3b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9904: 424835b61710029d4162cd6b45a52aa43ca77b89 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

424835b61710 drm/i915/tracing: Enable user interrupts while intel_engine_notify is active

== Logs ==

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

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

* ✓ Fi.CI.IGT: success for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4)
  2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
                   ` (10 preceding siblings ...)
  2018-08-09 10:51 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-08-09 11:41 ` Patchwork
  11 siblings, 0 replies; 22+ messages in thread
From: Patchwork @ 2018-08-09 11:41 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4)
URL   : https://patchwork.freedesktop.org/series/47897/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4636_full -> Patchwork_9904_full =

== Summary - WARNING ==

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

  

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@perf_pmu@rc6:
      shard-kbl:          PASS -> SKIP

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_workarounds:
      shard-kbl:          PASS -> DMESG-FAIL (fdo#107292)

    igt@gem_exec_schedule@deep-bsd2:
      shard-snb:          SKIP -> INCOMPLETE (fdo#105411)

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

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s3:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@gem_workarounds@suspend-resume:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@kms_busy@extended-pageflip-hang-oldfb-render-a:
      shard-apl:          DMESG-WARN (fdo#106247) -> PASS

    igt@pm_rpm@cursor-dpms:
      shard-glk:          WARN -> PASS

    igt@pm_rpm@dpms-mode-unset-non-lpsp:
      shard-apl:          FAIL (fdo#106539) -> PASS +3

    
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#106247 https://bugs.freedesktop.org/show_bug.cgi?id=106247
  fdo#106539 https://bugs.freedesktop.org/show_bug.cgi?id=106539
  fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4636 -> Patchwork_9904

  CI_DRM_4636: 084bb2fb549650b6da80976c9bc594779ce342b4 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4590: e6ddaca7a8ea9d3d27f0ecaa36b357cc02e2df3b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9904: 424835b61710029d4162cd6b45a52aa43ca77b89 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

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

* Re: [PATCH v4] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-09 10:01         ` [PATCH v4] " Tvrtko Ursulin
  2018-08-09 10:04           ` Chris Wilson
@ 2018-08-11 22:39           ` kbuild test robot
  2018-08-11 22:47           ` kbuild test robot
  2 siblings, 0 replies; 22+ messages in thread
From: kbuild test robot @ 2018-08-11 22:39 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx, kbuild-all

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

Hi Tvrtko,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20180810]
[cannot apply to v4.18-rc8]
[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/Tvrtko-Ursulin/drm-i915-tracing-Enable-user-interrupts-while-intel_engine_notify-is-active/20180812-054420
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x000-201832 (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 warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/i915_trace.h:11:0,
                    from drivers/gpu/drm/i915/i915_drv.h:2669,
                    from drivers/gpu/drm/i915/i915_gem_render_state.c:28:
   drivers/gpu/drm/i915/i915_tracing.h: In function 'intel_engine_notify_tracepoint_register':
>> drivers/gpu/drm/i915/i915_tracing.h:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
    static inline int intel_engine_notify_tracepoint_register(void) { }
    ^~~~~~

vim +25 drivers/gpu/drm/i915/i915_tracing.h

    24	
  > 25	static inline int intel_engine_notify_tracepoint_register(void) { }
    26	static inline void intel_engine_notify_tracepoint_unregister(void) { }
    27	

---
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: 30296 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] 22+ messages in thread

* Re: [PATCH v4] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active
  2018-08-09 10:01         ` [PATCH v4] " Tvrtko Ursulin
  2018-08-09 10:04           ` Chris Wilson
  2018-08-11 22:39           ` [PATCH v4] " kbuild test robot
@ 2018-08-11 22:47           ` kbuild test robot
  2 siblings, 0 replies; 22+ messages in thread
From: kbuild test robot @ 2018-08-11 22:47 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx, kbuild-all

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

Hi Tvrtko,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20180810]
[cannot apply to v4.18-rc8]
[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/Tvrtko-Ursulin/drm-i915-tracing-Enable-user-interrupts-while-intel_engine_notify-is-active/20180812-054420
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x077-201832 (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=i386 

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/selftests/../i915_trace.h:11:0,
                    from drivers/gpu/drm/i915/selftests/../i915_drv.h:2669,
                    from drivers/gpu/drm/i915/selftests/i915_selftest.c:26:
   drivers/gpu/drm/i915/selftests/../i915_tracing.h: In function 'intel_engine_notify_tracepoint_register':
>> drivers/gpu/drm/i915/selftests/../i915_tracing.h:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
    static inline int intel_engine_notify_tracepoint_register(void) { }
    ^~~~~~

vim +25 drivers/gpu/drm/i915/selftests/../i915_tracing.h

    24	
  > 25	static inline int intel_engine_notify_tracepoint_register(void) { }
    26	static inline void intel_engine_notify_tracepoint_unregister(void) { }
    27	

---
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: 27960 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] 22+ messages in thread

end of thread, other threads:[~2018-08-11 22:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 15:14 [PATCH v2] drm/i915/tracing: Enable user interrupts while intel_engine_notify is active Tvrtko Ursulin
2018-08-08 15:20 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-08-08 15:34 ` [PATCH v2] " Chris Wilson
2018-08-09  9:07   ` [PATCH v3] " Tvrtko Ursulin
2018-08-09  9:09     ` Tvrtko Ursulin
2018-08-09  9:22     ` Chris Wilson
2018-08-09  9:31       ` Tvrtko Ursulin
2018-08-09 10:01         ` [PATCH v4] " Tvrtko Ursulin
2018-08-09 10:04           ` Chris Wilson
2018-08-09 10:12             ` [PATCH v5] " Tvrtko Ursulin
2018-08-11 22:39           ` [PATCH v4] " kbuild test robot
2018-08-11 22:47           ` kbuild test robot
2018-08-09  9:29 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev2) Patchwork
2018-08-09  9:30 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-08-09  9:46 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-09 10:12 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev3) Patchwork
2018-08-09 10:13 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-08-09 10:29 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-09 10:33 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tracing: Enable user interrupts while intel_engine_notify is active (rev4) Patchwork
2018-08-09 10:34 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-08-09 10:51 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-09 11:41 ` ✓ Fi.CI.IGT: " 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.