* [PATCH v2] drm/i915/guc: Enable guc logging on guc log relay write
@ 2019-09-16 22:50 Robert M. Fosha
2019-09-16 23:52 ` ✗ Fi.CI.BAT: failure for drm/i915/guc: Enable guc logging on guc log relay write (rev3) Patchwork
2019-09-17 21:00 ` [PATCH v2] drm/i915/guc: Enable guc logging on guc log relay write Matthew Brost
0 siblings, 2 replies; 3+ messages in thread
From: Robert M. Fosha @ 2019-09-16 22:50 UTC (permalink / raw)
To: intel-gfx
Creating and opening the GuC log relay file enables and starts
the relay potentially before the caller is ready to consume logs.
Change the behavior so that relay starts only on an explicit call
to the write function (with a value of '1'). Other values flush
the log relay as before.
v2: Style changes and fix typos. Add guc_log_relay_stop()
function. (Daniele)
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Robert M. Fosha <robert.m.fosha@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 53 +++++++++++++++++-----
drivers/gpu/drm/i915/gt/uc/intel_guc_log.h | 4 +-
drivers/gpu/drm/i915/i915_debugfs.c | 22 +++++++--
3 files changed, 62 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
index 36332064de9c..e26c7748358b 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
@@ -226,7 +226,7 @@ static void guc_read_update_log_buffer(struct intel_guc_log *log)
mutex_lock(&log->relay.lock);
- if (WARN_ON(!intel_guc_log_relay_enabled(log)))
+ if (WARN_ON(!intel_guc_log_relay_created(log)))
goto out_unlock;
/* Get the pointer to shared GuC log buffer */
@@ -361,6 +361,7 @@ void intel_guc_log_init_early(struct intel_guc_log *log)
{
mutex_init(&log->relay.lock);
INIT_WORK(&log->relay.flush_work, capture_logs_work);
+ log->relay.started = false;
}
static int guc_log_relay_create(struct intel_guc_log *log)
@@ -546,7 +547,7 @@ int intel_guc_log_set_level(struct intel_guc_log *log, u32 level)
return ret;
}
-bool intel_guc_log_relay_enabled(const struct intel_guc_log *log)
+bool intel_guc_log_relay_created(const struct intel_guc_log *log)
{
return log->relay.buf_addr;
}
@@ -560,7 +561,7 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
mutex_lock(&log->relay.lock);
- if (intel_guc_log_relay_enabled(log)) {
+ if (intel_guc_log_relay_created(log)) {
ret = -EEXIST;
goto out_unlock;
}
@@ -585,6 +586,21 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
mutex_unlock(&log->relay.lock);
+ return 0;
+
+out_relay:
+ guc_log_relay_destroy(log);
+out_unlock:
+ mutex_unlock(&log->relay.lock);
+
+ return ret;
+}
+
+int intel_guc_log_relay_start(struct intel_guc_log *log)
+{
+ if (log->relay.started)
+ return -EEXIST;
+
guc_log_enable_flush_events(log);
/*
@@ -594,14 +610,9 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
*/
queue_work(system_highpri_wq, &log->relay.flush_work);
- return 0;
-
-out_relay:
- guc_log_relay_destroy(log);
-out_unlock:
- mutex_unlock(&log->relay.lock);
+ log->relay.started = true;
- return ret;
+ return 0;
}
void intel_guc_log_relay_flush(struct intel_guc_log *log)
@@ -610,6 +621,9 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log)
struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
intel_wakeref_t wakeref;
+ if (!log->relay.started)
+ return;
+
/*
* Before initiating the forceful flush, wait for any pending/ongoing
* flush to complete otherwise forceful flush may not actually happen.
@@ -623,18 +637,33 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log)
guc_log_capture_logs(log);
}
-void intel_guc_log_relay_close(struct intel_guc_log *log)
+/*
+ * Stops the relay log. Called from intel_guc_log_relay_close(), so no
+ * possibility of race with start/flush since relay_write cannot race
+ * relay_close.
+ */
+static void guc_log_relay_stop(struct intel_guc_log *log)
{
struct intel_guc *guc = log_to_guc(log);
struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
+ if (!log->relay.started)
+ return;
+
guc_log_disable_flush_events(log);
intel_synchronize_irq(i915);
flush_work(&log->relay.flush_work);
+ log->relay.started = false;
+}
+
+void intel_guc_log_relay_close(struct intel_guc_log *log)
+{
+ guc_log_relay_stop(log);
+
mutex_lock(&log->relay.lock);
- GEM_BUG_ON(!intel_guc_log_relay_enabled(log));
+ GEM_BUG_ON(!intel_guc_log_relay_created(log));
guc_log_unmap(log);
guc_log_relay_destroy(log);
mutex_unlock(&log->relay.lock);
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
index 6f764879acb1..c252c022c5fc 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
@@ -47,6 +47,7 @@ struct intel_guc_log {
struct i915_vma *vma;
struct {
void *buf_addr;
+ bool started;
struct work_struct flush_work;
struct rchan *channel;
struct mutex lock;
@@ -65,8 +66,9 @@ int intel_guc_log_create(struct intel_guc_log *log);
void intel_guc_log_destroy(struct intel_guc_log *log);
int intel_guc_log_set_level(struct intel_guc_log *log, u32 level);
-bool intel_guc_log_relay_enabled(const struct intel_guc_log *log);
+bool intel_guc_log_relay_created(const struct intel_guc_log *log);
int intel_guc_log_relay_open(struct intel_guc_log *log);
+int intel_guc_log_relay_start(struct intel_guc_log *log);
void intel_guc_log_relay_flush(struct intel_guc_log *log);
void intel_guc_log_relay_close(struct intel_guc_log *log);
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 43db50095257..3f86f2b60b92 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1871,8 +1871,8 @@ static void i915_guc_log_info(struct seq_file *m,
struct intel_guc_log *log = &dev_priv->gt.uc.guc.log;
enum guc_log_buffer_type type;
- if (!intel_guc_log_relay_enabled(log)) {
- seq_puts(m, "GuC log relay disabled\n");
+ if (!intel_guc_log_relay_created(log)) {
+ seq_puts(m, "GuC log relay not created\n");
return;
}
@@ -2059,9 +2059,23 @@ i915_guc_log_relay_write(struct file *filp,
loff_t *ppos)
{
struct intel_guc_log *log = filp->private_data;
+ int val;
+ int ret;
- intel_guc_log_relay_flush(log);
- return cnt;
+ ret = kstrtoint_from_user(ubuf, cnt, 0, &val);
+ if (ret < 0)
+ return ret;
+
+ /*
+ * Enable and start the guc log relay on value of 1.
+ * Flush log relay for any other value.
+ */
+ if (val == 1)
+ ret = intel_guc_log_relay_start(log);
+ else
+ intel_guc_log_relay_flush(log);
+
+ return ret ?: cnt;
}
static int i915_guc_log_relay_release(struct inode *inode, struct file *file)
--
2.21.0.5.gaeb582a983
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread* ✗ Fi.CI.BAT: failure for drm/i915/guc: Enable guc logging on guc log relay write (rev3)
2019-09-16 22:50 [PATCH v2] drm/i915/guc: Enable guc logging on guc log relay write Robert M. Fosha
@ 2019-09-16 23:52 ` Patchwork
2019-09-17 21:00 ` [PATCH v2] drm/i915/guc: Enable guc logging on guc log relay write Matthew Brost
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-09-16 23:52 UTC (permalink / raw)
To: Robert M. Fosha; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/guc: Enable guc logging on guc log relay write (rev3)
URL : https://patchwork.freedesktop.org/series/66502/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6905 -> Patchwork_14422
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_14422 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_14422, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_14422:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live_gem_contexts:
- fi-skl-guc: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6905/fi-skl-guc/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/fi-skl-guc/igt@i915_selftest@live_gem_contexts.html
Known issues
------------
Here are the changes found in Patchwork_14422 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_create@basic-files:
- fi-icl-u3: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713] / [fdo#109100])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6905/fi-icl-u3/igt@gem_ctx_create@basic-files.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/fi-icl-u3/igt@gem_ctx_create@basic-files.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][5] -> [DMESG-WARN][6] ([fdo#102614])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6905/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
#### Possible fixes ####
* igt@gem_ctx_switch@rcs0:
- fi-icl-u2: [INCOMPLETE][7] ([fdo#107713]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6905/fi-icl-u2/igt@gem_ctx_switch@rcs0.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/fi-icl-u2/igt@gem_ctx_switch@rcs0.html
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [INCOMPLETE][9] ([fdo#107718]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6905/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
* igt@i915_selftest@live_reset:
- {fi-icl-dsi}: [INCOMPLETE][11] ([fdo#107713]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6905/fi-icl-dsi/igt@i915_selftest@live_reset.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/fi-icl-dsi/igt@i915_selftest@live_reset.html
* igt@prime_vgem@basic-fence-flip:
- fi-ilk-650: [DMESG-WARN][13] ([fdo#106387]) -> [PASS][14] +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6905/fi-ilk-650/igt@prime_vgem@basic-fence-flip.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/fi-ilk-650/igt@prime_vgem@basic-fence-flip.html
#### Warnings ####
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][15] ([fdo#111407]) -> [FAIL][16] ([fdo#111096])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6905/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#106350]: https://bugs.freedesktop.org/show_bug.cgi?id=106350
[fdo#106387]: https://bugs.freedesktop.org/show_bug.cgi?id=106387
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111562]: https://bugs.freedesktop.org/show_bug.cgi?id=111562
[fdo#111597]: https://bugs.freedesktop.org/show_bug.cgi?id=111597
Participating hosts (55 -> 48)
------------------------------
Additional (1): fi-apl-guc
Missing (8): fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6905 -> Patchwork_14422
CI-20190529: 20190529
CI_DRM_6905: bd6c56f50d15b22e2348488769580e8a6a378f6b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5186: 0008b3e1b2cf7a73b1e995031c9a73fc97b35aad @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14422: 97070eddcfe9389e89eff883c1738c5541010fe4 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
97070eddcfe9 drm/i915/guc: Enable guc logging on guc log relay write
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14422/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] drm/i915/guc: Enable guc logging on guc log relay write
2019-09-16 22:50 [PATCH v2] drm/i915/guc: Enable guc logging on guc log relay write Robert M. Fosha
2019-09-16 23:52 ` ✗ Fi.CI.BAT: failure for drm/i915/guc: Enable guc logging on guc log relay write (rev3) Patchwork
@ 2019-09-17 21:00 ` Matthew Brost
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Brost @ 2019-09-17 21:00 UTC (permalink / raw)
To: Robert M. Fosha; +Cc: intel-gfx
On Mon, Sep 16, 2019 at 03:50:18PM -0700, Robert M. Fosha wrote:
>Creating and opening the GuC log relay file enables and starts
>the relay potentially before the caller is ready to consume logs.
>Change the behavior so that relay starts only on an explicit call
>to the write function (with a value of '1'). Other values flush
>the log relay as before.
>
>v2: Style changes and fix typos. Add guc_log_relay_stop()
>function. (Daniele)
>
>Cc: Matthew Brost <matthew.brost@intel.com>
>Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>Signed-off-by: Robert M. Fosha <robert.m.fosha@intel.com>
>---
> drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 53 +++++++++++++++++-----
> drivers/gpu/drm/i915/gt/uc/intel_guc_log.h | 4 +-
> drivers/gpu/drm/i915/i915_debugfs.c | 22 +++++++--
> 3 files changed, 62 insertions(+), 17 deletions(-)
>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
>diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
>index 36332064de9c..e26c7748358b 100644
>--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
>+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
>@@ -226,7 +226,7 @@ static void guc_read_update_log_buffer(struct intel_guc_log *log)
>
> mutex_lock(&log->relay.lock);
>
>- if (WARN_ON(!intel_guc_log_relay_enabled(log)))
>+ if (WARN_ON(!intel_guc_log_relay_created(log)))
> goto out_unlock;
>
> /* Get the pointer to shared GuC log buffer */
>@@ -361,6 +361,7 @@ void intel_guc_log_init_early(struct intel_guc_log *log)
> {
> mutex_init(&log->relay.lock);
> INIT_WORK(&log->relay.flush_work, capture_logs_work);
>+ log->relay.started = false;
> }
>
> static int guc_log_relay_create(struct intel_guc_log *log)
>@@ -546,7 +547,7 @@ int intel_guc_log_set_level(struct intel_guc_log *log, u32 level)
> return ret;
> }
>
>-bool intel_guc_log_relay_enabled(const struct intel_guc_log *log)
>+bool intel_guc_log_relay_created(const struct intel_guc_log *log)
> {
> return log->relay.buf_addr;
> }
>@@ -560,7 +561,7 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
>
> mutex_lock(&log->relay.lock);
>
>- if (intel_guc_log_relay_enabled(log)) {
>+ if (intel_guc_log_relay_created(log)) {
> ret = -EEXIST;
> goto out_unlock;
> }
>@@ -585,6 +586,21 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
>
> mutex_unlock(&log->relay.lock);
>
>+ return 0;
>+
>+out_relay:
>+ guc_log_relay_destroy(log);
>+out_unlock:
>+ mutex_unlock(&log->relay.lock);
>+
>+ return ret;
>+}
>+
>+int intel_guc_log_relay_start(struct intel_guc_log *log)
>+{
>+ if (log->relay.started)
>+ return -EEXIST;
>+
> guc_log_enable_flush_events(log);
>
> /*
>@@ -594,14 +610,9 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
> */
> queue_work(system_highpri_wq, &log->relay.flush_work);
>
>- return 0;
>-
>-out_relay:
>- guc_log_relay_destroy(log);
>-out_unlock:
>- mutex_unlock(&log->relay.lock);
>+ log->relay.started = true;
>
>- return ret;
>+ return 0;
> }
>
> void intel_guc_log_relay_flush(struct intel_guc_log *log)
>@@ -610,6 +621,9 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log)
> struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
> intel_wakeref_t wakeref;
>
>+ if (!log->relay.started)
>+ return;
>+
> /*
> * Before initiating the forceful flush, wait for any pending/ongoing
> * flush to complete otherwise forceful flush may not actually happen.
>@@ -623,18 +637,33 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log)
> guc_log_capture_logs(log);
> }
>
>-void intel_guc_log_relay_close(struct intel_guc_log *log)
>+/*
>+ * Stops the relay log. Called from intel_guc_log_relay_close(), so no
>+ * possibility of race with start/flush since relay_write cannot race
>+ * relay_close.
>+ */
>+static void guc_log_relay_stop(struct intel_guc_log *log)
> {
> struct intel_guc *guc = log_to_guc(log);
> struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
>
>+ if (!log->relay.started)
>+ return;
>+
> guc_log_disable_flush_events(log);
> intel_synchronize_irq(i915);
>
> flush_work(&log->relay.flush_work);
>
>+ log->relay.started = false;
>+}
>+
>+void intel_guc_log_relay_close(struct intel_guc_log *log)
>+{
>+ guc_log_relay_stop(log);
>+
> mutex_lock(&log->relay.lock);
>- GEM_BUG_ON(!intel_guc_log_relay_enabled(log));
>+ GEM_BUG_ON(!intel_guc_log_relay_created(log));
> guc_log_unmap(log);
> guc_log_relay_destroy(log);
> mutex_unlock(&log->relay.lock);
>diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
>index 6f764879acb1..c252c022c5fc 100644
>--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
>+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
>@@ -47,6 +47,7 @@ struct intel_guc_log {
> struct i915_vma *vma;
> struct {
> void *buf_addr;
>+ bool started;
> struct work_struct flush_work;
> struct rchan *channel;
> struct mutex lock;
>@@ -65,8 +66,9 @@ int intel_guc_log_create(struct intel_guc_log *log);
> void intel_guc_log_destroy(struct intel_guc_log *log);
>
> int intel_guc_log_set_level(struct intel_guc_log *log, u32 level);
>-bool intel_guc_log_relay_enabled(const struct intel_guc_log *log);
>+bool intel_guc_log_relay_created(const struct intel_guc_log *log);
> int intel_guc_log_relay_open(struct intel_guc_log *log);
>+int intel_guc_log_relay_start(struct intel_guc_log *log);
> void intel_guc_log_relay_flush(struct intel_guc_log *log);
> void intel_guc_log_relay_close(struct intel_guc_log *log);
>
>diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
>index 43db50095257..3f86f2b60b92 100644
>--- a/drivers/gpu/drm/i915/i915_debugfs.c
>+++ b/drivers/gpu/drm/i915/i915_debugfs.c
>@@ -1871,8 +1871,8 @@ static void i915_guc_log_info(struct seq_file *m,
> struct intel_guc_log *log = &dev_priv->gt.uc.guc.log;
> enum guc_log_buffer_type type;
>
>- if (!intel_guc_log_relay_enabled(log)) {
>- seq_puts(m, "GuC log relay disabled\n");
>+ if (!intel_guc_log_relay_created(log)) {
>+ seq_puts(m, "GuC log relay not created\n");
> return;
> }
>
>@@ -2059,9 +2059,23 @@ i915_guc_log_relay_write(struct file *filp,
> loff_t *ppos)
> {
> struct intel_guc_log *log = filp->private_data;
>+ int val;
>+ int ret;
>
>- intel_guc_log_relay_flush(log);
>- return cnt;
>+ ret = kstrtoint_from_user(ubuf, cnt, 0, &val);
>+ if (ret < 0)
>+ return ret;
>+
>+ /*
>+ * Enable and start the guc log relay on value of 1.
>+ * Flush log relay for any other value.
>+ */
>+ if (val == 1)
>+ ret = intel_guc_log_relay_start(log);
>+ else
>+ intel_guc_log_relay_flush(log);
>+
>+ return ret ?: cnt;
> }
>
> static int i915_guc_log_relay_release(struct inode *inode, struct file *file)
>--
>2.21.0.5.gaeb582a983
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-17 21:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-16 22:50 [PATCH v2] drm/i915/guc: Enable guc logging on guc log relay write Robert M. Fosha
2019-09-16 23:52 ` ✗ Fi.CI.BAT: failure for drm/i915/guc: Enable guc logging on guc log relay write (rev3) Patchwork
2019-09-17 21:00 ` [PATCH v2] drm/i915/guc: Enable guc logging on guc log relay write Matthew Brost
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.