From: John Spotswood <john.a.spotswood@intel.com>
To: "Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v2] drm/i915/guc: updated suspend/resume protocol
Date: Tue, 16 Apr 2019 16:16:01 -0700 [thread overview]
Message-ID: <1555456561.21178.30.camel@intel.com> (raw)
In-Reply-To: <20190413002059.27743-1-daniele.ceraolospurio@intel.com>
On Fri, 2019-04-12 at 17:20 -0700, Ceraolo Spurio, Daniele wrote:
> From: Michal Wajdeczko <michal.wajdeczko@intel.com>
>
> New GuC firmwares use updated sleep status definitions.
> The polling on scratch register 14 is also now required only on
> suspend
> and there is no need to provide the shared page.
>
> v2: include changes for polling and shared page
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.co
> m>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: John Spotswood <john.a.spotswood@intel.com>
Reviewed-by: John Spotswood <john.a.spotswood@intel.com>
> ---
> drivers/gpu/drm/i915/intel_guc.c | 50 +++++++++++------------
> ----
> drivers/gpu/drm/i915/intel_guc_fwif.h | 6 ++--
> 2 files changed, 24 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc.c
> b/drivers/gpu/drm/i915/intel_guc.c
> index 483c7019f817..cf943eb7537c 100644
> --- a/drivers/gpu/drm/i915/intel_guc.c
> +++ b/drivers/gpu/drm/i915/intel_guc.c
> @@ -539,25 +539,33 @@ int intel_guc_auth_huc(struct intel_guc *guc,
> u32 rsa_offset)
> return intel_guc_send(guc, action, ARRAY_SIZE(action));
> }
>
> -/*
> - * The ENTER/EXIT_S_STATE actions queue the save/restore operation
> in GuC FW and
> - * then return, so waiting on the H2G is not enough to guarantee GuC
> is done.
> - * When all the processing is done, GuC writes
> INTEL_GUC_SLEEP_STATE_SUCCESS to
> - * scratch register 14, so we can poll on that. Note that GuC does
> not ensure
> - * that the value in the register is different from
> - * INTEL_GUC_SLEEP_STATE_SUCCESS while the action is in progress so
> we need to
> - * take care of that ourselves as well.
> +/**
> + * intel_guc_suspend() - notify GuC entering suspend state
> + * @guc: the guc
> */
> -static int guc_sleep_state_action(struct intel_guc *guc,
> - const u32 *action, u32 len)
> +int intel_guc_suspend(struct intel_guc *guc)
> {
> struct drm_i915_private *dev_priv = guc_to_i915(guc);
> int ret;
> u32 status;
> + u32 action[] = {
> + INTEL_GUC_ACTION_ENTER_S_STATE,
> + GUC_POWER_D1, /* any value greater than GUC_POWER_D0
> */
> + };
> +
> + /*
> + * The ENTER_S_STATE action queues the save/restore
> operation in GuC FW
> + * and then returns, so waiting on the H2G is not enough to
> guarantee
> + * GuC is done. When all the processing is done, GuC writes
> + * INTEL_GUC_SLEEP_STATE_SUCCESS to scratch register 14, so
> we can poll
> + * on that. Note that GuC does not ensure that the value in
> the register
> + * is different from INTEL_GUC_SLEEP_STATE_SUCCESS while the
> action is
> + * in progress so we need to take care of that ourselves as
> well.
> + */
>
> I915_WRITE(SOFT_SCRATCH(14),
> INTEL_GUC_SLEEP_STATE_INVALID_MASK);
>
> - ret = intel_guc_send(guc, action, len);
> + ret = intel_guc_send(guc, action, ARRAY_SIZE(action));
> if (ret)
> return ret;
>
> @@ -577,21 +585,6 @@ static int guc_sleep_state_action(struct
> intel_guc *guc,
> return 0;
> }
>
> -/**
> - * intel_guc_suspend() - notify GuC entering suspend state
> - * @guc: the guc
> - */
> -int intel_guc_suspend(struct intel_guc *guc)
> -{
> - u32 data[] = {
> - INTEL_GUC_ACTION_ENTER_S_STATE,
> - GUC_POWER_D1, /* any value greater than GUC_POWER_D0
> */
> - intel_guc_ggtt_offset(guc, guc->shared_data)
> - };
> -
> - return guc_sleep_state_action(guc, data, ARRAY_SIZE(data));
> -}
> -
> /**
> * intel_guc_reset_engine() - ask GuC to reset an engine
> * @guc: intel_guc structure
> @@ -621,13 +614,12 @@ int intel_guc_reset_engine(struct intel_guc
> *guc,
> */
> int intel_guc_resume(struct intel_guc *guc)
> {
> - u32 data[] = {
> + u32 action[] = {
> INTEL_GUC_ACTION_EXIT_S_STATE,
> GUC_POWER_D0,
> - intel_guc_ggtt_offset(guc, guc->shared_data)
> };
>
> - return guc_sleep_state_action(guc, data, ARRAY_SIZE(data));
> + return intel_guc_send(guc, action, ARRAY_SIZE(action));
> }
>
> /**
> diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h
> b/drivers/gpu/drm/i915/intel_guc_fwif.h
> index 64b56da9775c..25d57c819e3f 100644
> --- a/drivers/gpu/drm/i915/intel_guc_fwif.h
> +++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
> @@ -648,9 +648,9 @@ enum intel_guc_report_status {
> };
>
> enum intel_guc_sleep_state_status {
> - INTEL_GUC_SLEEP_STATE_SUCCESS = 0x0,
> - INTEL_GUC_SLEEP_STATE_PREEMPT_TO_IDLE_FAILED = 0x1,
> - INTEL_GUC_SLEEP_STATE_ENGINE_RESET_FAILED = 0x2
> + INTEL_GUC_SLEEP_STATE_SUCCESS = 0x1,
> + INTEL_GUC_SLEEP_STATE_PREEMPT_TO_IDLE_FAILED = 0x2,
> + INTEL_GUC_SLEEP_STATE_ENGINE_RESET_FAILED = 0x3
> #define INTEL_GUC_SLEEP_STATE_INVALID_MASK 0x80000000
> };
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-04-16 23:16 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 8:44 [PATCH v2 00/22] GuC 32.0.3 Michal Wajdeczko
2019-04-11 8:44 ` [PATCH v2 01/22] drm/i915/guc: Change platform default GuC mode Michal Wajdeczko
2019-04-12 22:52 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 02/22] drm/i915/guc: Don't allow GuC submission Michal Wajdeczko
2019-04-15 7:37 ` Martin Peres
2019-04-11 8:44 ` [PATCH v2 03/22] drm/i915/guc: Simplify preparation of GuC parameter block Michal Wajdeczko
2019-04-15 18:27 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 04/22] drm/i915/guc: Update GuC firmware versions and names Michal Wajdeczko
2019-04-12 22:42 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 05/22] drm/i915/guc: Update GuC firmware CSS header Michal Wajdeczko
2019-04-15 20:25 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 06/22] drm/i915/guc: Update GuC boot parameters Michal Wajdeczko
2019-04-12 23:46 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 07/22] drm/i915/guc: Update GuC sleep status values Michal Wajdeczko
2019-04-13 0:06 ` Daniele Ceraolo Spurio
2019-04-13 0:24 ` Daniele Ceraolo Spurio
2019-04-15 20:21 ` John Spotswood
2019-04-13 0:20 ` [PATCH v2] drm/i915/guc: updated suspend/resume protocol Daniele Ceraolo Spurio
2019-04-16 23:16 ` John Spotswood [this message]
2019-04-11 8:44 ` [PATCH v2 08/22] drm/i915/guc: Update GuC sample-forcewake command Michal Wajdeczko
2019-04-13 0:10 ` Daniele Ceraolo Spurio
2019-04-16 23:45 ` John Spotswood
2019-04-11 8:44 ` [PATCH v2 09/22] drm/i915/guc: Update GuC ADS object definition Michal Wajdeczko
2019-04-13 1:16 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 10/22] drm/i915/guc: Always ask GuC to update power domain states Michal Wajdeczko
2019-04-15 20:46 ` Daniele Ceraolo Spurio
2019-04-16 23:26 ` John Spotswood
2019-04-11 8:44 ` [PATCH v2 11/22] drm/i915/guc: Reset GuC ADS during sanitize Michal Wajdeczko
2019-04-16 11:44 ` Lis, Tomasz
2019-04-11 8:44 ` [PATCH v2 12/22] drm/i915/guc: Treat GuC initialization failure as -EIO Michal Wajdeczko
2019-04-13 1:20 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 13/22] drm/i915/guc: New GuC interrupt register for Gen11 Michal Wajdeczko
2019-04-13 1:28 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 14/22] drm/i915/guc: New GuC scratch registers " Michal Wajdeczko
2019-04-13 1:30 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 15/22] drm/i915/huc: New HuC status register " Michal Wajdeczko
2019-04-15 21:19 ` Daniele Ceraolo Spurio
2019-04-15 21:44 ` Michal Wajdeczko
2019-04-15 22:10 ` Daniele Ceraolo Spurio
2019-04-15 22:23 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 16/22] drm/i915/guc: Create vfuncs for the GuC interrupts control functions Michal Wajdeczko
2019-04-15 17:51 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 17/22] drm/i915/guc: Correctly handle GuC interrupts on Gen11 Michal Wajdeczko
2019-04-11 8:44 ` [PATCH v2 18/22] drm/i915/guc: Update GuC CTB response definition Michal Wajdeczko
2019-04-15 17:57 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 19/22] drm/i915/guc: Enable GuC CTB communication on Gen11 Michal Wajdeczko
2019-04-11 23:58 ` Daniele Ceraolo Spurio
2019-04-11 8:44 ` [PATCH v2 20/22] drm/i915/guc: Define GuC firmware version for Icelake Michal Wajdeczko
2019-04-15 22:22 ` Srivatsa, Anusha
2019-04-11 8:44 ` [PATCH v2 21/22] drm/i915/huc: Define HuC " Michal Wajdeczko
2019-04-18 12:27 ` Ye, Tony
2019-04-11 8:44 ` [PATCH v2 22/22] HAX: prevent CI failures on configs with forced GuC submission Michal Wajdeczko
2019-04-12 11:30 ` Martin Peres
2019-04-12 11:54 ` Michal Wajdeczko
2019-04-11 19:17 ` ✗ Fi.CI.SPARSE: warning for GuC 32.0.3 (rev2) Patchwork
2019-04-11 19:37 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-11 20:24 ` [PATCH v2 00/22] GuC 32.0.3 Chris Wilson
2019-04-12 2:26 ` ✓ Fi.CI.IGT: success for GuC 32.0.3 (rev2) Patchwork
2019-04-13 0:46 ` ✗ Fi.CI.SPARSE: warning for GuC 32.0.3 (rev3) Patchwork
2019-04-13 1:09 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-13 4:33 ` ✓ Fi.CI.IGT: " 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=1555456561.21178.30.camel@intel.com \
--to=john.a.spotswood@intel.com \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.