drm/i915: GEM/GuC Interrupts/Suspend/Resume/Reset fixes and restructuring

Submitted by Sagar Arun Kamble on Oct. 17, 2017, 10:33 a.m.

Details

Reviewer None
Submitted Oct. 17, 2017, 10:33 a.m.
Last Updated Oct. 17, 2017, 6:23 p.m.
Revision 1

Cover Letter(s)

Revision 1
      This series addresses following features/fixes:
1. Restructuring to control GuC interrupts from guc.c functions
2. Making GuC interrupts enable/disable reference based and tying up with
   Logging at all places.
3. Handle suspend/resume/reset for GuC interrupts.
4. Logging fixes about RPM wakeref and skipping relay release during
   submission_fini.
5. GEM/GuC drm and runtime suspend/resume restructuring.
6. Runtime PM interrupt fix along resume path.
7. Handle GGTT invalidate and load status on reset.
8. Handle load status on resume from sleep with need to reload GuC
   and related fixes.

GuC suspend/resume is missing functionality to evict/acquire doorbells
across suspend cycle and that is marked as TODO.

I am keeping these many patches together in single series as most
of them are interrelated w.r.t suspend/resume/reset. Have arranged
them as per feature/fix need/chronology as I have thought of. If
needed, based on review will bring the important and independent
patches earlier in the series.

Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: MichaƂ Winiarski <michal.winiarski@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Sagar Arun Kamble (25):
  drm/i915: Export low level PM IRQ functions to control from GuC
    functions
  drm/i915/guc: Move GuC interrupts related functions from i915_irq.c to
    intel_guc.c
  drm/i915/guc: Pass intel_guc struct parameter to GuC interrupts
    functions
  drm/i915/guc: Sanitize module parameter guc_log_level
  drm/i915/guc: Make GuC logging related functions depend only on
    guc_log_level
  drm/i915/guc: Only release GuC log object during submission_fini
  drm/i915/guc: Grab RPM wakelock while disabling GuC interrupts
  drm/i915/guc: Add client support to enable/disable GuC interrupts
  drm/i915/guc: Fix GuC interrupts disabling with Logging
  drm/i915/guc: Skip interrupt enabling if Logging is already enabled
  drm/i915/guc: Restore GuC interrupts across suspend/reset if enabled
  drm/i915/guc: Pass intel_guc struct parameter to
    intel_guc_suspend/resume
  drm/i915: Create GEM runtime resume helper and handle GEM runtime
    suspend error
  drm/i915/guc: Update GEM suspend/resume flows with GuC suspend/resume
    functions
  drm/i915: Enable interrupts prior to GEM resume during i915_drm_resume
  drm/i915/uc: Create uC suspend and resume functions
  drm/i915/guc: Update uC suspend/resume function separating Host/GuC
    tasks
  drm/i915/uc: Introduce intel_uc_reset_state to initialize GuC/HuC
    reset state
  drm/i915/guc: Disable GuC GGTT invalidate post RESET
  drm/i915/guc: Introduce guc_mia_in_reset function
  drm/i915/guc: Prepare uc_resume_prepare to initialize GuC/HuC state
    during resume
  drm/i915/uc: Support resume from sleep w/ and w/o GuC/HuC load
  drm/i915/uc: Update GEM runtime resume w/ and w/o GuC/HuC load
  drm/i915/guc: Fix enable of GuC GGTT invalidation
  HAX enable GuC submission for CI

 drivers/gpu/drm/i915/i915_debugfs.c        |   8 +
 drivers/gpu/drm/i915/i915_drv.c            |  51 +++--
 drivers/gpu/drm/i915/i915_drv.h            |   3 +-
 drivers/gpu/drm/i915/i915_gem.c            |  33 +++-
 drivers/gpu/drm/i915/i915_guc_reg.h        |   1 +
 drivers/gpu/drm/i915/i915_guc_submission.c |   2 +-
 drivers/gpu/drm/i915/i915_irq.c            |  78 +-------
 drivers/gpu/drm/i915/i915_params.c         |   4 +-
 drivers/gpu/drm/i915/i915_params.h         |   4 +-
 drivers/gpu/drm/i915/intel_display.c       |   2 +
 drivers/gpu/drm/i915/intel_drv.h           |   7 +-
 drivers/gpu/drm/i915/intel_guc.c           | 140 ++++++++++++--
 drivers/gpu/drm/i915/intel_guc.h           |  19 +-
 drivers/gpu/drm/i915/intel_guc_log.c       |  27 +--
 drivers/gpu/drm/i915/intel_uc.c            | 297 +++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/intel_uc.h            |   6 +
 16 files changed, 518 insertions(+), 164 deletions(-)
    

