1. 11 May, 2020 2 commits
    • Mika Kuoppala's avatar
      drm/i915: Make intel_timeline_init static · e31fe02e
      Mika Kuoppala authored
      Commit fb5970da ("drm/i915/gt: Use the kernel_context to measure the
      breadcrumb size") removed the last external user for intel_timeline_init.
      Mark it static.
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      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/20200511102201.9275-1-mika.kuoppala@linux.intel.com
      e31fe02e
    • Chris Wilson's avatar
      drm/i915/gt: Mark up the racy read of execlists->context_tag · f4d49692
      Chris Wilson authored
      Since we are using bitops on context_tag to allow us to reserve and
      release inflight tags concurrently, the scan for the next bit is
      intentionally racy.
      
      [  516.446854] BUG: KCSAN: data-race in execlists_schedule_in.isra.0 [i915] / execlists_schedule_out [i915]
      [  516.446874]
      [  516.446886] write (marked) to 0xffff8881f7644048 of 8 bytes by interrupt on cpu 2:
      [  516.447076]  execlists_schedule_out+0x538/0x6a0 [i915]
      [  516.447263]  process_csb+0x10b/0x3d0 [i915]
      [  516.447449]  execlists_submission_tasklet+0x30/0x170 [i915]
      [  516.447468]  tasklet_action_common.isra.0+0x42/0x90
      [  516.447484]  __do_softirq+0xc8/0x206
      [  516.447498]  irq_exit+0xcd/0xe0
      [  516.447516]  do_IRQ+0x44/0xc0
      [  516.447535]  ret_from_intr+0x0/0x1c
      [  516.447550]  cpuidle_enter_state+0x199/0x400
      [  516.447572]  cpuidle_enter+0x50/0x90
      [  516.447587]  do_idle+0x197/0x1e0
      [  516.447600]  cpu_startup_entry+0x14/0x20
      [  516.447619]  start_secondary+0xf9/0x130
      [  516.447643]  secondary_startup_64+0xa4/0xb0
      [  516.447655]
      [  516.447671] read to 0xffff8881f7644048 of 8 bytes by task 460 on cpu 1:
      [  516.447863]  execlists_schedule_in.isra.0+0x3cf/0x5a0 [i915]
      [  516.448064]  execlists_dequeue+0xf8f/0x1690 [i915]
      [  516.448252]  __execlists_submission_tasklet+0x48/0x60 [i915]
      [  516.448440]  execlists_submit_request+0x2e2/0x310 [i915]
      [  516.448634]  submit_notify+0x8f/0xc8 [i915]
      [  516.448820]  __i915_sw_fence_complete+0x61/0x420 [i915]
      [  516.449005]  i915_sw_fence_complete+0x58/0x80 [i915]
      [  516.449208]  i915_sw_fence_commit+0x16/0x20 [i915]
      [  516.449399]  __i915_request_queue+0x60/0x70 [i915]
      [  516.449590]  i915_gem_do_execbuffer+0x33f1/0x4a00 [i915]
      [  516.449782]  i915_gem_execbuffer2_ioctl+0x2a2/0x550 [i915]
      [  516.449800]  drm_ioctl_kernel+0xe9/0x130
      [  516.449814]  drm_ioctl+0x27d/0x45e
      [  516.449827]  ksys_ioctl+0x89/0xb0
      [  516.449842]  __x64_sys_ioctl+0x42/0x60
      [  516.449864]  do_syscall_64+0x6e/0x2c0
      [  516.449878]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200511075722.13483-1-chris@chris-wilson.co.uk
      f4d49692
  2. 09 May, 2020 2 commits
  3. 08 May, 2020 5 commits
  4. 07 May, 2020 7 commits
  5. 06 May, 2020 1 commit
  6. 05 May, 2020 6 commits
  7. 04 May, 2020 15 commits
  8. 03 May, 2020 1 commit
  9. 01 May, 2020 1 commit
    • Chris Wilson's avatar
      drm/i915/gem: Try an alternate engine for relocations · 6f576d62
      Chris Wilson authored
      If at first we don't succeed, try try again.
      
      Not all engines may support the MI ops we need to perform asynchronous
      relocation patching, and so we end up falling back to a synchronous
      operation that has a liability of blocking. However, Tvrtko pointed out
      we don't need to use the same engine to perform the relocations as we
      are planning to execute the execbuf on, and so if we switch over to a
      working engine, we can perform the relocation asynchronously. The user
      execbuf will be queued after the relocations by virtue of fencing.
      
      This patch creates a new context per execbuf requiring asynchronous
      relocations on an unusable engines. This is perhaps a bit excessive and
      can be ameliorated by a small context cache, but for the moment we only
      need it for working around a little used engine on Sandybridge, and only
      if relocations are actually required to an active batch buffer.
      
      Now we just need to teach the relocation code to handle physical
      addressing for gen2/3, and we should then have universal support!
      Suggested-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Testcase: igt/gem_exec_reloc/basic-spin # snb
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200501192945.22215-3-chris@chris-wilson.co.uk
      6f576d62