intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 6/6] drm/i915/uc: do not free err log on uc_fini
Date: Wed, 11 Mar 2020 18:16:31 -0700	[thread overview]
Message-ID: <20200312011631.15262-7-daniele.ceraolospurio@intel.com> (raw)
In-Reply-To: <20200312011631.15262-1-daniele.ceraolospurio@intel.com>

we do call uc_fini if there is an issue while loading the GuC, so we
can't delete in there the logs we need to debug the load failure.
Moving the log free to driver remove ensures the logs stick around ong
enough for us to dump them.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt.c    | 3 +--
 drivers/gpu/drm/i915/gt/uc/intel_uc.c | 9 +++++++--
 drivers/gpu/drm/i915/gt/uc/intel_uc.h | 1 +
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index 3dea8881e915..eda66b0d44bd 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -635,8 +635,7 @@ void intel_gt_driver_remove(struct intel_gt *gt)
 {
 	__intel_gt_disable(gt);
 
-	intel_uc_fini_hw(&gt->uc);
-	intel_uc_fini(&gt->uc);
+	intel_uc_driver_remove(&gt->uc);
 
 	intel_engines_release(gt);
 }
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index a4cbe06e06bd..b11e564ef22e 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -131,6 +131,13 @@ static void __uc_free_load_err_log(struct intel_uc *uc)
 		i915_gem_object_put(log);
 }
 
+void intel_uc_driver_remove(struct intel_uc *uc)
+{
+	intel_uc_fini_hw(uc);
+	intel_uc_fini(uc);
+	__uc_free_load_err_log(uc);
+}
+
 static inline bool guc_communication_enabled(struct intel_guc *guc)
 {
 	return intel_guc_ct_enabled(&guc->ct);
@@ -311,8 +318,6 @@ static void __uc_fini(struct intel_uc *uc)
 {
 	intel_huc_fini(&uc->huc);
 	intel_guc_fini(&uc->guc);
-
-	__uc_free_load_err_log(uc);
 }
 
 static int __uc_sanitize(struct intel_uc *uc)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.h b/drivers/gpu/drm/i915/gt/uc/intel_uc.h
index 5ae7b50b7dc1..9c954c589edf 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.h
@@ -34,6 +34,7 @@ struct intel_uc {
 
 void intel_uc_init_early(struct intel_uc *uc);
 void intel_uc_driver_late_release(struct intel_uc *uc);
+void intel_uc_driver_remove(struct intel_uc *uc);
 void intel_uc_init_mmio(struct intel_uc *uc);
 void intel_uc_reset_prepare(struct intel_uc *uc);
 void intel_uc_suspend(struct intel_uc *uc);
-- 
2.24.1

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

  parent reply	other threads:[~2020-03-12  1:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12  1:16 [Intel-gfx] [PATCH v2 0/6] Re-org uC debugfs files and move them under GT Daniele Ceraolo Spurio
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 1/6] drm/i915/gt: allow setting generic data pointer Daniele Ceraolo Spurio
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 2/6] drm/i915/guc: drop stage_pool debugfs Daniele Ceraolo Spurio
2020-03-13 11:37   ` Andi Shyti
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 3/6] drm/i915/huc: make "support huc" reflect HW capabilities Daniele Ceraolo Spurio
2020-03-13 14:55   ` Andi Shyti
2020-03-25 16:49   ` John Harrison
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 4/6] drm/i915/debugfs: move uC printers and update debugfs file names Daniele Ceraolo Spurio
2020-03-25 17:05   ` John Harrison
2020-03-25 17:14     ` Daniele Ceraolo Spurio
2020-03-25 17:35       ` John Harrison
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 5/6] drm/i915/uc: Move uC debugfs to its own folder under GT Daniele Ceraolo Spurio
2020-03-12  9:10   ` Jani Nikula
2020-03-13 15:38   ` Andi Shyti
2020-03-25 21:03   ` Daniele Ceraolo Spurio
2020-03-12  1:16 ` Daniele Ceraolo Spurio [this message]
2020-03-25 17:58   ` [Intel-gfx] [PATCH v2 6/6] drm/i915/uc: do not free err log on uc_fini John Harrison
2020-03-25 18:03     ` Daniele Ceraolo Spurio
2020-03-25 18:05       ` John Harrison
2020-03-12  4:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Re-org uC debugfs files and move them under GT (rev2) Patchwork
2020-03-12  4:14 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-03-12  4:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-12 22:43 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-03-25  1:47 ` [Intel-gfx] [PATCH v2 0/6] Re-org uC debugfs files and move them under GT Andi Shyti
2020-03-25 16:25   ` Daniele Ceraolo Spurio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200312011631.15262-7-daniele.ceraolospurio@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).