1. Added D3Cold-Off support for runtime pm for discrete gpu. 2. LMEM is switched off and gpu is in off state in D3Cold-Off so, lmem & GT deep suspend/resume is added. 3. Re-used i915_gem_backup_suspend, i915_gem_suspend_late and i915_gem_resume to handle above 2. 4. These functions use runtime helpers, which in-turn call runtime suspend/resume callbacks and leads to deadlock. So, these helpers need to be avoided. 5. Removed rpm helpers in low level functions and added helpers at higher level functions in some cases. 6. There are cases, where there is heavy re-usage of low level functions and huge code refactoring is needed, for these cases used helper,is_intel_rpm_allowed to avoid rpm helpers. 7. Validated in headless setup and is working fine for basic igt tests. 8. Headed setup throwed some display warnings and is FIXME. 9. D3Cold policy yet to be included and is FIXME Signed-off-by: Tilak Tangudu <tilak.tangudu@xxxxxxxxx> Tilak Tangudu (11): drm/i915: Avoid rpm helpers in intel_guc_global_policies_update drm/i915: Avoid rpm helpers in intel_guc_slpc_set_media_ratio_mode drm/i915: Avoid rpm helpers in intel_gt_suspend_late drm/i915: Added is_intel_rpm_allowed helper drm/i915: Guard rpm helpers in gt helpers functions drm/i915: Avoid rpm helpers in try_context_registration drm/i915: Guard rc6 helpers with is_intel_rpm_allowed drm/i915: Guard rpm helpers in rpm_get/put drm/i915: Add i915_save/load_pci_state helpers drm/i915: Guard rpm helpers at gt_park/unpark drm/i915 : Add D3COLD OFF support drivers/gpu/drm/i915/gt/intel_engine_cs.c | 9 +- drivers/gpu/drm/i915/gt/intel_gt.c | 4 +- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 33 +++-- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 2 + drivers/gpu/drm/i915/gt/intel_rc6.c | 13 +- drivers/gpu/drm/i915/gt/intel_reset.c | 14 +- drivers/gpu/drm/i915/gt/selftest_gt_pm.c | 4 +- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 5 +- drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 8 +- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 28 ++-- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 9 +- drivers/gpu/drm/i915/i915_debugfs_params.c | 7 +- drivers/gpu/drm/i915/i915_driver.c | 134 ++++++++++++++---- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem.c | 5 +- drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_device_info.h | 1 + drivers/gpu/drm/i915/intel_runtime_pm.c | 15 ++ drivers/gpu/drm/i915/intel_runtime_pm.h | 1 + drivers/gpu/drm/i915/intel_wakeref.c | 8 +- .../i915/selftests/intel_scheduler_helpers.c | 13 +- 21 files changed, 228 insertions(+), 88 deletions(-) -- 2.25.1