From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: <John.C.Harrison@Intel.com>, <Intel-GFX@Lists.FreeDesktop.Org>
Cc: DRI-Devel@Lists.FreeDesktop.Org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915/guc: Don't double enable a context
Date: Wed, 15 Nov 2023 13:18:02 -0800 [thread overview]
Message-ID: <3e78c9b5-073c-4e7b-95bb-fcee5717c85b@intel.com> (raw)
In-Reply-To: <20231110005409.304273-2-John.C.Harrison@Intel.com>
On 11/9/2023 4:54 PM, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
>
> If a context is blocked, unblocked and subitted repeatedly in rapid
> succession, the driver can end up trying to enable the context while
> the previous enable request is still in flight. This can lead to much
> confusion in the state tracking.
>
> Prevent that by checking the pending enable flag before trying to
> enable a context.
>
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Daniele
> ---
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index d37698bd6b91a..d399e4d238c10 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -720,7 +720,7 @@ static int __guc_add_request(struct intel_guc *guc, struct i915_request *rq)
> if (unlikely(context_blocked(ce) && !intel_context_is_parent(ce)))
> goto out;
>
> - enabled = context_enabled(ce) || context_blocked(ce);
> + enabled = context_enabled(ce) || context_blocked(ce) || context_pending_enable(ce);
>
> if (!enabled) {
> action[len++] = INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_SET;
next prev parent reply other threads:[~2023-11-15 21:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 0:54 [Intel-gfx] [PATCH 0/2] Don't send double context enable/disable requests John.C.Harrison
2023-11-10 0:54 ` [Intel-gfx] [PATCH 1/2] drm/i915/guc: Don't double enable a context John.C.Harrison
2023-11-15 21:18 ` Daniele Ceraolo Spurio [this message]
2023-11-10 0:54 ` [Intel-gfx] [PATCH 2/2] drm/i915/guc: Don't disable a context whose enable is still pending John.C.Harrison
2023-11-10 6:16 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for Don't send double context enable/disable requests 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=3e78c9b5-073c-4e7b-95bb-fcee5717c85b@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=DRI-Devel@Lists.FreeDesktop.Org \
--cc=Intel-GFX@Lists.FreeDesktop.Org \
--cc=John.C.Harrison@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