1. 09 Mar, 2020 7 commits
    • Chris Wilson's avatar
      drm/i915/gt: Mark up racy check of last list element · 875c3b4b
      Chris Wilson authored
      [   25.025543] BUG: KCSAN: data-race in __i915_request_create [i915] / process_csb [i915]
      [   25.025561]
      [   25.025573] write (marked) to 0xffff8881e85c1620 of 8 bytes by task 696 on cpu 1:
      [   25.025789]  __i915_request_create+0x54b/0x5d0 [i915]
      [   25.026001]  i915_request_create+0xcc/0x150 [i915]
      [   25.026218]  i915_gem_do_execbuffer+0x2f70/0x4c20 [i915]
      [   25.026428]  i915_gem_execbuffer2_ioctl+0x2c3/0x580 [i915]
      [   25.026445]  drm_ioctl_kernel+0xe4/0x120
      [   25.026459]  drm_ioctl+0x297/0x4c7
      [   25.026472]  ksys_ioctl+0x89/0xb0
      [   25.026484]  __x64_sys_ioctl+0x42/0x60
      [   25.026497]  do_syscall_64+0x6e/0x2c0
      [   25.026510]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [   25.026522]
      [   25.026532] read to 0xffff8881e85c1620 of 8 bytes by interrupt on cpu 2:
      [   25.026742]  process_csb+0x8d6/0x1070 [i915]
      [   25.026949]  execlists_submission_tasklet+0x30/0x170 [i915]
      [   25.026969]  tasklet_action_common.isra.0+0x42/0xa0
      [   25.026984]  __do_softirq+0xd7/0x2cd
      [   25.026997]  irq_exit+0xbe/0xe0
      [   25.027009]  do_IRQ+0x51/0x100
      [   25.027021]  ret_from_intr+0x0/0x1c
      [   25.027033]  poll_idle+0x3e/0x13b
      [   25.027047]  cpuidle_enter_state+0x189/0x5d0
      [   25.027060]  cpuidle_enter+0x50/0x90
      [   25.027074]  do_idle+0x1a1/0x1f0
      [   25.027086]  cpu_startup_entry+0x14/0x16
      [   25.027100]  start_secondary+0x120/0x180
      [   25.027116]  secondary_startup_64+0xa4/0xb0
      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/20200309110934.868-2-chris@chris-wilson.co.uk
      875c3b4b
    • Chris Wilson's avatar
      drm/i915: Mark up unlocked update of i915_request.hwsp_seqno · 89f077ab
      Chris Wilson authored
      During i915_request_retire() we decouple the i915_request.hwsp_seqno
      from the intel_timeline so that it may be freed before the request is
      released. However, we need to warn the compiler that the pointer may
      update under its nose.
      
      [  171.438899] BUG: KCSAN: data-race in i915_request_await_dma_fence [i915] / i915_request_retire [i915]
      [  171.438920]
      [  171.438932] write to 0xffff8881e7e28ce0 of 8 bytes by task 148 on cpu 2:
      [  171.439174]  i915_request_retire+0x1ea/0x660 [i915]
      [  171.439408]  retire_requests+0x7a/0xd0 [i915]
      [  171.439640]  engine_retire+0xa1/0xe0 [i915]
      [  171.439657]  process_one_work+0x3b1/0x690
      [  171.439671]  worker_thread+0x80/0x670
      [  171.439685]  kthread+0x19a/0x1e0
      [  171.439701]  ret_from_fork+0x1f/0x30
      [  171.439721]
      [  171.439739] read to 0xffff8881e7e28ce0 of 8 bytes by task 696 on cpu 1:
      [  171.439990]  i915_request_await_dma_fence+0x162/0x520 [i915]
      [  171.440230]  i915_request_await_object+0x2fe/0x470 [i915]
      [  171.440467]  i915_gem_do_execbuffer+0x45dc/0x4c20 [i915]
      [  171.440704]  i915_gem_execbuffer2_ioctl+0x2c3/0x580 [i915]
      [  171.440722]  drm_ioctl_kernel+0xe4/0x120
      [  171.440736]  drm_ioctl+0x297/0x4c7
      [  171.440750]  ksys_ioctl+0x89/0xb0
      [  171.440766]  __x64_sys_ioctl+0x42/0x60
      [  171.440788]  do_syscall_64+0x6e/0x2c0
      [  171.440802]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200309110934.868-1-chris@chris-wilson.co.uk
      89f077ab
    • Chris Wilson's avatar
      drm/i915/execlists: Mark up the racy access to switch_priority_hint · 23a44ae9
      Chris Wilson authored
      [ 7534.150687] BUG: KCSAN: data-race in __execlists_submission_tasklet [i915] / process_csb [i915]
      [ 7534.150706]
      [ 7534.150717] write to 0xffff8881f1bc24b4 of 4 bytes by task 24404 on cpu 3:
      [ 7534.150925]  __execlists_submission_tasklet+0x1158/0x2780 [i915]
      [ 7534.151133]  execlists_submit_request+0x2e8/0x2f0 [i915]
      [ 7534.151348]  submit_notify+0x8f/0xc0 [i915]
      [ 7534.151549]  __i915_sw_fence_complete+0x5d/0x3e0 [i915]
      [ 7534.151753]  i915_sw_fence_complete+0x58/0x80 [i915]
      [ 7534.151963]  i915_sw_fence_commit+0x16/0x20 [i915]
      [ 7534.152179]  __i915_request_queue+0x60/0x70 [i915]
      [ 7534.152388]  i915_gem_do_execbuffer+0x3997/0x4c20 [i915]
      [ 7534.152598]  i915_gem_execbuffer2_ioctl+0x2c3/0x580 [i915]
      [ 7534.152615]  drm_ioctl_kernel+0xe4/0x120
      [ 7534.152629]  drm_ioctl+0x297/0x4c7
      [ 7534.152642]  ksys_ioctl+0x89/0xb0
      [ 7534.152654]  __x64_sys_ioctl+0x42/0x60
      [ 7534.152667]  do_syscall_64+0x6e/0x2c0
      [ 7534.152681]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [ 7534.152693]
      [ 7534.152703] read to 0xffff8881f1bc24b4 of 4 bytes by interrupt on cpu 2:
      [ 7534.152914]  process_csb+0xe7c/0x10a0 [i915]
      [ 7534.153120]  execlists_submission_tasklet+0x30/0x170 [i915]
      [ 7534.153138]  tasklet_action_common.isra.0+0x42/0xa0
      [ 7534.153153]  __do_softirq+0xd7/0x2cd
      [ 7534.153166]  run_ksoftirqd+0x15/0x20
      [ 7534.153180]  smpboot_thread_fn+0x1ab/0x300
      [ 7534.153194]  kthread+0x19a/0x1e0
      [ 7534.153207]  ret_from_fork+0x1f/0x30
      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/20200309144249.10309-1-chris@chris-wilson.co.uk
      23a44ae9
    • Chris Wilson's avatar
      drm/i915: Mark racy read of intel_engine_cs.saturated · 60900add
      Chris Wilson authored
      [ 3783.276728] BUG: KCSAN: data-race in __i915_request_submit [i915] / i915_request_await_dma_fence [i915]
      [ 3783.276766]
      [ 3783.276787] write to 0xffff8881f1bc60a0 of 1 bytes by interrupt on cpu 2:
      [ 3783.277187]  __i915_request_submit+0x47e/0x4a0 [i915]
      [ 3783.277580]  __execlists_submission_tasklet+0x997/0x2780 [i915]
      [ 3783.277973]  execlists_submission_tasklet+0xd3/0x170 [i915]
      [ 3783.278006]  tasklet_action_common.isra.0+0x42/0xa0
      [ 3783.278035]  __do_softirq+0xd7/0x2cd
      [ 3783.278063]  irq_exit+0xbe/0xe0
      [ 3783.278089]  do_IRQ+0x51/0x100
      [ 3783.278114]  ret_from_intr+0x0/0x1c
      [ 3783.278140]  finish_task_switch+0x72/0x260
      [ 3783.278170]  __schedule+0x1e5/0x510
      [ 3783.278198]  schedule+0x45/0xb0
      [ 3783.278226]  smpboot_thread_fn+0x23e/0x300
      [ 3783.278256]  kthread+0x19a/0x1e0
      [ 3783.278283]  ret_from_fork+0x1f/0x30
      [ 3783.278305]
      [ 3783.278327] read to 0xffff8881f1bc60a0 of 1 bytes by task 19440 on cpu 3:
      [ 3783.278724]  i915_request_await_dma_fence+0x2a6/0x530 [i915]
      [ 3783.279130]  i915_request_await_object+0x2fe/0x470 [i915]
      [ 3783.279524]  i915_gem_do_execbuffer+0x45dc/0x4c20 [i915]
      [ 3783.279908]  i915_gem_execbuffer2_ioctl+0x2c3/0x580 [i915]
      [ 3783.279940]  drm_ioctl_kernel+0xe4/0x120
      [ 3783.279968]  drm_ioctl+0x297/0x4c7
      [ 3783.279996]  ksys_ioctl+0x89/0xb0
      [ 3783.280021]  __x64_sys_ioctl+0x42/0x60
      [ 3783.280047]  do_syscall_64+0x6e/0x2c0
      [ 3783.280074]  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/20200309132726.28358-1-chris@chris-wilson.co.uk
      60900add
    • Chris Wilson's avatar
      drm/i915/gt: Mark up intel_rps.active for racy reads · 74e5a9ac
      Chris Wilson authored
      We read the current state of intel_rps.active outside of the lock, so
      mark up the racy access.
      
      [  525.037073] BUG: KCSAN: data-race in intel_rps_boost [i915] / intel_rps_park [i915]
      [  525.037091]
      [  525.037103] write to 0xffff8881f145efa1 of 1 bytes by task 192 on cpu 2:
      [  525.037331]  intel_rps_park+0x72/0x230 [i915]
      [  525.037552]  __gt_park+0x61/0xa0 [i915]
      [  525.037771]  ____intel_wakeref_put_last+0x42/0x90 [i915]
      [  525.037991]  __intel_wakeref_put_work+0xd3/0xf0 [i915]
      [  525.038008]  process_one_work+0x3b1/0x690
      [  525.038022]  worker_thread+0x80/0x670
      [  525.038037]  kthread+0x19a/0x1e0
      [  525.038051]  ret_from_fork+0x1f/0x30
      [  525.038062]
      [  525.038074] read to 0xffff8881f145efa1 of 1 bytes by task 733 on cpu 3:
      [  525.038304]  intel_rps_boost+0x67/0x1f0 [i915]
      [  525.038535]  i915_request_wait+0x562/0x5d0 [i915]
      [  525.038764]  i915_gem_object_wait_fence+0x81/0xa0 [i915]
      [  525.038994]  i915_gem_object_wait_reservation+0x489/0x520 [i915]
      [  525.039224]  i915_gem_wait_ioctl+0x167/0x2b0 [i915]
      [  525.039241]  drm_ioctl_kernel+0xe4/0x120
      [  525.039255]  drm_ioctl+0x297/0x4c7
      [  525.039269]  ksys_ioctl+0x89/0xb0
      [  525.039282]  __x64_sys_ioctl+0x42/0x60
      [  525.039296]  do_syscall_64+0x6e/0x2c0
      [  525.039311]  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/20200309113623.24208-1-chris@chris-wilson.co.uk
      74e5a9ac
    • Matt Roper's avatar
      drm/i915/tgl: Don't treat unslice registers as masked · dbe748cd
      Matt Roper authored
      The UNSLICE_UNIT_LEVEL_CLKGATE and UNSLICE_UNIT_LEVEL_CLKGATE2 registers
      that we update in a few engine workarounds are not masked registers
      (i.e., we don't have to write a mask bit in the top 16 bits when
      updating one of the lower 16 bits).  As such, these workarounds should
      be applied via wa_write_or() rather than wa_masked_en()
      
      v2:
       - Rebase
      Reported-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Reported-by: default avatarkernelci.org bot <bot@kernelci.org>
      References: https://github.com/ClangBuiltLinux/linux/issues/918
      Fixes: 50148a25 ("drm/i915/tgl: Move and restrict Wa_1408615072")
      Fixes: 3551ff92 ("drm/i915/gen11: Moving WAs to rcs_engine_wa_init()")
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Tested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200306171139.1414649-1-matthew.d.roper@intel.com
      dbe748cd
    • Imre Deak's avatar
      drm/i915: Fix documentation for intel_dpll_get_freq() · 8051d1ec
      Imre Deak authored
      Fix the following kerneldoc warning and while at it also the doc for the
      corresponding vfunc hook.
      
      $ make htmldocs 2>&1 > /dev/null | grep i915
      ./drivers/gpu/drm/i915/display/intel_dpll_mgr.h:285: warning: Function parameter or member 'get_freq' not described in 'intel_shared_dpll_funcs'
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200304150918.25473-1-imre.deak@intel.com
      8051d1ec
  2. 07 Mar, 2020 5 commits
  3. 06 Mar, 2020 12 commits
  4. 05 Mar, 2020 9 commits
  5. 04 Mar, 2020 7 commits