From: "Michał Winiarski" <michal.winiarski@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 7/8] drm/i915/guc: Extract doorbell verification into a function
Date: Wed, 13 Dec 2017 13:50:45 +0100 [thread overview]
Message-ID: <20171213125046.1735-7-michal.winiarski@intel.com> (raw)
In-Reply-To: <20171213125046.1735-1-michal.winiarski@intel.com>
We have the selftest that's checking doorbell create/destroy, so there's
no need to check all doorbells delaying the reset every time.
We do want to have that extra sanity check at module load/unload though.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
drivers/gpu/drm/i915/intel_guc_submission.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index 488110602e7e..4d2409466a3a 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -820,9 +820,19 @@ static bool doorbell_ok(struct intel_guc *guc, u16 db_id)
return false;
}
-static int guc_clients_doorbell_init(struct intel_guc *guc)
+static bool guc_verify_doorbells(struct intel_guc *guc)
{
u16 db_id;
+
+ for (db_id = 0; db_id < GUC_NUM_DOORBELLS; ++db_id)
+ if (!doorbell_ok(guc, db_id))
+ return false;
+
+ return true;
+}
+
+static int guc_clients_doorbell_init(struct intel_guc *guc)
+{
int ret;
ret = create_doorbell(guc->execbuf_client);
@@ -835,10 +845,6 @@ static int guc_clients_doorbell_init(struct intel_guc *guc)
return ret;
}
- /* Read back & verify all (used & unused) doorbell registers */
- for (db_id = 0; db_id < GUC_NUM_DOORBELLS; ++db_id)
- WARN_ON(!doorbell_ok(guc, db_id));
-
return 0;
}
@@ -1149,6 +1155,7 @@ int intel_guc_submission_init(struct intel_guc *guc)
goto err_log;
GEM_BUG_ON(!guc->ads_vma);
+ WARN_ON(!guc_verify_doorbells(guc));
ret = guc_clients_create(guc);
if (ret)
return ret;
@@ -1177,6 +1184,8 @@ void intel_guc_submission_fini(struct intel_guc *guc)
cancel_work_sync(&guc->preempt_work[id].work);
guc_clients_destroy(guc);
+ WARN_ON(!guc_verify_doorbells(guc));
+
guc_ads_destroy(guc);
intel_guc_log_destroy(guc);
guc_stage_desc_pool_destroy(guc);
--
2.14.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-12-13 12:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 12:50 [PATCH 1/8] drm/i915/guc: Move shared data allocation away from submission path Michał Winiarski
2017-12-13 12:50 ` [PATCH v2 2/8] drm/i915/guc: Move GuC workqueue allocations outside of the mutex Michał Winiarski
2017-12-13 15:23 ` Chris Wilson
2017-12-13 16:00 ` Chris Wilson
2017-12-13 12:50 ` [PATCH v2 3/8] drm/i915/guc: Extract guc_init from guc_init_hw Michał Winiarski
2017-12-13 12:50 ` [PATCH 4/8] drm/i915/guc: Call invalidate after changing the vfunc Michał Winiarski
2017-12-13 15:24 ` Chris Wilson
2017-12-13 12:50 ` [PATCH 5/8] drm/i915/guc: Extract doorbell creation from client allocation Michał Winiarski
2017-12-13 19:03 ` Michel Thierry
2017-12-13 12:50 ` [PATCH 6/8] drm/i915/guc: Extract clients allocation to submission_init Michał Winiarski
2017-12-13 19:10 ` Michel Thierry
2017-12-13 12:50 ` Michał Winiarski [this message]
2017-12-13 15:23 ` [PATCH 7/8] drm/i915/guc: Extract doorbell verification into a function Michal Wajdeczko
2017-12-13 19:10 ` Michel Thierry
2017-12-13 12:50 ` [PATCH 8/8] HAX Enable GuC Submission for CI Michał Winiarski
2017-12-13 18:15 ` Chris Wilson
2017-12-13 15:08 ` ✓ Fi.CI.BAT: success for series starting with [1/8] drm/i915/guc: Move shared data allocation away from submission path Patchwork
2017-12-13 15:29 ` [PATCH 1/8] " Chris Wilson
2017-12-13 17:33 ` ✓ Fi.CI.IGT: success for series starting with [1/8] " Patchwork
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=20171213125046.1735-7-michal.winiarski@intel.com \
--to=michal.winiarski@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