Revisions

Patches download mbox

# Name Submitter State
[v14,01/25] drm/i915: Export low level PM IRQ functions to control from GuC functions Sagar Arun Kamble New
[v14,02/25] drm/i915/guc: Move GuC interrupts related functions from i915_irq.c to intel_guc.c Sagar Arun Kamble New
[v14,03/25] drm/i915/guc: Pass intel_guc struct parameter to GuC interrupts functions Sagar Arun Kamble New
[v14,04/25] drm/i915/guc: Sanitize module parameter guc_log_level Sagar Arun Kamble New
[v14,05/25] drm/i915/guc: Make GuC logging related functions depend only on guc_log_level Sagar Arun Kamble New
[v14,06/25] drm/i915/guc: Only release GuC log object during submission_fini Sagar Arun Kamble New
[v14,07/25] drm/i915/guc: Grab RPM wakelock while disabling GuC interrupts Sagar Arun Kamble New
[v14,08/25] drm/i915/guc: Add client support to enable/disable GuC interrupts Sagar Arun Kamble New
[v14,09/25] drm/i915/guc: Fix GuC interrupts disabling with Logging Sagar Arun Kamble New
[v14,10/25] drm/i915/guc: Skip interrupt enabling if Logging is already enabled Sagar Arun Kamble New
[v14,11/25] drm/i915/guc: Restore GuC interrupts across suspend/reset if enabled Sagar Arun Kamble New
[v14,12/25] drm/i915/guc: Pass intel_guc struct parameter to intel_guc_suspend/resume Sagar Arun Kamble New
[v14,13/25] drm/i915: Create GEM runtime resume helper and handle GEM runtime suspend error Sagar Arun Kamble New
[v14,14/25] drm/i915/guc: Update GEM suspend/resume flows with GuC suspend/resume functions Sagar Arun Kamble New
[v14,15/25] drm/i915: Enable interrupts prior to GEM resume during i915_drm_resume Sagar Arun Kamble New
[v14,16/25] drm/i915/uc: Create uC suspend and resume functions Sagar Arun Kamble New
[v14,17/25] drm/i915/guc: Update uC suspend/resume function separating Host/GuC tasks Sagar Arun Kamble New
[v14,18/25] drm/i915/uc: Introduce intel_uc_reset_state to initialize GuC/HuC reset state Sagar Arun Kamble New
[v14,19/25] drm/i915/guc: Disable GuC GGTT invalidate post RESET Sagar Arun Kamble New
[v14,20/25] drm/i915/guc: Introduce guc_mia_in_reset function Sagar Arun Kamble New
[v14,21/25] drm/i915/guc: Prepare uc_resume_prepare to initialize GuC/HuC state during resume Sagar Arun Kamble New
[v14,22/25] drm/i915/uc: Support resume from sleep w/ and w/o GuC/HuC load Sagar Arun Kamble New
[v14,23/25] drm/i915/uc: Update GEM runtime resume w/ and w/o GuC/HuC load Sagar Arun Kamble New
[v14,24/25] drm/i915/guc: Fix enable of GuC GGTT invalidation Sagar Arun Kamble New
[v14,25/25] HAX enable GuC submission for CI Sagar Arun Kamble New

Tests

