1. 31 1月, 2020 1 次提交
  2. 30 1月, 2020 2 次提交
  3. 29 1月, 2020 1 次提交
  4. 25 1月, 2020 1 次提交
  5. 22 1月, 2020 1 次提交
  6. 18 1月, 2020 2 次提交
  7. 17 1月, 2020 1 次提交
  8. 10 1月, 2020 1 次提交
  9. 24 12月, 2019 1 次提交
  10. 22 12月, 2019 4 次提交
  11. 20 12月, 2019 2 次提交
  12. 14 12月, 2019 1 次提交
  13. 06 12月, 2019 1 次提交
  14. 28 11月, 2019 1 次提交
  15. 25 11月, 2019 2 次提交
    • C
      drm/i915/gt: Schedule request retirement when timeline idles · 31177017
      Chris Wilson 提交于
      The major drawback of commit 7e34f4e4 ("drm/i915/gen8+: Add RC6 CTX
      corruption WA") is that it disables RC6 while Skylake (and friends) is
      active, and we do not consider the GPU idle until all outstanding
      requests have been retired and the engine switched over to the kernel
      context. If userspace is idle, this task falls onto our background idle
      worker, which only runs roughly once a second, meaning that userspace has
      to have been idle for a couple of seconds before we enable RC6 again.
      Naturally, this causes us to consume considerably more energy than
      before as powersaving is effectively disabled while a display server
      (here's looking at you Xorg) is running.
      
      As execlists will get a completion event as each context is completed,
      we can use this interrupt to queue a retire worker bound to this engine
      to cleanup idle timelines. We will then immediately notice the idle
      engine (without userspace intervention or the aid of the background
      retire worker) and start parking the GPU. Thus during light workloads,
      we will do much more work to idle the GPU faster...  Hopefully with
      commensurate power saving!
      
      v2: Watch context completions and only look at those local to the engine
      when retiring to reduce the amount of excess work we perform.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112315
      References: 7e34f4e4 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
      References: 2248a283 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-3-chris@chris-wilson.co.uk
      (cherry picked from commit 4f88f874)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      31177017
    • C
      drm/i915/gt: Schedule request retirement when timeline idles · 4f88f874
      Chris Wilson 提交于
      The major drawback of commit 7e34f4e4 ("drm/i915/gen8+: Add RC6 CTX
      corruption WA") is that it disables RC6 while Skylake (and friends) is
      active, and we do not consider the GPU idle until all outstanding
      requests have been retired and the engine switched over to the kernel
      context. If userspace is idle, this task falls onto our background idle
      worker, which only runs roughly once a second, meaning that userspace has
      to have been idle for a couple of seconds before we enable RC6 again.
      Naturally, this causes us to consume considerably more energy than
      before as powersaving is effectively disabled while a display server
      (here's looking at you Xorg) is running.
      
      As execlists will get a completion event as each context is completed,
      we can use this interrupt to queue a retire worker bound to this engine
      to cleanup idle timelines. We will then immediately notice the idle
      engine (without userspace intervention or the aid of the background
      retire worker) and start parking the GPU. Thus during light workloads,
      we will do much more work to idle the GPU faster...  Hopefully with
      commensurate power saving!
      
      v2: Watch context completions and only look at those local to the engine
      when retiring to reduce the amount of excess work we perform.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112315
      References: 7e34f4e4 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
      References: 2248a283 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-3-chris@chris-wilson.co.uk
      4f88f874
  16. 12 11月, 2019 1 次提交
    • C
      drm/i915: Protect context while grabbing its name for the request · d231c15a
      Chris Wilson 提交于
      Inside print_request(), we query the context/timeline name. Nothing
      immediately protects the context from being freed if the request is
      complete -- we rely on serialisation by the caller to keep the name
      valid until they finish using it. Inside intel_engine_dump(), we
      generally only print the requests in the execution queue protected by the
      engine->active.lock, but we also show the pending execlists ports which
      are not protected and so require a rcu_read_lock to keep the pointer
      valid.
      
      [ 1695.700883] BUG: KASAN: use-after-free in i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.700981] Read of size 8 at addr ffff8887344f4d50 by task gem_ctx_persist/2968
      [ 1695.701068]
      [ 1695.701156] CPU: 1 PID: 2968 Comm: gem_ctx_persist Tainted: G     U            5.4.0-rc6+ #331
      [ 1695.701246] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017
      [ 1695.701334] Call Trace:
      [ 1695.701424]  dump_stack+0x5b/0x90
      [ 1695.701870]  ? i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.701964]  print_address_description.constprop.7+0x36/0x50
      [ 1695.702408]  ? i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.702856]  ? i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.702947]  __kasan_report.cold.10+0x1a/0x3a
      [ 1695.703390]  ? i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.703836]  i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.704241]  print_request+0x82/0x2e0 [i915]
      [ 1695.704638]  ? fwtable_read32+0x133/0x360 [i915]
      [ 1695.705042]  ? write_timestamp+0x110/0x110 [i915]
      [ 1695.705133]  ? _raw_spin_lock_irqsave+0x79/0xc0
      [ 1695.705221]  ? refcount_inc_not_zero_checked+0x91/0x110
      [ 1695.705306]  ? refcount_dec_and_mutex_lock+0x50/0x50
      [ 1695.705709]  ? intel_engine_find_active_request+0x202/0x230 [i915]
      [ 1695.706115]  intel_engine_dump+0x2c9/0x900 [i915]
      
      Fixes: c36eebd9 ("drm/i915/gt: execlists->active is serialised by the tasklet")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191111114323.5833-1-chris@chris-wilson.co.uk
      (cherry picked from commit fecffa46)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      d231c15a
  17. 11 11月, 2019 1 次提交
    • C
      drm/i915: Protect context while grabbing its name for the request · fecffa46
      Chris Wilson 提交于
      Inside print_request(), we query the context/timeline name. Nothing
      immediately protects the context from being freed if the request is
      complete -- we rely on serialisation by the caller to keep the name
      valid until they finish using it. Inside intel_engine_dump(), we
      generally only print the requests in the execution queue protected by the
      engine->active.lock, but we also show the pending execlists ports which
      are not protected and so require a rcu_read_lock to keep the pointer
      valid.
      
      [ 1695.700883] BUG: KASAN: use-after-free in i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.700981] Read of size 8 at addr ffff8887344f4d50 by task gem_ctx_persist/2968
      [ 1695.701068]
      [ 1695.701156] CPU: 1 PID: 2968 Comm: gem_ctx_persist Tainted: G     U            5.4.0-rc6+ #331
      [ 1695.701246] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017
      [ 1695.701334] Call Trace:
      [ 1695.701424]  dump_stack+0x5b/0x90
      [ 1695.701870]  ? i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.701964]  print_address_description.constprop.7+0x36/0x50
      [ 1695.702408]  ? i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.702856]  ? i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.702947]  __kasan_report.cold.10+0x1a/0x3a
      [ 1695.703390]  ? i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.703836]  i915_fence_get_timeline_name+0x53/0x90 [i915]
      [ 1695.704241]  print_request+0x82/0x2e0 [i915]
      [ 1695.704638]  ? fwtable_read32+0x133/0x360 [i915]
      [ 1695.705042]  ? write_timestamp+0x110/0x110 [i915]
      [ 1695.705133]  ? _raw_spin_lock_irqsave+0x79/0xc0
      [ 1695.705221]  ? refcount_inc_not_zero_checked+0x91/0x110
      [ 1695.705306]  ? refcount_dec_and_mutex_lock+0x50/0x50
      [ 1695.705709]  ? intel_engine_find_active_request+0x202/0x230 [i915]
      [ 1695.706115]  intel_engine_dump+0x2c9/0x900 [i915]
      
      Fixes: c36eebd9 ("drm/i915/gt: execlists->active is serialised by the tasklet")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191111114323.5833-1-chris@chris-wilson.co.uk
      fecffa46
  18. 08 11月, 2019 1 次提交
  19. 30 10月, 2019 1 次提交
  20. 29 10月, 2019 1 次提交
  21. 24 10月, 2019 4 次提交
  22. 22 10月, 2019 5 次提交
  23. 18 10月, 2019 2 次提交
  24. 16 10月, 2019 1 次提交
  25. 10 10月, 2019 1 次提交