All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Make i915 events part of uapi
@ 2013-07-16 23:41 Ben Widawsky
  2013-07-17  5:07 ` Daniel Vetter
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ben Widawsky @ 2013-07-16 23:41 UTC (permalink / raw)
  To: Intel GFX; +Cc: Ben Widawsky

Make the uevent strings part of the user API for people who wish to
write their own listeners.

CC: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_irq.c | 8 ++++----
 include/uapi/drm/i915_drm.h     | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 9910699..60fa513 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -812,7 +812,7 @@ static void ivybridge_parity_work(struct work_struct *work)
 
 	mutex_unlock(&dev_priv->dev->struct_mutex);
 
-	parity_event[0] = "L3_PARITY_ERROR=1";
+	parity_event[0] = I915_L3_PARITY_EVENT"=1";
 	parity_event[1] = kasprintf(GFP_KERNEL, "ROW=%d", row);
 	parity_event[2] = kasprintf(GFP_KERNEL, "BANK=%d", bank);
 	parity_event[3] = kasprintf(GFP_KERNEL, "SUBBANK=%d", subbank);
@@ -1435,9 +1435,9 @@ static void i915_error_work_func(struct work_struct *work)
 						    gpu_error);
 	struct drm_device *dev = dev_priv->dev;
 	struct intel_ring_buffer *ring;
-	char *error_event[] = { "ERROR=1", NULL };
-	char *reset_event[] = { "RESET=1", NULL };
-	char *reset_done_event[] = { "ERROR=0", NULL };
+	char *error_event[] = { I915_ERROR_EVENT"=1", NULL };
+	char *reset_event[] = { I915_RESET_EVENT"=1", NULL };
+	char *reset_done_event[] = { I915_ERROR_EVENT"=0", NULL };
 	int i, ret;
 
 	kobject_uevent_env(&dev->primary->kdev.kobj, KOBJ_CHANGE, error_event);
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 923ed7f..25a3e74 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -33,6 +33,9 @@
  * subject to backwards-compatibility constraints.
  */
 
+#define I915_L3_PARITY_EVENT "L3_PARITY_ERROR"
+#define I915_ERROR_EVENT "ERROR"
+#define I915_RESET_EVENT "RESET"
 
 /* Each region is a minimum of 16k, and there are at most 255 of them.
  */
-- 
1.8.3.3

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

end of thread, other threads:[~2013-07-19 22:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 23:41 [PATCH] drm/i915: Make i915 events part of uapi Ben Widawsky
2013-07-17  5:07 ` Daniel Vetter
2013-07-17 21:12   ` Chad Versace
2013-07-19  5:42 ` [PATCH 1/3] drm/i915: Move error uevent to detection time Ben Widawsky
2013-07-19  5:42   ` [PATCH 2/3] drm/i915: Change uevent for reset completion Ben Widawsky
2013-07-19  6:57     ` Daniel Vetter
2013-07-19  5:42   ` [PATCH 3/3] [v2] drm/i915: Make i915 events part of uapi Ben Widawsky
2013-07-19  8:45   ` [PATCH 1/3] drm/i915: Move error uevent to detection time Chris Wilson
2013-07-19 16:16 ` [PATCH] [v3] drm/i915: Make i915 events part of uapi Ben Widawsky
2013-07-19 16:27   ` Daniel Vetter
2013-07-19 22:35   ` Chad Versace

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.