From: don.hiatt@intel.com To: intel-gfx@lists.freedesktop.org Subject: [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission Date: Wed, 6 Nov 2019 09:40:03 -0800 [thread overview] Message-ID: <20191106174003.26162-2-don.hiatt@intel.com> (raw) In-Reply-To: <20191106174003.26162-1-don.hiatt@intel.com> 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/resume 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. v3: Fix typo, move suspend logic to remove goto. v4: Use intel_guc_submission_is_enabled() to check GuC submission status. Signed-off-by: Don Hiatt <don.hiatt@intel.com> --- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 7 +++++++ drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c index 019ae6486e8d..92d9305c0d73 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c @@ -553,6 +553,13 @@ int intel_guc_suspend(struct intel_guc *guc) GUC_POWER_D1, /* any value greater than GUC_POWER_D0 */ }; + /* + * If GuC communication is enabled but submission is not supported, + * we do not need to suspend the GuC. + */ + if (!intel_guc_submission_is_enabled(guc)) + return 0; + /* * 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 diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c index 629b19377a29..4dd43b99a334 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c @@ -605,6 +605,14 @@ static int __uc_resume(struct intel_uc *uc, bool enable_communication) if (enable_communication) guc_enable_communication(guc); + /* + * If GuC communication is enabled but submission is not supported, + * we do not need to resume the GuC but we do need to enable the + * GuC communication on resume (above). + */ + if (!intel_guc_submission_is_enabled(guc)) + return 0; + err = intel_guc_resume(guc); if (err) { DRM_DEBUG_DRIVER("Failed to resume GuC, err=%d", err); -- 2.20.1 _______________________________________________ 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: don.hiatt@intel.com To: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission Date: Wed, 6 Nov 2019 09:40:03 -0800 [thread overview] Message-ID: <20191106174003.26162-2-don.hiatt@intel.com> (raw) Message-ID: <20191106174003.pWn2uNC01-LvatrIeevYPn6HMXgW9JevNz3FOossAc8@z> (raw) In-Reply-To: <20191106174003.26162-1-don.hiatt@intel.com> 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/resume 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. v3: Fix typo, move suspend logic to remove goto. v4: Use intel_guc_submission_is_enabled() to check GuC submission status. Signed-off-by: Don Hiatt <don.hiatt@intel.com> --- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 7 +++++++ drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c index 019ae6486e8d..92d9305c0d73 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c @@ -553,6 +553,13 @@ int intel_guc_suspend(struct intel_guc *guc) GUC_POWER_D1, /* any value greater than GUC_POWER_D0 */ }; + /* + * If GuC communication is enabled but submission is not supported, + * we do not need to suspend the GuC. + */ + if (!intel_guc_submission_is_enabled(guc)) + return 0; + /* * 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 diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c index 629b19377a29..4dd43b99a334 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c @@ -605,6 +605,14 @@ static int __uc_resume(struct intel_uc *uc, bool enable_communication) if (enable_communication) guc_enable_communication(guc); + /* + * If GuC communication is enabled but submission is not supported, + * we do not need to resume the GuC but we do need to enable the + * GuC communication on resume (above). + */ + if (!intel_guc_submission_is_enabled(guc)) + return 0; + err = intel_guc_resume(guc); if (err) { DRM_DEBUG_DRIVER("Failed to resume GuC, err=%d", err); -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-11-06 17:40 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-06 17:40 [PATCH 1/2] drm/i915/guc: Add GuC method to determine if submission is active don.hiatt 2019-11-06 17:40 ` [Intel-gfx] " don.hiatt 2019-11-06 17:40 ` don.hiatt [this message] 2019-11-06 17:40 ` [Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission don.hiatt 2019-11-06 23:33 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/guc: Add GuC method to determine if submission is active Patchwork 2019-11-06 23:33 ` [Intel-gfx] " Patchwork 2019-11-07 0:13 ` [PATCH 1/2] " Daniele Ceraolo Spurio 2019-11-07 0:13 ` [Intel-gfx] " Daniele Ceraolo Spurio 2019-11-08 1:50 ` ✗ Fi.CI.IGT: failure for series starting with [1/2] " Patchwork 2019-11-08 1:50 ` [Intel-gfx] " Patchwork 2019-11-10 11:10 ` [PATCH 1/2] " Tomas Janousek 2019-11-10 11:10 ` [Intel-gfx] " Tomas Janousek 2019-11-11 18:04 ` Hiatt, Don 2019-11-11 18:04 ` [Intel-gfx] " Hiatt, Don 2019-11-15 1:11 don.hiatt 2019-11-15 1:11 ` [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission don.hiatt 2019-11-15 17:12 ` Summers, Stuart 2019-11-15 17:19 ` Chris Wilson 2019-11-15 17:26 ` Hiatt, Don 2019-11-15 17:29 ` Tomas Janousek 2019-11-15 17:31 ` Hiatt, Don 2019-11-15 17:35 ` Hiatt, Don 2019-11-15 17:22 ` Hiatt, Don
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=20191106174003.26162-2-don.hiatt@intel.com \ --to=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: linkBe 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.