Series 32114v1 drm/i915: GEM/GuC Interrupts/Suspend/Resume/Reset fixes and restructuring
https://patchwork.freedesktop.org/api/1.0/series/32114/revisions/1/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                fail       -> PASS       (fi-kbl-7500u) fdo#102514
        Subgroup common-hpd-after-suspend:
                dmesg-warn -> DMESG-FAIL (fi-kbl-7500u) fdo#102505
Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-warn -> SKIP       (fi-kbl-7500u) fdo#103285
Test drv_hangman:
        Subgroup error-state-basic:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_busy:
        Subgroup basic-busy-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-hang-default:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_close_race:
        Subgroup basic-process:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-threads:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_cpu_reloc:
        Subgroup basic:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_cs_tlb:
        Subgroup basic-default:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_ctx_create:
        Subgroup basic:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-files:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_ctx_exec:
        Subgroup basic:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_ctx_switch:
        Subgroup basic-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-default-heavy:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_exec_basic:
        Subgroup basic-blt:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-bsd:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-render:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-vebox:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup gtt-blt:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup gtt-bsd:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup gtt-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup gtt-render:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup gtt-vebox:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup readonly-blt:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup readonly-bsd:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup readonly-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup readonly-render:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup readonly-vebox:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_exec_create:
        Subgroup basic:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_exec_fence:
        Subgroup basic-busy-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-wait-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-await-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup await-hang-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup nb-await-default:
                pass       -> SKIP       (fi-kbl-7500u)
Test gem_exec_flush:
        Subgroup basic-batch-kernel-default-uc:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-batch-kernel-default-wb:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-uc-pro-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-uc-prw-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-uc-ro-default:
                pass       -> SKIP       (fi-kbl-7500u)
        Subgroup basic-uc-rw-default:
WARNING: Long output truncated

79104a2f00df1f402e8dad934d6a574f50a1b669 drm-tip: 2017y-10m-17d-15h-35m-59s UTC integration manifest
c8dcecdc352e HAX enable GuC submission for CI
b8053eb13e05 drm/i915/guc: Fix enable of GuC GGTT invalidation
02a9245c0cab drm/i915/uc: Update GEM runtime resume w/ and w/o GuC/HuC load
537862d5d7ca drm/i915/uc: Support resume from sleep w/ and w/o GuC/HuC load
fcdac93734f3 drm/i915/guc: Prepare uc_resume_prepare to initialize GuC/HuC state during resume
603fc0ef5adf drm/i915/guc: Introduce guc_mia_in_reset function
db21981bf178 drm/i915/guc: Disable GuC GGTT invalidate post RESET
f23ce0d437e2 drm/i915/uc: Introduce intel_uc_reset_state to initialize GuC/HuC reset state
ae2020adeaec drm/i915/guc: Update uC suspend/resume function separating Host/GuC tasks
27e757fb0d3c drm/i915/uc: Create uC suspend and resume functions
08b7aa402171 drm/i915: Enable interrupts prior to GEM resume during i915_drm_resume
4323d1517cc2 drm/i915/guc: Update GEM suspend/resume flows with GuC suspend/resume functions
f8352e69dff4 drm/i915: Create GEM runtime resume helper and handle GEM runtime suspend error
afa1a6bb8fce drm/i915/guc: Pass intel_guc struct parameter to intel_guc_suspend/resume
e120dd5945f8 drm/i915/guc: Restore GuC interrupts across suspend/reset if enabled
218270fe3122 drm/i915/guc: Skip interrupt enabling if Logging is already enabled
fd76e3edc7bd drm/i915/guc: Fix GuC interrupts disabling with Logging
4f84840c5e68 drm/i915/guc: Add client support to enable/disable GuC interrupts
11c6ff0d8cd2 drm/i915/guc: Grab RPM wakelock while disabling GuC interrupts
aa711dd0bf04 drm/i915/guc: Only release GuC log object during submission_fini
6a68e5d331e1 drm/i915/guc: Make GuC logging related functions depend only on guc_log_level
a4f63be1f5e3 drm/i915/guc: Sanitize module parameter guc_log_level
7c656e47f72a drm/i915/guc: Pass intel_guc struct parameter to GuC interrupts functions
acd3332788f5 drm/i915/guc: Move GuC interrupts related functions from i915_irq.c to intel_guc.c
59fea1aad822 drm/i915: Export low level PM IRQ functions to control from GuC functions