1. 20 6月, 2022 1 次提交
    • T
      drm/i915: Improve on suspend / resume time with VT-d enabled · 2ef6efa7
      Thomas Hellström 提交于
      When DMAR / VT-d is enabled, the display engine uses overfetching,
      presumably to deal with the increased latency. To avoid display engine
      errors and DMAR faults, as a workaround the GGTT is populated with scatch
      PTEs when VT-d is enabled. However starting with gen10, Write-combined
      writing of scratch PTES is no longer possible and as a result, populating
      the full GGTT with scratch PTEs like on resume becomes very slow as
      uncached access is needed.
      
      Therefore, on integrated GPUs utilize the fact that the PTEs are stored in
      stolen memory which retain content across S3 suspend. Don't clear the PTEs
      on suspend and resume. This improves on resume time with around 100 ms.
      While 100+ms might appear like a short time it's 10% to 20% of total resume
      time and important in some applications.
      
      One notable exception is Intel Rapid Start Technology which may cause
      stolen memory to be lost across what the OS percieves as S3 suspend.
      If IRST is enabled or if we can't detect whether IRST is enabled, retain
      the old workaround, clearing and re-instating PTEs.
      
      As an additional measure, if we detect that the last ggtt pte was lost
      during suspend, print a warning and re-populate the GGTT ptes
      
      On discrete GPUs, the display engine scans out from LMEM which isn't
      subject to DMAR, and presumably the workaround is therefore not needed,
      but that needs to be verified and disabling the workaround for dGPU,
      if possible, will be deferred to a follow-up patch.
      
      v2:
      - Rely on retained ptes to also speed up suspend and resume re-binding.
      - Re-build GGTT ptes if Intel rst is enabled.
      v3:
      - Re-build GGTT ptes also if we can't detect whether Intel rst is enabled,
        and if the guard page PTE and end of GGTT was lost.
      v4:
      - Fix some kerneldoc issues (Matthew Auld), rebase.
      Signed-off-by: NThomas Hellström <thomas.hellstrom@linux.intel.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220617152856.249295-1-thomas.hellstrom@linux.intel.com
      2ef6efa7
  2. 26 5月, 2022 1 次提交
  3. 20 5月, 2022 1 次提交
  4. 16 5月, 2022 1 次提交
  5. 21 4月, 2022 1 次提交
  6. 05 4月, 2022 2 次提交
  7. 30 3月, 2022 1 次提交
  8. 21 3月, 2022 1 次提交
  9. 03 3月, 2022 1 次提交
  10. 19 2月, 2022 1 次提交
  11. 14 2月, 2022 1 次提交
  12. 11 2月, 2022 2 次提交
  13. 10 2月, 2022 1 次提交
  14. 21 1月, 2022 1 次提交
  15. 10 1月, 2022 2 次提交
  16. 09 12月, 2021 1 次提交
  17. 17 11月, 2021 3 次提交
  18. 16 11月, 2021 1 次提交
  19. 11 11月, 2021 1 次提交
  20. 05 11月, 2021 1 次提交
  21. 03 11月, 2021 2 次提交
  22. 19 10月, 2021 1 次提交
  23. 14 10月, 2021 1 次提交
  24. 05 10月, 2021 1 次提交
  25. 04 10月, 2021 1 次提交
  26. 02 10月, 2021 1 次提交
  27. 01 10月, 2021 1 次提交
  28. 24 9月, 2021 1 次提交
    • T
      drm/i915 Implement LMEM backup and restore for suspend / resume · c56ce956
      Thomas Hellström 提交于
      Just evict unpinned objects to system. For pinned LMEM objects,
      make a backup system object and blit the contents to that.
      
      Backup is performed in three steps,
      1: Opportunistically evict evictable objects using the gpu blitter.
      2: After gt idle, evict evictable objects using the gpu blitter. This will
      be modified in an upcoming patch to backup pinned objects that are not used
      by the blitter itself.
      3: Backup remaining pinned objects using memcpy.
      
      Also move uC suspend to after 2) to make sure we have a functional GuC
      during 2) if using GuC submission.
      
      v2:
      - Major refactor to make sure gem_exec_suspend@hang-SX subtests work, and
        suspend / resume works with a slightly modified GuC submission enabling
        patch series.
      
      v3:
      - Fix a potential use-after-free (Matthew Auld)
      - Use i915_gem_object_create_shmem() instead of
        i915_gem_object_create_region (Matthew Auld)
      - Minor simplifications (Matthew Auld)
      - Fix up kerneldoc for i195_ttm_restore_region().
      - Final lmem_suspend() call moved to i915_gem_backup_suspend from
        i915_gem_suspend_late, since the latter gets called at driver unload
        and we don't unnecessarily want to run it at that time.
      
      v4:
      - Interface change of ttm- & lmem suspend / resume functions to use
        flags rather than bools. (Matthew Auld)
      - Completely drop the i915_gem_backup_suspend change (Matthew Auld)
      Signed-off-by: NThomas Hellström <thomas.hellstrom@linux.intel.com>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210922062527.865433-5-thomas.hellstrom@linux.intel.com
      c56ce956
  29. 20 9月, 2021 1 次提交
  30. 29 7月, 2021 1 次提交
  31. 15 7月, 2021 2 次提交
    • M
      drm/i915/icl: Use revid->stepping tables · cc7a3393
      Matt Roper 提交于
      Switch ICL to use a revid->stepping table as we're trying to do on all
      platforms going forward.  While we're at it, let's include some
      additional steppings that have popped up, even if we don't yet have any
      workarounds tied to those steppings (we probably need to audit our
      workaround list soon to see if any of the bounds have moved or if new
      workarounds have appeared).
      
      Note that the current bspec table is missing information about how to
      map PCI revision ID to GT/display steppings; it only provides an SoC
      stepping.  The mapping to GT/display steppings (which aren't always the
      same as the SoC stepping) used to be in the bspec, but was apparently
      dropped during an update in Nov 2019; I've made my changes here based on
      an older bspec snapshot that still had the necessary information.  We've
      requested that the missing information be restored.
      
      I'm only including the production revids in the table here since we're
      past the point at which we usually stop trying to support pre-production
      hardware.  An appropriate check is added to
      intel_detect_preproduction_hw() to print an error and taint the kernel
      just in case someone still tries to load the driver on old
      pre-production hardware.
      
      v2:
       - Drop pre-production steppings and add error/taint at startup when
         loading on pre-production hardware.
      
      Bspec: 21141  # pre-Nov 2019 snapshot
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210713193635.3390052-8-matthew.d.roper@intel.com
      cc7a3393
    • M
      drm/i915: Make pre-production detection use direct revid comparison · c314b693
      Matt Roper 提交于
      Although we're converting our workarounds to use a revid->stepping
      lookup table, the function that detects pre-production hardware should
      continue to compare against PCI revision ID values directly.  These are
      listed in the bspec as integers, so it's easier to confirm their
      correctness if we just use an integer literal rather than a symbolic
      name anyway.
      
      Bspec: 13620, 19131, 13626, 18329
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210713193635.3390052-3-matthew.d.roper@intel.com
      c314b693
  32. 07 7月, 2021 1 次提交
  33. 03 7月, 2021 1 次提交