GuC suspend paths cleanup
Subsystems (2)
v2 cover GuC suspend paths cleanup
The work was started to fix bugs that were seen on the suspend and hibernate devices path.The initial issue to be seen was a warning with the CTB. In parallel there were issues seen on the suspend paths. This series works to resolve the errors in the GuC cleanup paths and be compatible with lockless reset.
Sujaritha Sundaresan (2):
drm/i915/guc: Splitting CT channel open/close functions drm/i915/guc: Calling guc_disable_communication in all suspend paths
drivers/gpu/drm/i915/i915_reset.c | 2 +- drivers/gpu/drm/i915/intel_guc.c | 12 ++++ drivers/gpu/drm/i915/intel_guc_ct.c | 90 +++++++++++++++++++++-------- drivers/gpu/drm/i915/intel_guc_ct.h | 3 + drivers/gpu/drm/i915/intel_uc.c | 23 ++++++-- drivers/gpu/drm/i915/intel_uc.h | 1 + integration-manifest | 32 ++++++++++ 7 files changed, 133 insertions(+), 30 deletions(-) create mode 100644 integration-manifest
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/2 drm/i915/guc: Splitting CT channel open/close functions
The aim of this patch is to allow enabling and disabling of CTB without requiring the mutex lock.
v2: Phasing out ctch_is_enabled function and replacing it with
ctch->enabled (Daniele)
--- drivers/gpu/drm/i915/intel_guc.c | 12 ++++ drivers/gpu/drm/i915/intel_guc_ct.c | 90 +++++++++++++++++++++-------- drivers/gpu/drm/i915/intel_guc_ct.h | 3 + 3 files changed, 80 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/intel_guc.c +12 -0
@@ -203,11 +203,19 @@ int intel_guc_init(struct intel_guc *guc) goto err_log;GEM_BUG_ON (!guc->ads_vma); +if (HAS_GUC_CT (dev_priv)) { + ret =intel_guc_ct_init (&guc->ct); +if (ret) + goto err_ads; + } +/* We need to notify the guc whenever we change the GGTT */ i915_ggtt_enable_guc (dev_priv);return 0 ; +err_ads: +intel_guc_ads_destroy (guc); err_log:intel_guc_log_destroy (&guc->log); err_shared:
@@ -222,6 +230,10 @@ void intel_guc_fini(struct intel_guc *guc)struct drm_i915_private *dev_priv =guc_to_i915 (guc);i915_ggtt_disable_guc (dev_priv); + +if (HAS_GUC_CT (dev_priv)) +intel_guc_ct_fini (&guc->ct); +intel_guc_ads_destroy (guc);intel_guc_log_destroy (&guc->log);guc_shared_data_destroy (guc);
drivers/gpu/drm/i915/intel_guc_ct.c +65 -25
175 lines not on this page · raw message
drivers/gpu/drm/i915/intel_guc_ct.h +3 -0
@@ -64,6 +64,7 @@ struct intel_guc_ct_buffer {struct intel_guc_ct_channel {struct i915_vma *vma;struct intel_guc_ct_buffer ctbs[2 ]; +bool enabled;u32 owner;u32 next_fence; };
@@ -90,6 +91,8 @@ struct intel_guc_ct { };void intel_guc_ct_init_early (struct intel_guc_ct *ct); +int intel_guc_ct_init (struct intel_guc_ct *ct); +void intel_guc_ct_fini (struct intel_guc_ct *ct);int intel_guc_ct_enable (struct intel_guc_ct *ct);void intel_guc_ct_disable (struct intel_guc_ct *ct);
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 2/2 drm/i915/guc: Calling guc_disable_communication in all suspend paths
In reply to Sujaritha SundaresanThis aim of this patch is to call guc_disable_communication in all suspend paths. The reason to introduce this is to resolve a bug that occurred due to suspend late not being called in the hibernate devices path.
--- drivers/gpu/drm/i915/i915_reset.c | 2 +- drivers/gpu/drm/i915/intel_uc.c | 23 +++++++++++++++++++---- drivers/gpu/drm/i915/intel_uc.h | 1 + 3 files changed, 21 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_reset.c +1 -1
@@ -673,7 +673,7 @@ static void reset_prepare(struct drm_i915_private *i915)for_each_engine (engine, i915, id)reset_prepare_engine (engine); -intel_uc_sanitize (i915); +intel_uc_reset_prepare (i915);revoke_mmaps (i915); }
drivers/gpu/drm/i915/intel_uc.c +19 -4
@@ -332,8 +332,6 @@ void intel_uc_sanitize(struct drm_i915_private *i915)GEM_BUG_ON (!HAS_GUC (i915)); -guc_disable_communication (guc); -intel_huc_sanitize (huc);intel_guc_sanitize (guc);
@@ -451,6 +449,23 @@ void intel_uc_fini_hw(struct drm_i915_private *i915)guc_disable_communication (guc); } +/** +* intel_uc_reset_prepare - Prepare for reset +* @i915: device private +* +* Preparing for full gpu reset. +*/ +void intel_uc_reset_prepare (struct drm_i915_private *i915) +{ +struct intel_guc *guc = &i915->guc; + +if (!USES_GUC (i915)) +return ; + +guc_disable_communication (guc); +intel_uc_sanitize (i915); +} +int intel_uc_suspend (struct drm_i915_private *i915) {struct intel_guc *guc = &i915->guc;
@@ -468,7 +483,7 @@ int intel_uc_suspend(struct drm_i915_private *i915)return err; } -gen9_disable_guc_interrupts (i915); +guc_disable_communication (guc);return 0 ; }
@@ -484,7 +499,7 @@ int intel_uc_resume(struct drm_i915_private *i915)if (guc->fw.load_status !=INTEL_UC_FIRMWARE_SUCCESS )return 0 ; -gen9_enable_guc_interrupts (i915); +guc_enable_communication (guc); err =intel_guc_resume (guc);if (err) {
drivers/gpu/drm/i915/intel_uc.h +1 -0
@@ -38,6 +38,7 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv);void intel_uc_fini_hw (struct drm_i915_private *dev_priv);int intel_uc_init (struct drm_i915_private *dev_priv);void intel_uc_fini (struct drm_i915_private *dev_priv); +void intel_uc_reset_prepare (struct drm_i915_private *i915);int intel_uc_suspend (struct drm_i915_private *dev_priv);int intel_uc_resume (struct drm_i915_private *dev_priv);
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for GuC suspend paths cleanup (rev2)
In reply to Sujaritha Sundaresan== Series Details ==
== Series Details ==
Series: GuC suspend paths cleanup (rev2)
URL : https://patchwork.freedesktop.org/series/56697/
State : failure
== Summary ==
CALL scripts/checksyscalls.sh
DESCEND objtool
CHK include/generated/compile.h
CC [M] drivers/gpu/drm/i915/intel_guc_ct.odrivers/gpu/drm/i915/intel_guc_ct.c: In function ‘ctch_enable’:drivers/gpu/drm/i915/intel_guc_ct.c:229:2: error: expected ‘;’ before ‘base’
base = intel_guc_ggtt_offset(guc, ctch->vma);
^~~~scripts/Makefile.build:276: recipe for target 'drivers/gpu/drm/i915/intel_guc_ct.o' failed make[4]: *** [drivers/gpu/drm/i915/intel_guc_ct.o] Error 1 scripts/Makefile.build:492: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:492: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:492: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1043: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx