1. 23 8月, 2019 1 次提交
    • J
      drm/i915/psr: Make PSR registers relative to transcoders · 4ab4fa10
      José Roberto de Souza 提交于
      PSR registers are a mess, some have the full address while others just
      have the additional offset from psr_mmio_base.
      
      For BDW+ psr_mmio_base is nothing more than TRANSCODER_EDP_OFFSET +
      0x800 and using it makes more difficult for people with an PSR
      register address or PSR register name from from BSpec as i915 also
      don't match the BSpec names.
      For HSW psr_mmio_base is _DDI_BUF_CTL_A + 0x800 and PSR registers are
      only available in DDIA.
      
      Other reason to make relative to transcoder is that since BDW every
      transcoder have PSR registers, so in theory it should be possible to
      have PSR enabled in a non-eDP transcoder.
      
      So for BDW+ we can use _TRANS2() to get the register offset of any
      PSR register in any transcoder while for HSW we have _HSW_PSR_ADJ
      that will calculate the register offset for the single PSR instance,
      noting that we are already guarded about trying to enable PSR in other
      port than DDIA on HSW by the 'if (dig_port->base.port != PORT_A)' in
      intel_psr_compute_config(), this check should only be valid for HSW
      and will be changed in future.
      PSR2 registers and PSR_EVENT was added after Haswell so that is why
      _PSR_ADJ() is not used in some macros.
      
      The only registers that can not be relative to transcoder are
      PSR_IMR and PSR_IIR that are not relative to anything, so keeping it
      hardcoded. That changed for TGL but it will be handled in another
      patch.
      
      Also removing BDW_EDP_PSR_BASE from GVT because it is not used as it
      is the only PSR register that GVT have.
      
      v5:
      - Macros changed to be more explicit about HSW (Dhinakaran)
      - Squashed with the patch that added the tran parameter to the
      macros (Dhinakaran)
      
      v6:
      - Checking for interruption errors after module reload in the
      transcoder that will be used (Dhinakaran)
      - Using lowercase to the registers offsets
      
      v7:
      - Removing IS_HASWELL() from registers macros(Jani)
      
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Zhi Wang <zhi.a.wang@intel.com>
      Reviewed-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190820223325.27490-1-jose.souza@intel.com
      4ab4fa10
  2. 22 8月, 2019 2 次提交
  3. 18 8月, 2019 1 次提交
  4. 16 8月, 2019 1 次提交
  5. 14 8月, 2019 1 次提交
  6. 13 8月, 2019 1 次提交
  7. 11 8月, 2019 1 次提交
  8. 10 8月, 2019 2 次提交
  9. 09 8月, 2019 2 次提交
  10. 07 8月, 2019 2 次提交
  11. 06 8月, 2019 1 次提交
  12. 04 8月, 2019 1 次提交
  13. 03 8月, 2019 2 次提交
    • C
      drm/i915: Hide unshrinkable context objects from the shrinker · 1aff1903
      Chris Wilson 提交于
      The shrinker cannot touch objects used by the contexts (logical state
      and ring). Currently we mark those as "pin_global" to let the shrinker
      skip over them, however, if we remove them from the shrinker lists
      entirely, we don't event have to include them in our shrink accounting.
      
      By keeping the unshrinkable objects in our shrinker tracking, we report
      a large number of objects available to be shrunk, and leave the shrinker
      deeply unsatisfied when we fail to reclaim those. The shrinker will
      persist in trying to reclaim the unavailable objects, forcing the system
      into a livelock (not even hitting the dread oomkiller).
      
      v2: Extend unshrinkable protection for perma-pinned scratch and guc
      allocations (Tvrtko)
      v3: Notice that we should be pinned when marking unshrinkable and so the
      link cannot be empty; merge duplicate paths.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190802212137.22207-1-chris@chris-wilson.co.uk
      1aff1903
    • M
      drm/i915/uc: Move GuC error log to uc and release it on fini · 32ff76e8
      Michal Wajdeczko 提交于
      When we fail to load GuC and want to abort probe, we hit:
      
      <7> [229.915779] i915 0000:00:02.0: [drm:intel_uc_init_hw [i915]] GuC initialization failed -6
      <7> [229.915813] i915 0000:00:02.0: [drm:i915_gem_init_hw [i915]] Enabling uc failed (-6)
      <4> [229.953354] ------------[ cut here ]------------
      <4> [229.953355] WARN_ON(dev_priv->mm.shrink_count)
      <4> [229.953406] WARNING: CPU: 9 PID: 3287 at drivers/gpu/drm/i915/i915_gem.c:1684 i915_gem_cleanup_early+0xfc/0x110 [i915]
      <4> [229.953464] Call Trace:
      <4> [229.953489]  i915_driver_late_release+0x19/0x60 [i915]
      <4> [229.953514]  i915_driver_probe+0xb82/0x18a0 [i915]
      <4> [229.953519]  ? __pm_runtime_resume+0x4f/0x80
      <4> [229.953545]  i915_pci_probe+0x43/0x1b0 [i915]
      ...
      <4> [229.962951] ------------[ cut here ]------------
      <4> [229.962956] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
      <4> [229.962959] WARNING: CPU: 8 PID: 2395 at kernel/locking/mutex.c:912 __mutex_lock+0x750/0x9b0
      <4> [229.963091] Call Trace:
      <4> [229.963129]  ? i915_vma_destroy+0x86/0x350 [i915]
      <4> [229.963166]  ? i915_vma_destroy+0x86/0x350 [i915]
      <4> [229.963201]  i915_vma_destroy+0x86/0x350 [i915]
      <4> [229.963236]  __i915_gem_free_objects+0xb8/0x510 [i915]
      <4> [229.963270]  __i915_gem_free_work+0x5a/0x90 [i915]
      <4> [229.963275]  process_one_work+0x245/0x610
      
      as since commit 6f76098f ("drm/i915/uc: Move uC early functions
      inside the GT ones") we cleanup uc after gem.
      
      Move captured GuC load error log to uc struct and release it
      in intel_uc_fini() instead of intel_uc_driver_late_release()
      
      Note that intel_uc_driver_late_release() is now empty, but
      we can leave it as a placeholder for future code.
      Signed-off-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190802184055.31988-5-michal.wajdeczko@intel.com
      32ff76e8
  14. 02 8月, 2019 1 次提交
  15. 25 7月, 2019 1 次提交
  16. 23 7月, 2019 1 次提交
  17. 16 7月, 2019 1 次提交
  18. 14 7月, 2019 2 次提交
  19. 13 7月, 2019 1 次提交
  20. 12 7月, 2019 1 次提交
    • I
      drm/i915/tgl: Add power well support · 656409bb
      Imre Deak 提交于
      The patch adds the new power wells introduced by TGL (GEN 12) and
      maps these to existing/new power domains. The changes for GEN 12 wrt
      to GEN 11 are the following:
      
      - Transcoder#EDP removed from power well#1 (Transcoder#A used in
        low-power mode instead)
      - Transcoder#A is now backed by power well#1 instead of power well#3
      - The DDI#B/C combo PHY ports are now backed by power well#1 instead of
        power well#3
      - New power well#5 added for pipe#D functionality (TODO)
      - 2 additional TC ports (TC#5-6) backed by power well#3, 2 port
        specific IO power wells (only for the non-TBT modes) and 4 port
        specific AUX power wells (2-2 for TBT vs. non-TBT modes)
      - Power well#2 backs now VDSC/joining for pipe#A instead of VDSC for
        eDP and MIPI DSI (TODO)
      
      On TGL Port DDI#C changed to be a combo PHY (native DP/HDMI) and
      BSpec has renamed ports DDI#D-F to TC#4-6 respectively. Thus on ICL we
      have the following naming for ports:
      
      - Combo PHYs (native DP/HDMI):
        DDI#A-B
      - TBT/non-TBT (TC altmode, native DP/HDMI) PHYs:
        DDI#C-F
      
      Starting from GEN 12 we have the following naming for ports:
      - Combo PHYs (native DP/HDMI):
        DDI#A-C
      - TBT/non-TBT (TC altmode, native DP/HDMI) PHYs:
        DDI TC#1-6
      
      To save some space in the power domain enum the power domain naming in
      the driver reflects the above change, that is power domains TC#1-3 are
      added as aliases for DDI#D-F and new power domains are reserved for
      TC#4-6.
      
      v2 (Lucas):
        - Separate out the bits and definitions for TGL from the ICL ones.
          Fix use of TRANSCODER_EDP_VDSC, that is now the correct define since
          we don't define TRANSCODER_A_VDSC power domain to spare a one bit in
          the bitmask (suggested by Ville)
      v3 (Lucas):
        - Fix missing squashes on v2
        - Rebase on renamed TRANSCODER_EDP_VDSC
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190711173115.28296-9-lucas.demarchi@intel.com
      656409bb
  21. 11 7月, 2019 2 次提交
  22. 05 7月, 2019 2 次提交
  23. 03 7月, 2019 1 次提交
  24. 22 6月, 2019 1 次提交
    • C
      drm/i915: Throw away the active object retirement complexity · a93615f9
      Chris Wilson 提交于
      Remove the accumulated optimisations that we have for i915_vma_retire
      and reduce it to the bare essential of tracking the active object
      reference. This allows us to only use atomic operations, and so will be
      able to avoid the struct_mutex requirement.
      
      The principal loss here is the shrinker MRU bumping, so now if we have
      to shrink, we will do so in much more random order and more likely to
      try and shrink recently used objects. That is a nuisance, but shrinking
      active objects is a second step we try to avoid and will always be a
      system-wide performance issue.
      
      The other loss is here is in the automatic pruning of the
      reservation_object when idling. This is not as large an issue as upon
      reservation_object introduction as now adding new fences into the object
      replaces already signaled fences, keeping the array compact. But we do
      lose the auto-expiration of stale fences and unused arrays. That may be
      a noticeable problem for which we need to re-implement autopruning.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190621183801.23252-3-chris@chris-wilson.co.uk
      a93615f9
  25. 17 6月, 2019 3 次提交
  26. 14 6月, 2019 3 次提交
  27. 13 6月, 2019 1 次提交
  28. 12 6月, 2019 1 次提交