Re: [Intel-gfx] [PATCH] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
> From: Ceraolo Spurio, Daniele > Sent: Friday, November 15, 2019 3:10 PM > To: Hiatt, Don ; intel-gfx@lists.freedesktop.org > Cc: Ewins, Jon ; KiteStramuort > ; S . Zharkoff ; > Wajdeczko, Michal ; Summers, Stuart > ; Chris Wilson ; Tomas > Janousek > Subject: Re: [PATCH] drm/i915/guc: Skip suspend/resume GuC action on > platforms w/o GuC submission > > > > On 11/15/2019 2:22 PM, Hiatt, Don wrote: > > > >> From: Ceraolo Spurio, Daniele > >> Sent: Friday, November 15, 2019 2:02 PM > >> To: Hiatt, Don ; intel-gfx@lists.freedesktop.org > >> Cc: Ewins, Jon ; KiteStramuort > >> ; S . Zharkoff ; > >> Wajdeczko, Michal ; Summers, Stuart > >> ; Chris Wilson ; > Tomas > >> Janousek > >> Subject: Re: [PATCH] drm/i915/guc: Skip suspend/resume GuC action on > >> platforms w/o GuC submission > >> > >> > >> > >> On 11/15/19 10:20 AM, don.hi...@intel.com wrote: > >>> From: Don Hiatt > >>> > >>> 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. > >>> > >>> Add intel_guc_submission_is_enabled() function to determine if > >>> GuC submission is active. > >>> > >>> 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. > >>> v5: No need to look at engine to determine if submission is enabled. > >>> Squash fix + intel_guc_submission_is_enabled() patch into one. > >>> > >>> Reported-by: KiteStramuort > >>> Reported-by: S. Zharkoff > >>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111594 > >>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111623 > >>> Fixes: f774f0964919 ("drm/i915/guc: Turn on GuC/HuC auto mode") > >> I don't think this Fixes tag is appropriate since we already reverted > >> that patch. > >> > > Can you suggest an appropriate tag? Chris suggest "guc/huc enabling by > default" patch > > but I couldn't find it and this one seemed similar. > > Do we want to backport this even if guc is off by default and taints on > enabling? if we do, then we probably need to go all the way back to when > we introduced the new binaries that show the problem ("drm/i915/guc: > Updates for GuC 32.0.3 firmware"). > Yes, we do as the original reports was with the user specifically enabling with the driver parameters. Thanks a lot! The update patch will be posted in a second. > Daniele > > > > >>> Cc: Michal Wajdeczko > >>> Cc: Daniele Ceralo Spurio > >>> Cc: Stuart Summers > >>> Cc: Chris Wilson > >>> Tested-by: Tomas Janousek > >>> Signed-off-by: Don Hiatt > >>> --- > >>>drivers/gpu/drm/i915/gt/uc/intel_guc.c | 7 +++ > >>>drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 > >>>drivers/gpu/drm/i915/i915_drv.h| 6 ++ > >>>3 files changed, 21 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 &
Re: [Intel-gfx] [PATCH] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
> From: Ceraolo Spurio, Daniele > Sent: Friday, November 15, 2019 2:02 PM > To: Hiatt, Don ; intel-gfx@lists.freedesktop.org > Cc: Ewins, Jon ; KiteStramuort > ; S . Zharkoff ; > Wajdeczko, Michal ; Summers, Stuart > ; Chris Wilson ; Tomas > Janousek > Subject: Re: [PATCH] drm/i915/guc: Skip suspend/resume GuC action on > platforms w/o GuC submission > > > > On 11/15/19 10:20 AM, don.hi...@intel.com wrote: > > From: Don Hiatt > > > > 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. > > > > Add intel_guc_submission_is_enabled() function to determine if > > GuC submission is active. > > > > 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. > > v5: No need to look at engine to determine if submission is enabled. > > Squash fix + intel_guc_submission_is_enabled() patch into one. > > > > Reported-by: KiteStramuort > > Reported-by: S. Zharkoff > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111594 > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111623 > > Fixes: f774f0964919 ("drm/i915/guc: Turn on GuC/HuC auto mode") > > I don't think this Fixes tag is appropriate since we already reverted > that patch. > Can you suggest an appropriate tag? Chris suggest "guc/huc enabling by default" patch but I couldn't find it and this one seemed similar. > > Cc: Michal Wajdeczko > > Cc: Daniele Ceralo Spurio > > Cc: Stuart Summers > > Cc: Chris Wilson > > Tested-by: Tomas Janousek > > Signed-off-by: Don Hiatt > > --- > > drivers/gpu/drm/i915/gt/uc/intel_guc.c | 7 +++ > > drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 > > drivers/gpu/drm/i915/i915_drv.h| 6 ++ > > 3 files changed, 21 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; > > + > > I would put this check inside intel_guc_resume(), for symmetry with the > one you put inside intel_guc_suspend(). > Will do. > Daniele > > > err = intel_guc_resume(guc); > > if (err) { > > DRM_DEBUG_DRIVER("Failed to resume GuC, err=%d", err); > > diff --git a/drivers/gpu/drm/i915/i915_drv.h > b/drivers/gpu/drm/i915/i915_drv.h > > index 7bc1d8c102b2..2b879472e760 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.h > > +++ b/drivers/gpu/drm/i915/i915_drv.h > > @@ -2044,4 +2044,10 @@ i915_coherent_map_type(struct drm_i915_private > *i915) > > return HAS_LLC(i915) ? I915_MAP_WB : I915_MAP_WC; > > } > > > > +static inline bool intel_guc_submission_is_enabled(struct intel_guc *guc) > > +{ > > + return intel_guc_is_submission_supported(guc) && > > + intel_guc_is_running(guc); > > +} > > + > > #endif > > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
Hi Stuart/Chris, > From: Chris Wilson > Sent: Friday, November 15, 2019 9:20 AM > To: Hiatt, Don ; Summers, Stuart > ; intel-gfx@lists.freedesktop.org > Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC > action on platforms w/o GuC submission > > Quoting Summers, Stuart (2019-11-15 17:12:58) > > On Thu, 2019-11-14 at 17:11 -0800, don.hi...@intel.com wrote: > > > From: Don Hiatt > > > > > > 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 > > > > Any reason not to just combine both of these into a single patch? > > Also please remember to include the bugzilla link, ask if the reporter > wants to be credited, and most important of all a Fixes: so we can > backport it correctly. If there is no singular cause, point at the > "guc/huc enabling by default" patch. > > Last but not least, think about how did we miss in this CI and provide > a Testcase: to verify that it is fixed and stays fixed. > -Chris Hi Stuart/Chris. Actually, I'll just combine them now. I think your point is valid and being a single patch will make it easier to backport and track wrt to Chris's comments. Thanks, don ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
> From: Tomas Janousek > Sent: Friday, November 15, 2019 9:29 AM > To: Chris Wilson > Cc: Hiatt, Don ; Summers, Stuart > ; intel-gfx@lists.freedesktop.org > Subject: Re: [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on > platforms w/o GuC submission > > Don, Chris, > > Also, as mentioned in another comment: > > Tested-by: Tomas Janousek > Thanks, Tomas. I replied to your comment earlier today. I'll include your 'Tested-by'. Thanks, don > (Do note that I'm running a backport to 5.3, > https://bugs.freedesktop.org/attachment.cgi?id=145969, not drm-tip.) > > -- > Tomáš Janoušek, a.k.a. Pivník, a.k.a. Liskni_si, http://work.lisk.in/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
> From: Chris Wilson > Sent: Friday, November 15, 2019 9:20 AM > To: Hiatt, Don ; Summers, Stuart > ; intel-gfx@lists.freedesktop.org > Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC > action on platforms w/o GuC submission > > Quoting Summers, Stuart (2019-11-15 17:12:58) > > On Thu, 2019-11-14 at 17:11 -0800, don.hi...@intel.com wrote: > > > From: Don Hiatt > > > > > > 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 > > > > Any reason not to just combine both of these into a single patch? > > Also please remember to include the bugzilla link, ask if the reporter > wants to be credited, and most important of all a Fixes: so we can > backport it correctly. If there is no singular cause, point at the > "guc/huc enabling by default" patch. > > Last but not least, think about how did we miss in this CI and provide > a Testcase: to verify that it is fixed and stays fixed. > -Chris Will do, thanks Chris. don ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
> From: Summers, Stuart > Sent: Friday, November 15, 2019 9:13 AM > > On Thu, 2019-11-14 at 17:11 -0800, don.hi...@intel.com wrote: > > From: Don Hiatt > > > > 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 > > Any reason not to just combine both of these into a single patch? > > Thanks, > Stuart > I didn't combine them for two reasons: 1) I wasn't sure if there'd be an ask to use intel_guc_submission_is_enabled() in other places. 2) The git log entry highlights the introduction of a new function available for use. I'll combine them if that's the consensus. don > > --- > > 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); ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm/i915/guc: Add GuC method to determine if submission is active.
> From: Tomas Janousek > Sent: Sunday, November 10, 2019 3:11 AM > To: Hiatt, Don > Cc: intel-gfx@lists.freedesktop.org > Subject: Re: [PATCH 1/2] drm/i915/guc: Add GuC method to determine if > submission is active. > > On Wed, Nov 06, 2019 at 09:40:02AM -0800, don.hi...@intel.com wrote: > > Add intel_guc_submission_is_enabled() function to determine if > > GuC submission is active. Based on code by Michal Wajdeczko. > > Don't forget to update USES_GUC_SUBMISSION (and/or > intel_uc_uses_guc_submission) to use this new function. > Michal said that you have to use USE_GUC_SUBMISSION until the engines are up and that this function can't replace it's usage. Michal: Based upon the feedback, do you have any issue with me going back to v2 of the patch? > (And I still think the "drm/i915/guc: Skip suspend/resume GuC action on" patch > should just use USES_GUC_SUBMISSION. The current version (v3 & v4) of the > patch which splits the logic between intel_guc.c and intel_uc.c just to avoid > the goto is making the code harder to maintain, in my opinion.) > > > > > Signed-off-by: Don Hiatt > > --- > > drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- > > drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h | 1 + > > drivers/gpu/drm/i915/i915_drv.h | 14 ++ > > 3 files changed, 16 insertions(+), 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 2498c55e0ea5..0aaef7c07879 100644 > > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c > > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c > > @@ -1081,7 +1081,7 @@ static void guc_interrupts_release(struct intel_gt > *gt) > > rps->pm_intrmsk_mbz &= ~ARAT_EXPIRED_INTRMSK; > > } > > > > -static void guc_set_default_submission(struct intel_engine_cs *engine) > > +void guc_set_default_submission(struct intel_engine_cs *engine) > > { > > /* > > * We inherit a bunch of functions from execlists that we'd like > > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h > b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h > > index 54d716828352..a0132f061ebc 100644 > > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h > > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h > > @@ -63,5 +63,6 @@ void intel_guc_submission_disable(struct intel_guc > *guc); > > void intel_guc_submission_fini(struct intel_guc *guc); > > int intel_guc_preempt_work_create(struct intel_guc *guc); > > void intel_guc_preempt_work_destroy(struct intel_guc *guc); > > +void guc_set_default_submission(struct intel_engine_cs *engine); > > > > #endif > > diff --git a/drivers/gpu/drm/i915/i915_drv.h > b/drivers/gpu/drm/i915/i915_drv.h > > index 7e0f67babe20..878d574bb1c1 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.h > > +++ b/drivers/gpu/drm/i915/i915_drv.h > > @@ -78,8 +78,10 @@ > > > > #include "gt/intel_lrc.h" > > #include "gt/intel_engine.h" > > +#include "gt/intel_gt.h" > > #include "gt/intel_gt_types.h" > > #include "gt/intel_workarounds.h" > > +#include "gt/uc/intel_guc_submission.h" > > #include "gt/uc/intel_uc.h" > > > > #include "intel_device_info.h" > > @@ -2032,4 +2034,16 @@ i915_coherent_map_type(struct drm_i915_private > *i915) > > return HAS_LLC(i915) ? I915_MAP_WB : I915_MAP_WC; > > } > > > > +static inline bool intel_guc_submission_is_enabled(struct intel_guc *guc) > > +{ > > + struct intel_gt *gt = guc_to_gt(guc); > > + struct intel_engine_cs *engine; > > + enum intel_engine_id id; > > + > > + for_each_engine(engine, gt, id) > > + return engine->set_default_submission == > > + guc_set_default_submission; > > + return false; > > +} > > + > > #endif > > -- > > 2.20.1 > > > > ___ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Tomáš Janoušek, a.k.a. Pivník, a.k.a. Liskni_si, http://work.lisk.in/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
> From: Wajdeczko, Michal > Sent: Tuesday, October 29, 2019 5:33 AM > To: intel-gfx@lists.freedesktop.org; Hiatt, Don > Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Skip suspend/resume GuC action > on platforms w/o GuC submission > > On Mon, 28 Oct 2019 22:25:27 +0100, wrote: > > > From: Don Hiatt > > > > 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 > > --- > > 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. Hi Michal, I looked at your patch wrt checking the set_default_submission vfunc but as that is for the engine, and here I only have access to the intel_guc struct. I'm not sure just where I can know what the default submission is and then flag it somewhere that I can then check here in the suspend/resume. I'll keep looking (sorry, I'm very new to this code). 😊 Thanks, don > > > + 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
Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms w/o GuC submission but enabled
> > From: Ceraolo Spurio, Daniele > > Sent: Monday, October 28, 2019 11:30 AM > > To: Hiatt, Don ; intel-gfx@lists.freedesktop.org > > Subject: Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms w/o > GuC > > submission but enabled > > > > > > > > On 10/28/19 11:17 AM, Hiatt, Don wrote: > > >> From: Ceraolo Spurio, Daniele > > >> Sent: Monday, October 28, 2019 9:44 AM > > >> To: Hiatt, Don ; intel-gfx@lists.freedesktop.org > > >> Subject: Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms > > >> w/o > > GuC > > >> submission but enabled > > >> > > >> > > >> > > >> On 10/24/19 9:29 AM, don.hi...@intel.com wrote: > > >>> From: Don Hiatt > > >>> > > >>> Check to see if GuC submission is enabled before requesting the > > >>> EXIT_S_STATE action. > > >>> > > >> > > >> You're only skipping the resume, but does it make any sense to do the > > >> suspend action if we're not going to call the resume one? Does guc do > > >> anything in the suspend action that we still require? I thought it only > > >> saved the submission status, which we don't care about if guc submission > > >> is disabled. > > >> > > >> Daniele > > >> > > > > > > Hi Daniele, > > > > > > I tried skipping the suspend all together but then the HuC gets timeouts > > > waiting for the GuC to acknowledge the authentication request which leads > to > > a > > > wedged GPU. ☹ > > > > > > > Do we know why? if we skip the suspend/resume H2G and reload the blobs > > after resetting the HW it should look like a clean boot from the HW > > perspective, so the fact that HuC auth times out feels weird and might > > hide other issues. I asked one of the guc devs and he also thinks this > > is not expected behavior. Can you dig a bit more? > > > > Thanks, > > Daniele > > > > No idea why but I'll do some digging and see what I find. > > Thanks! > > don > Hi Daniele, I was a little overzealous on my removal of suspend/resume. We still need to go through the steps of enable/disable GuC communication on suspend/resume but just not send the GuC action. My first attempt was not handling the GuC communication properly so that is why I was seeing the HuC authentication timesouts. I'm submitting new patch -- with the proper 'drm/i915' -- and will CC you. Thanks! don > > > BTW, I made a typo in the patch, should be 'drm/i915' not '914', I'll fix > > > that > > > up. > > > > > > Thanks, > > > > > > don > > > > > > > > >>> 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. Guard against this by only requesting the GuC action on > > >>> platforms that support GuC submission. > > >>> > > >>> I've verfied that intel_guc_resume() only gets called when driver > > >>> is loaded with: guc_enable={1,2,3}, all other cases (no args, > > >>> guc_enable={0,-1} the intel_guc_resume() is not called. > > >>> > > >>> Signed-off-by: Don Hiatt > > >>> --- > > >>>drivers/gpu/drm/i915/gt/uc/intel_guc.c | 5 - > > >>>1 file changed, 4 insertions(+), 1 deletion(-) > > >>> > > >>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > >> b/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > >>> index 37f7bcbf7dac..33318ed135c0 100644 > > >>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > >>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > >>> @@ -565,7 +565,10 @@ int intel_guc_resume(struct intel_guc *guc) > > >>> GUC_POWER_D0, > > >>> }; > > >>> > > >>> - return intel_guc_send(guc, action, ARRAY_SIZE(action)); > > >>> + if (guc->submission_supported) > > >>> + return intel_guc_send(guc, action, ARRAY_SIZE(action)); > > >>> + > > >>> + return 0; > > >>>} > > >>> > > >>>/** > > >>> > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms w/o GuC submission but enabled
> From: Ceraolo Spurio, Daniele > Sent: Monday, October 28, 2019 11:30 AM > To: Hiatt, Don ; intel-gfx@lists.freedesktop.org > Subject: Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms w/o GuC > submission but enabled > > > > On 10/28/19 11:17 AM, Hiatt, Don wrote: > >> From: Ceraolo Spurio, Daniele > >> Sent: Monday, October 28, 2019 9:44 AM > >> To: Hiatt, Don ; intel-gfx@lists.freedesktop.org > >> Subject: Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms w/o > GuC > >> submission but enabled > >> > >> > >> > >> On 10/24/19 9:29 AM, don.hi...@intel.com wrote: > >>> From: Don Hiatt > >>> > >>> Check to see if GuC submission is enabled before requesting the > >>> EXIT_S_STATE action. > >>> > >> > >> You're only skipping the resume, but does it make any sense to do the > >> suspend action if we're not going to call the resume one? Does guc do > >> anything in the suspend action that we still require? I thought it only > >> saved the submission status, which we don't care about if guc submission > >> is disabled. > >> > >> Daniele > >> > > > > Hi Daniele, > > > > I tried skipping the suspend all together but then the HuC gets timeouts > > waiting for the GuC to acknowledge the authentication request which leads to > a > > wedged GPU. ☹ > > > > Do we know why? if we skip the suspend/resume H2G and reload the blobs > after resetting the HW it should look like a clean boot from the HW > perspective, so the fact that HuC auth times out feels weird and might > hide other issues. I asked one of the guc devs and he also thinks this > is not expected behavior. Can you dig a bit more? > > Thanks, > Daniele > No idea why but I'll do some digging and see what I find. Thanks! don > > BTW, I made a typo in the patch, should be 'drm/i915' not '914', I'll fix > > that > > up. > > > > Thanks, > > > > don > > > > > >>> 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. Guard against this by only requesting the GuC action on > >>> platforms that support GuC submission. > >>> > >>> I've verfied that intel_guc_resume() only gets called when driver > >>> is loaded with: guc_enable={1,2,3}, all other cases (no args, > >>> guc_enable={0,-1} the intel_guc_resume() is not called. > >>> > >>> Signed-off-by: Don Hiatt > >>> --- > >>>drivers/gpu/drm/i915/gt/uc/intel_guc.c | 5 - > >>>1 file changed, 4 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c > >> b/drivers/gpu/drm/i915/gt/uc/intel_guc.c > >>> index 37f7bcbf7dac..33318ed135c0 100644 > >>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c > >>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c > >>> @@ -565,7 +565,10 @@ int intel_guc_resume(struct intel_guc *guc) > >>> GUC_POWER_D0, > >>> }; > >>> > >>> - return intel_guc_send(guc, action, ARRAY_SIZE(action)); > >>> + if (guc->submission_supported) > >>> + return intel_guc_send(guc, action, ARRAY_SIZE(action)); > >>> + > >>> + return 0; > >>>} > >>> > >>>/** > >>> ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms w/o GuC submission but enabled
> From: Ceraolo Spurio, Daniele > Sent: Monday, October 28, 2019 9:44 AM > To: Hiatt, Don ; intel-gfx@lists.freedesktop.org > Subject: Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms w/o GuC > submission but enabled > > > > On 10/24/19 9:29 AM, don.hi...@intel.com wrote: > > From: Don Hiatt > > > > Check to see if GuC submission is enabled before requesting the > > EXIT_S_STATE action. > > > > You're only skipping the resume, but does it make any sense to do the > suspend action if we're not going to call the resume one? Does guc do > anything in the suspend action that we still require? I thought it only > saved the submission status, which we don't care about if guc submission > is disabled. > > Daniele > Hi Daniele, I tried skipping the suspend all together but then the HuC gets timeouts waiting for the GuC to acknowledge the authentication request which leads to a wedged GPU. ☹ BTW, I made a typo in the patch, should be 'drm/i915' not '914', I'll fix that up. Thanks, don > > 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. Guard against this by only requesting the GuC action on > > platforms that support GuC submission. > > > > I've verfied that intel_guc_resume() only gets called when driver > > is loaded with: guc_enable={1,2,3}, all other cases (no args, > > guc_enable={0,-1} the intel_guc_resume() is not called. > > > > Signed-off-by: Don Hiatt > > --- > > drivers/gpu/drm/i915/gt/uc/intel_guc.c | 5 - > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c > b/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > index 37f7bcbf7dac..33318ed135c0 100644 > > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > @@ -565,7 +565,10 @@ int intel_guc_resume(struct intel_guc *guc) > > GUC_POWER_D0, > > }; > > > > - return intel_guc_send(guc, action, ARRAY_SIZE(action)); > > + if (guc->submission_supported) > > + return intel_guc_send(guc, action, ARRAY_SIZE(action)); > > + > > + return 0; > > } > > > > /** > > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i914/guc: Fix resume on platforms w/o GuC submission but enabled
> On Thu, 2019-10-24 at 09:29 -0700, don.hi...@intel.com wrote: > > From: Don Hiatt > > > > Check to see if GuC submission is enabled before requesting the > > EXIT_S_STATE action. > > > > 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. Guard against this by only requesting the GuC action on > > platforms that support GuC submission. > > > > I've verfied that intel_guc_resume() only gets called when driver > > is loaded with: guc_enable={1,2,3}, all other cases (no args, > > guc_enable={0,-1} the intel_guc_resume() is not called. > > > > Signed-off-by: Don Hiatt > > --- > > drivers/gpu/drm/i915/gt/uc/intel_guc.c | 5 - > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > b/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > index 37f7bcbf7dac..33318ed135c0 100644 > > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c > > @@ -565,7 +565,10 @@ int intel_guc_resume(struct intel_guc *guc) > > GUC_POWER_D0, > > }; > > > > - return intel_guc_send(guc, action, ARRAY_SIZE(action)); > > + if (guc->submission_supported) > > Hey Don, > > I might be missing something here, but glancing over the code for > submission_supported, it looks like this relies on the availability of > the firmware for the intended platform. Looking at the GuC table for > KBL, I do see this present (using KBL per your commit above). So > wouldn't this return true here if enable_guc is set to 1 or 3? > > Thanks, > Stuart Hi Stuart, KBL does not support GuC submission, just HuC authentication. I've instrumented the code and verified that all guc->submission_supported is always false when guc_enable is set for KBL. Thanks, don > > > + return intel_guc_send(guc, action, ARRAY_SIZE(action)); > > + > > + return 0; > > } > > > > /** ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx