An error occurred fetching the project authors.
  1. 21 Sep, 2019 1 commit
  2. 12 Sep, 2019 2 commits
  3. 11 Sep, 2019 1 commit
  4. 06 Sep, 2019 1 commit
    • Chris Wilson's avatar
      drm/i915: Protect debugfs per_file_stats with RCU lock · a8c15954
      Chris Wilson authored
      If we make sure we grab a strong reference to each object as we dump it,
      we can reduce the locks outside of our iterators to an rcu_read_lock.
      
      This should prevent errors like:
      [ 2138.371911] BUG: KASAN: use-after-free in per_file_stats+0x43/0x380 [i915]
      [ 2138.371924] Read of size 8 at addr ffff888223651000 by task cat/8293
      
      [ 2138.371947] CPU: 0 PID: 8293 Comm: cat Not tainted 5.3.0-rc6-CI-Custom_4352+ #1
      [ 2138.371953] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.40 07/14/2017
      [ 2138.371959] Call Trace:
      [ 2138.371974]  dump_stack+0x7c/0xbb
      [ 2138.372099]  ? per_file_stats+0x43/0x380 [i915]
      [ 2138.372108]  print_address_description+0x73/0x3a0
      [ 2138.372231]  ? per_file_stats+0x43/0x380 [i915]
      [ 2138.372352]  ? per_file_stats+0x43/0x380 [i915]
      [ 2138.372362]  __kasan_report+0x14e/0x192
      [ 2138.372489]  ? per_file_stats+0x43/0x380 [i915]
      [ 2138.372502]  kasan_report+0xe/0x20
      [ 2138.372625]  per_file_stats+0x43/0x380 [i915]
      [ 2138.372751]  ? i915_panel_show+0x110/0x110 [i915]
      [ 2138.372761]  idr_for_each+0xa7/0x160
      [ 2138.372773]  ? idr_get_next_ul+0x110/0x110
      [ 2138.372782]  ? do_raw_spin_lock+0x10a/0x1d0
      [ 2138.372923]  print_context_stats+0x264/0x510 [i915]
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Tested-by: default avatarDavid Weinehall <david.weinehall@linux.intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190903062133.27360-1-chris@chris-wilson.co.uk
      a8c15954
  5. 03 Sep, 2019 1 commit
    • Chris Wilson's avatar
      drm/i915: Replace obj->pin_global with obj->frontbuffer · 5a90606d
      Chris Wilson authored
      obj->pin_global was originally used as a means to keep the shrinker off
      the active scanout, but we use the vma->pin_count itself for that and
      the obj->frontbuffer to delay shrinking active framebuffers. The other
      role that obj->pin_global gained was for spotting display objects inside
      GEM and working harder to keep those coherent; for which we can again
      simply inspect obj->frontbuffer directly.
      
      Coming up next, we will want to manipulate the pin_global counter
      outside of the principle locks, so would need to make pin_global atomic.
      However, since obj->frontbuffer is already managed atomically, it makes
      sense to use that the primary key for display objects instead of having
      pin_global.
      
      Ville pointed out the principle difference is that obj->frontbuffer is
      set for as long as an intel_framebuffer is attached to an object, but
      obj->pin_global was only raised for as long as the object was active. In
      practice, this means that we consider the object as being on the scanout
      for longer than is strictly required, causing us to be more proactive in
      flushing -- though it should be true that we would have flushed
      eventually when the back became the front, except that on the flip path
      that flush is async but when hit from another ioctl it will be
      synchronous.
      
      v2: i915_gem_object_is_framebuffer()
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190902040303.14195-5-chris@chris-wilson.co.uk
      5a90606d
  6. 02 Sep, 2019 1 commit
  7. 28 Aug, 2019 1 commit
    • Imre Deak's avatar
      drm/i915: Align power domain names with port names · 8a84bacb
      Imre Deak authored
      There is a difference in BSpec's and the driver's designation of DDI
      ports. BSpec uses the following names:
      - before GEN11:
        BSpec/driver:
        	port A/B/C/D etc
      - GEN11:
        BSpec/driver:
      	port A-F
      - GEN12:
        BSpec:
        	port A/B/C for combo PHY ports
      	port TC1-6 for Type C PHY ports
        driver:
      	port A-I.
        The driver's port D name matches BSpec's TC1 port name.
      
      So far power domains were named according to the BSpec designation, to
      make it easier to match the code against the specification. That however
      can be confusing when a power domain needs to be matched to a port on
      GEN12+. To resolve that use the driver's port A-I designation for power
      domain names too and rename the corresponding power wells so that they
      reflect the mapping from the driver's to BSpec's port name.
      
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190823100711.27833-1-imre.deak@intel.com
      8a84bacb
  8. 23 Aug, 2019 6 commits
  9. 22 Aug, 2019 3 commits
  10. 18 Aug, 2019 1 commit
  11. 16 Aug, 2019 1 commit
  12. 14 Aug, 2019 1 commit
  13. 12 Aug, 2019 1 commit
  14. 11 Aug, 2019 1 commit
  15. 09 Aug, 2019 2 commits
  16. 08 Aug, 2019 2 commits
  17. 07 Aug, 2019 2 commits
  18. 06 Aug, 2019 1 commit
  19. 04 Aug, 2019 1 commit
  20. 02 Aug, 2019 2 commits
    • Chris Wilson's avatar
      drm/i915: Hide unshrinkable context objects from the shrinker · 1aff1903
      Chris Wilson authored
      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: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190802212137.22207-1-chris@chris-wilson.co.uk
      1aff1903
    • Michal Wajdeczko's avatar
      drm/i915/uc: Move GuC error log to uc and release it on fini · 32ff76e8
      Michal Wajdeczko authored
      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: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190802184055.31988-5-michal.wajdeczko@intel.com
      32ff76e8
  21. 01 Aug, 2019 1 commit
  22. 25 Jul, 2019 1 commit
  23. 23 Jul, 2019 1 commit
  24. 15 Jul, 2019 1 commit
  25. 13 Jul, 2019 2 commits
  26. 12 Jul, 2019 1 commit
  27. 11 Jul, 2019 1 commit
    • Imre Deak's avatar
      drm/i915/tgl: Add power well support · 656409bb
      Imre Deak authored
      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: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190711173115.28296-9-lucas.demarchi@intel.com
      656409bb