From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Sagar Arun Kamble <sagar.a.kamble@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v12 04/11] drm/i915: Create uC runtime and system suspend/resume helpers
Date: Fri, 29 Sep 2017 15:12:18 +0300 [thread overview]
Message-ID: <1506687138.4729.77.camel@linux.intel.com> (raw)
In-Reply-To: <1506581329-29720-5-git-send-email-sagar.a.kamble@intel.com>
+ Michal,
On the principle of code motion first, changes second, I'd like to see
the clean split-up from Michal before touching the files much. That way
git history will be easier to examine.
Few comments below.
On Thu, 2017-09-28 at 12:18 +0530, Sagar Arun Kamble wrote:
> Prepared generic helpers intel_uc_suspend, intel_uc_resume,
> intel_uc_runtime_suspend, intel_uc_runtime_resume. These are
> called from respective GEM functions.
> Only exception is intel_uc_resume that needs to be called
> w/ or w/o GuC loaded in i915_drm_resume path. Changes to
> add WOPCM condition check to load GuC during resume will be added
> in later patches.
>
> v2: Rebase w.r.t removal of GuC code restructuring.
>
> v3: Calling intel_uc_resume from i915_gem_resume post resuming
> i915 gem setup. This is symmetrical with i915_gem_suspend.
> Removed error messages from i915 suspend/resume routines as
> uC suspend/resume routines will have those. (Michal Wajdeczko)
> Declare wedged on uc_suspend failure and uc_resume failure.
> (Michał Winiarski)
> Keeping the uC suspend/resume function definitions close to other
> uC functions.
>
> v4: Added implementation to intel_uc_resume as GuC resume is
> needed to be triggered post reloading the firmware as well. Added
> comments about semantics of GuC resume with the firmware reload.
>
> v5: Updated return from i915_gem_runtime_suspend. Moved the comment
> about GuC reload optimization to intel_uc_init_hw. (Michal Wajdeczko)
> Updated comments as FIXME.
>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
<SNIP>
> @@ -1698,6 +1698,18 @@ static int i915_drm_resume(struct drm_device *dev)
> }
> mutex_unlock(&dev->struct_mutex);
>
> + /*
> + * FIXME: Currently we know that at the end of suspend we have done Full
I think "beginning of resume" is the one that bites us more.
> + * GPU reset and GuC is loaded again during i915_gem_init_hw.
> + * Now, send action to GuC to resume back again as earlier call to
> + * intel_uc_resume from i915_gem_resume would have done nothing.
> + * This needs to be skipped if GuC was not loaded during resume as
> + * intel_uc_resume would have been already called from i915_gem_resume.
> + */
> + ret = intel_uc_resume(dev_priv);
> + if (ret)
> + i915_gem_set_wedged(dev_priv);
I'm very sure we want to bring the system up with a backup of ELSP only
submission *even* if we used GuC when going to sleep.
> @@ -4571,7 +4573,9 @@ int i915_gem_suspend(struct drm_i915_private *dev_priv)
> if (WARN_ON(!intel_engines_are_idle(dev_priv)))
> i915_gem_set_wedged(dev_priv); /* no hope, discard everything */
>
> - intel_guc_suspend(dev_priv);
> + ret = intel_uc_suspend(dev_priv);
> + if (ret)
> + i915_gem_set_wedged(dev_priv); /* no hope, discard everything */
Isn't that an exxaragation when we still may have functional ELSP?
It may not be a bad idea to first bring up the ELSP submission and when
GuC has loaded, switch over. To get rid of the latency.
> @@ -4619,7 +4624,16 @@ int i915_gem_resume(struct drm_i915_private *dev_priv)
> */
> dev_priv->gt.resume(dev_priv);
>
> - intel_guc_resume(dev_priv);
> + /*
> + * FIXME: At the end of suspend, Full GPU reset is done which unloads
> + * the GuC firmware. If reset is avoided there, we can check the WOPCM
> + * status here to see if GuC is still loaded and just do GuC resume
> + * without reloading the firmware back.
> + */
Again, we're resetting at both directions, going to suspend and on
resume too. I'd classify these bot as more of a TODOs, because we only
get some latency that can be improved on, no broken behaviour to fix.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-29 12:14 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 6:48 [PATCH v12 00/11] GEM/GuC Suspend/Resume/Reset fixes and restructuring Sagar Arun Kamble
2017-09-28 6:48 ` [PATCH v12 01/11] drm/i915: Create GEM runtime resume helper and handle GEM suspend/resume errors Sagar Arun Kamble
2017-09-29 11:43 ` Joonas Lahtinen
2017-09-29 11:49 ` Chris Wilson
2017-09-29 13:16 ` Joonas Lahtinen
2017-09-29 13:51 ` Sagar Arun Kamble
2017-09-28 6:48 ` [PATCH v12 02/11] drm/i915: Update GEM suspend/resume flows with GuC suspend/resume functions Sagar Arun Kamble
2017-09-29 11:45 ` Joonas Lahtinen
2017-09-29 13:52 ` Sagar Arun Kamble
2017-09-28 6:48 ` [PATCH v12 03/11] drm/i915: Move i915_gem_restore_fences to i915_gem_resume Sagar Arun Kamble
2017-09-29 11:48 ` Joonas Lahtinen
2017-09-29 13:59 ` Sagar Arun Kamble
2017-09-29 14:01 ` Sagar Arun Kamble
2017-10-02 8:33 ` Joonas Lahtinen
2017-09-28 6:48 ` [PATCH v12 04/11] drm/i915: Create uC runtime and system suspend/resume helpers Sagar Arun Kamble
2017-09-29 12:12 ` Joonas Lahtinen [this message]
2017-09-29 14:13 ` Sagar Arun Kamble
2017-09-29 14:39 ` Michal Wajdeczko
2017-09-28 6:48 ` [PATCH v12 05/11] drm/i915/guc: Introduce intel_uc_sanitize Sagar Arun Kamble
2017-09-29 12:00 ` Joonas Lahtinen
2017-09-29 14:22 ` Sagar Arun Kamble
2017-10-02 8:37 ` Joonas Lahtinen
2017-09-28 6:48 ` [PATCH v12 06/11] drm/i915/guc: Make GuC related disable/destroy functions not depend on i915.enable_guc_submission Sagar Arun Kamble
2017-09-29 12:27 ` Joonas Lahtinen
2017-09-30 8:22 ` Sagar Arun Kamble
2017-10-02 8:51 ` Joonas Lahtinen
2017-09-28 6:48 ` [PATCH v12 07/11] drm/i915/guc: Update i915.enable_guc_loading check in intel_uc_fini_hw Sagar Arun Kamble
2017-09-29 12:29 ` Joonas Lahtinen
2017-09-28 6:48 ` [PATCH v12 08/11] drm/i915/guc: Update GuC ggtt.invalidate/interrupts/communication across RPM suspend/resume Sagar Arun Kamble
2017-09-28 6:48 ` [PATCH v12 09/11] drm/i915/guc: Update GuC functionality in intel_uc_suspend/intel_uc_resume Sagar Arun Kamble
2017-09-28 6:48 ` [PATCH v12 10/11] drm/i915/guc: Disable GuC submission and suspend it prior to i915 reset Sagar Arun Kamble
2017-09-28 6:48 ` [PATCH v12 11/11] drm/i915/guc: Fix GuC cleanup in unload path Sagar Arun Kamble
2017-09-28 7:11 ` ✗ Fi.CI.BAT: warning for GEM/GuC Suspend/Resume/Reset fixes and restructuring (rev5) Patchwork
2017-09-28 7:38 ` Sagar Arun Kamble
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=1506687138.4729.77.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sagar.a.kamble@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 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.