From: Michel Thierry <michel.thierry@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Subject: [RFC 2/3] drm/i915/guc: Omit guc_init_doorbell_hw during driver load
Date: Wed, 15 Nov 2017 10:30:28 -0800 [thread overview]
Message-ID: <20171115183029.2990-2-michel.thierry@intel.com> (raw)
In-Reply-To: <20171115183029.2990-1-michel.thierry@intel.com>
During driver load we create the GuC clients and allocate their
doorbells just before executing guc_init_doorbell_hw; but since we just
created these doorbells, how can they be out of sync?
This code has had more than enough refactoring (2 more still in progress)
so I would not be surprised if calling guc_init_doorbell_hw made sense at
some point, but not anymore.
The resume path is different, in this case the driver doesn't
recreate clients, and it is still reasonable to validate/reallocate the
doorbells in order to confirm that they still belong to the clients.
And probably guc_init_doorbell_hw is no longer the right name, but I'll
leave that to someone else.
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_guc_submission.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 5d6576e01a91..d6762ca42cf1 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -1424,16 +1424,16 @@ int i915_guc_submission_enable(struct drm_i915_private *dev_priv)
} else {
guc_reset_wq(guc->execbuf_client);
guc_reset_wq(guc->preempt_client);
+
+ err = guc_init_doorbell_hw(guc);
+ if (err)
+ goto err_free_clients;
}
err = intel_guc_sample_forcewake(guc);
if (err)
goto err_free_clients;
- err = guc_init_doorbell_hw(guc);
- if (err)
- goto err_free_clients;
-
/* Take over from manual control of ELSP (execlists) */
guc_interrupts_capture(dev_priv);
--
2.15.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-15 18:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 18:30 [PATCH v4 1/3] drm/i915/selftests: Add a GuC doorbells selftest Michel Thierry
2017-11-15 18:30 ` Michel Thierry [this message]
2017-11-15 21:15 ` [RFC 2/3] drm/i915/guc: Omit guc_init_doorbell_hw during driver load Daniele Ceraolo Spurio
2017-11-16 5:41 ` Sagar Arun Kamble
2017-11-15 18:30 ` [PATCH 3/3] HAX enable GuC submission for CI Michel Thierry
2017-11-15 18:51 ` ✓ Fi.CI.BAT: success for series starting with [v4,1/3] drm/i915/selftests: Add a GuC doorbells selftest Patchwork
2017-11-15 19:57 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-11-16 11:12 ` [PATCH v4 1/3] " Chris Wilson
2017-11-16 15:10 ` Chris Wilson
2017-11-16 22:06 ` Michel Thierry
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=20171115183029.2990-2-michel.thierry@intel.com \
--to=michel.thierry@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sujaritha.sundaresan@intel.com \
/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