Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org, don.hiatt@intel.com
Subject: Re: [PATCH] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
Date: Tue, 29 Oct 2019 13:33:22 +0100	[thread overview]
Message-ID: <op.0ae85w05xaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20191028212527.24401-1-don.hiatt@intel.com>

On Mon, 28 Oct 2019 22:25:27 +0100, <don.hiatt@intel.com> wrote:

> From: Don Hiatt <don.hiatt@intel.com>
>
> On some platforms (e.g. KBL) that do not support GuC submission, but
> the user enabled the GuC communication (e.g for HuC authentication)
> calling the GuC EXIT_S_STATE action results in lose of ability to
> enter RC6. We can remove the GuC suspend/remove entirely as we do
> not need to save the GuC submission status.
>
> v2: Do not suspend/resume the GuC on platforms that do not support
>     Guc Submission.
>
> Signed-off-by: Don Hiatt <don.hiatt@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_uc.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c  
> b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index 3fdbc935d155..04031564f0b1 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -572,10 +572,19 @@ void intel_uc_runtime_suspend(struct intel_uc *uc)
>  	if (!intel_guc_is_running(guc))
>  		return;
> +	/*
> +	 * If GuC communciation is enabled but submission is not supported,

typo

> +	 * we do not need to suspend the GuC but we do need to disable the
> +	 * GuC communication on suspend.
> +	 */
> +	if (!guc->submission_supported)

Using submission_supported flag directly can be tricky, as today it
is always set to false, but in the future it may indicate either that
submission is supported by the driver/fw and/or enabled by modparam.

There is no guarantee that it will reflect actual runtime status,
as even supported/unblocked guc submission may fallback to execlists.

We may need something like intel_guc_submission_is_active() that will
reflect actual mode of submission currently used by the driver.

> +		goto guc_disable_comm;

and maybe we can move above logic to intel_guc_suspend()
to do not introduce extra goto's ?

> +
>  	err = intel_guc_suspend(guc);
>  	if (err)
>  		DRM_DEBUG_DRIVER("Failed to suspend GuC, err=%d", err);
> +guc_disable_comm:
>  	guc_disable_communication(guc);
>  }
> @@ -605,6 +614,14 @@ static int __uc_resume(struct intel_uc *uc, bool  
> enable_communication)
>  	if (enable_communication)
>  		guc_enable_communication(guc);
> +	/*
> +	 * If GuC communciation is enabled but submission is not supported,

typo

> +	 * we do not need to resume the GuC but we do need to enable the
> +	 * GuC communication on resume (above).
> +	 */
> +	if (!guc->submission_supported)
> +		return 0;

see suspend case comment

> +
>  	err = intel_guc_resume(guc);
>  	if (err) {
>  		DRM_DEBUG_DRIVER("Failed to resume GuC, err=%d", err);

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

WARNING: multiple messages have this Message-ID (diff)
From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org, don.hiatt@intel.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
Date: Tue, 29 Oct 2019 13:33:22 +0100	[thread overview]
Message-ID: <op.0ae85w05xaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
Message-ID: <20191029123322.sRDEYVplB9YsrlUEHIouG26GLjAsgG6uqd4bjaUbwAk@z> (raw)
In-Reply-To: <20191028212527.24401-1-don.hiatt@intel.com>

On Mon, 28 Oct 2019 22:25:27 +0100, <don.hiatt@intel.com> wrote:

> From: Don Hiatt <don.hiatt@intel.com>
>
> On some platforms (e.g. KBL) that do not support GuC submission, but
> the user enabled the GuC communication (e.g for HuC authentication)
> calling the GuC EXIT_S_STATE action results in lose of ability to
> enter RC6. We can remove the GuC suspend/remove entirely as we do
> not need to save the GuC submission status.
>
> v2: Do not suspend/resume the GuC on platforms that do not support
>     Guc Submission.
>
> Signed-off-by: Don Hiatt <don.hiatt@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_uc.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c  
> b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index 3fdbc935d155..04031564f0b1 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -572,10 +572,19 @@ void intel_uc_runtime_suspend(struct intel_uc *uc)
>  	if (!intel_guc_is_running(guc))
>  		return;
> +	/*
> +	 * If GuC communciation is enabled but submission is not supported,

typo

> +	 * we do not need to suspend the GuC but we do need to disable the
> +	 * GuC communication on suspend.
> +	 */
> +	if (!guc->submission_supported)

Using submission_supported flag directly can be tricky, as today it
is always set to false, but in the future it may indicate either that
submission is supported by the driver/fw and/or enabled by modparam.

There is no guarantee that it will reflect actual runtime status,
as even supported/unblocked guc submission may fallback to execlists.

We may need something like intel_guc_submission_is_active() that will
reflect actual mode of submission currently used by the driver.

> +		goto guc_disable_comm;

and maybe we can move above logic to intel_guc_suspend()
to do not introduce extra goto's ?

> +
>  	err = intel_guc_suspend(guc);
>  	if (err)
>  		DRM_DEBUG_DRIVER("Failed to suspend GuC, err=%d", err);
> +guc_disable_comm:
>  	guc_disable_communication(guc);
>  }
> @@ -605,6 +614,14 @@ static int __uc_resume(struct intel_uc *uc, bool  
> enable_communication)
>  	if (enable_communication)
>  		guc_enable_communication(guc);
> +	/*
> +	 * If GuC communciation is enabled but submission is not supported,

typo

> +	 * we do not need to resume the GuC but we do need to enable the
> +	 * GuC communication on resume (above).
> +	 */
> +	if (!guc->submission_supported)
> +		return 0;

see suspend case comment

> +
>  	err = intel_guc_resume(guc);
>  	if (err) {
>  		DRM_DEBUG_DRIVER("Failed to resume GuC, err=%d", err);

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

  parent reply	other threads:[~2019-10-29 12:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 21:25 [PATCH] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission don.hiatt
2019-10-28 21:25 ` [Intel-gfx] " don.hiatt
2019-10-29  0:58 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-10-29  0:58   ` [Intel-gfx] " Patchwork
2019-10-29 12:33 ` Michal Wajdeczko [this message]
2019-10-29 12:33   ` [Intel-gfx] [PATCH] " Michal Wajdeczko
2019-10-29 21:15   ` Hiatt, Don
2019-10-29 21:15     ` [Intel-gfx] " Hiatt, Don
2019-10-30  7:25   ` Tomas Janousek
2019-10-30  7:25     ` [Intel-gfx] " Tomas Janousek
2019-10-30  7:53 ` ✗ Fi.CI.BUILD: failure for drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission (rev2) Patchwork
2019-10-30  7:53   ` [Intel-gfx] " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-10-30 21:22 [PATCH] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission don.hiatt
2019-11-15 18:20 don.hiatt
2019-11-15 22:02 ` Daniele Ceraolo Spurio
2019-11-15 22:22   ` Hiatt, Don
2019-11-15 23:10     ` Daniele Ceraolo Spurio
2019-11-15 23:15       ` Hiatt, Don
2019-11-15 23:15 don.hiatt
2019-11-16 10:04 ` Chris Wilson

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=op.0ae85w05xaggs7@mwajdecz-mobl1.ger.corp.intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=don.hiatt@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