1. 08 Oct, 2019 5 commits
  2. 07 Oct, 2019 9 commits
    • Chris Wilson's avatar
      drm/i915/gt: Treat a busy timeline as 'active' while waiting · a1b58ee3
      Chris Wilson authored
      If we cannot claim the timeline->mutex while preparing for a wait on it,
      we have to skip the timeline. In doing so, treat it as active so that
      under a intel_gt_wait_for_idle() loop, we repeat the wait after
      scheduling away.
      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/20191006165002.30312-4-chris@chris-wilson.co.uk
      a1b58ee3
    • Chris Wilson's avatar
      drm/i915/selftests: Appease lockdep · 1664f35a
      Chris Wilson authored
      Disable irqs around updating the context image to keep lockdep happy:
      
      <4>[  673.483340] WARNING: possible irq lock inversion dependency detected
      <4>[  673.483342] 5.4.0-rc1-CI-Trybot_5118+ #1 Tainted: G     U
      <4>[  673.483342] --------------------------------------------------------
      <4>[  673.483343] swapper/2/0 just changed the state of lock:
      <4>[  673.483344] ffff88845db885a0 (&i915_request_get(rq)->submit/1){-...}, at: __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  673.483387] but this lock took another, HARDIRQ-unsafe lock in the past:
      <4>[  673.483388]  (&ce->pin_mutex/2){+...}
      <4>[  673.483389]
      
                        and interrupts could create inverse lock ordering between them.
      
      <4>[  673.483390]
                        other info that might help us debug this:
      <4>[  673.483390] Chain exists of:
                          &i915_request_get(rq)->submit/1 --> &engine->active.lock --> &ce->pin_mutex/2
      
      <4>[  673.483392]  Possible interrupt unsafe locking scenario:
      
      <4>[  673.483392]        CPU0                    CPU1
      <4>[  673.483393]        ----                    ----
      <4>[  673.483393]   lock(&ce->pin_mutex/2);
      <4>[  673.483394]                                local_irq_disable();
      <4>[  673.483395]                                lock(&i915_request_get(rq)->submit/1);
      <4>[  673.483396]                                lock(&engine->active.lock);
      <4>[  673.483396]   <Interrupt>
      <4>[  673.483397]     lock(&i915_request_get(rq)->submit/1);
      <4>[  673.483398]
                         *** DEADLOCK ***
      
      <4>[  673.483398] 2 locks held by swapper/2/0:
      <4>[  673.483399]  #0: ffff8883f61ac9b0 (&(&gt->irq_lock)->rlock){-.-.}, at: gen11_gt_irq_handler+0x42/0x280 [i915]
      <4>[  673.483433]  #1: ffff88845db8c418 (&(&rq->lock)->rlock){-.-.}, at: intel_engine_breadcrumbs_irq+0x34a/0x5a0 [i915]
      <4>[  673.483463]
                        the shortest dependencies between 2nd lock and 1st lock:
      <4>[  673.483466]   -> (&ce->pin_mutex/2){+...} ops: 614520 {
      <4>[  673.483468]      HARDIRQ-ON-W at:
      <4>[  673.483471]                         lock_acquire+0xa7/0x1c0
      <4>[  673.483501]                         live_unlite_restore+0x1d8/0x6c0 [i915]
      <4>[  673.483543]                         __i915_subtests+0xb8/0x210 [i915]
      <4>[  673.483581]                         __run_selftests+0x112/0x170 [i915]
      <4>[  673.483615]                         i915_live_selftests+0x2c/0x60 [i915]
      <4>[  673.483644]                         i915_pci_probe+0x93/0x1b0 [i915]
      <4>[  673.483646]                         pci_device_probe+0x9e/0x120
      <4>[  673.483648]                         really_probe+0xea/0x420
      <4>[  673.483649]                         driver_probe_device+0x10b/0x120
      <4>[  673.483651]                         device_driver_attach+0x4a/0x50
      <4>[  673.483652]                         __driver_attach+0x97/0x130
      <4>[  673.483653]                         bus_for_each_dev+0x74/0xc0
      <4>[  673.483654]                         bus_add_driver+0x142/0x220
      <4>[  673.483655]                         driver_register+0x56/0xf0
      <4>[  673.483657]                         do_one_initcall+0x58/0x2ff
      <4>[  673.483659]                         do_init_module+0x56/0x1f8
      <4>[  673.483660]                         load_module+0x243e/0x29f0
      <4>[  673.483661]                         __do_sys_finit_module+0xe9/0x110
      <4>[  673.483662]                         do_syscall_64+0x4f/0x210
      <4>[  673.483665]                         entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4>[  673.483665]      INITIAL USE at:
      <4>[  673.483667]                        lock_acquire+0xa7/0x1c0
      <4>[  673.483698]                        live_unlite_restore+0x1d8/0x6c0 [i915]
      <4>[  673.483733]                        __i915_subtests+0xb8/0x210 [i915]
      <4>[  673.483764]                        __run_selftests+0x112/0x170 [i915]
      <4>[  673.483793]                        i915_live_selftests+0x2c/0x60 [i915]
      <4>[  673.483821]                        i915_pci_probe+0x93/0x1b0 [i915]
      <4>[  673.483822]                        pci_device_probe+0x9e/0x120
      <4>[  673.483824]                        really_probe+0xea/0x420
      <4>[  673.483825]                        driver_probe_device+0x10b/0x120
      <4>[  673.483826]                        device_driver_attach+0x4a/0x50
      <4>[  673.483827]                        __driver_attach+0x97/0x130
      <4>[  673.483828]                        bus_for_each_dev+0x74/0xc0
      <4>[  673.483829]                        bus_add_driver+0x142/0x220
      <4>[  673.483830]                        driver_register+0x56/0xf0
      <4>[  673.483831]                        do_one_initcall+0x58/0x2ff
      <4>[  673.483833]                        do_init_module+0x56/0x1f8
      <4>[  673.483834]                        load_module+0x243e/0x29f0
      <4>[  673.483835]                        __do_sys_finit_module+0xe9/0x110
      <4>[  673.483836]                        do_syscall_64+0x4f/0x210
      <4>[  673.483837]                        entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4>[  673.483838]    }
      <4>[  673.483868]    ... key      at: [<ffffffffa0a8f132>] __key.70113+0x2/0xffffffffffef2ed0 [i915]
      <4>[  673.483869]    ... acquired at:
      <4>[  673.483935]    __execlists_reset+0xfb/0xc20 [i915]
      <4>[  673.483965]    execlists_reset+0x3d/0x50 [i915]
      <4>[  673.483995]    intel_engine_reset+0xdf/0x230 [i915]
      <4>[  673.484022]    live_preempt_hang+0x1d7/0x2e0 [i915]
      <4>[  673.484064]    __i915_subtests+0xb8/0x210 [i915]
      <4>[  673.484130]    __run_selftests+0x112/0x170 [i915]
      <4>[  673.484163]    i915_live_selftests+0x2c/0x60 [i915]
      <4>[  673.484193]    i915_pci_probe+0x93/0x1b0 [i915]
      <4>[  673.484194]    pci_device_probe+0x9e/0x120
      <4>[  673.484195]    really_probe+0xea/0x420
      <4>[  673.484196]    driver_probe_device+0x10b/0x120
      <4>[  673.484197]    device_driver_attach+0x4a/0x50
      <4>[  673.484198]    __driver_attach+0x97/0x130
      <4>[  673.484199]    bus_for_each_dev+0x74/0xc0
      <4>[  673.484200]    bus_add_driver+0x142/0x220
      <4>[  673.484202]    driver_register+0x56/0xf0
      <4>[  673.484203]    do_one_initcall+0x58/0x2ff
      <4>[  673.484204]    do_init_module+0x56/0x1f8
      <4>[  673.484205]    load_module+0x243e/0x29f0
      <4>[  673.484206]    __do_sys_finit_module+0xe9/0x110
      <4>[  673.484207]    do_syscall_64+0x4f/0x210
      <4>[  673.484208]    entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      <4>[  673.484209]  -> (&engine->active.lock){..-.} ops: 972791 {
      <4>[  673.484211]     IN-SOFTIRQ-W at:
      <4>[  673.484213]                       lock_acquire+0xa7/0x1c0
      <4>[  673.484214]                       _raw_spin_lock_irqsave+0x33/0x50
      <4>[  673.484244]                       execlists_submission_tasklet+0xaf/0x100 [i915]
      <4>[  673.484246]                       tasklet_action_common.isra.18+0x6c/0x1c0
      <4>[  673.484247]                       __do_softirq+0xdf/0x47f
      <4>[  673.484248]                       irq_exit+0xba/0xc0
      <4>[  673.484249]                       do_IRQ+0x83/0x160
      <4>[  673.484250]                       ret_from_intr+0x0/0x1d
      <4>[  673.484252]                       cpuidle_enter_state+0xb2/0x450
      <4>[  673.484253]                       cpuidle_enter+0x24/0x40
      <4>[  673.484254]                       do_idle+0x1e7/0x250
      <4>[  673.484256]                       cpu_startup_entry+0x14/0x20
      <4>[  673.484257]                       start_secondary+0x15f/0x1b0
      <4>[  673.484258]                       secondary_startup_64+0xa4/0xb0
      <4>[  673.484259]     INITIAL USE at:
      <4>[  673.484261]                      lock_acquire+0xa7/0x1c0
      <4>[  673.484290]                      intel_engine_init_active+0x7e/0xb0 [i915]
      <4>[  673.484305]                      intel_engines_setup+0x1cd/0x3b0 [i915]
      <4>[  673.484305]                      i915_gem_init+0x12d/0x900 [i915]
      <4>[  673.484305]                      i915_driver_probe+0xb70/0x15d0 [i915]
      <4>[  673.484305]                      i915_pci_probe+0x43/0x1b0 [i915]
      <4>[  673.484305]                      pci_device_probe+0x9e/0x120
      <4>[  673.484305]                      really_probe+0xea/0x420
      <4>[  673.484305]                      driver_probe_device+0x10b/0x120
      <4>[  673.484305]                      device_driver_attach+0x4a/0x50
      <4>[  673.484305]                      __driver_attach+0x97/0x130
      <4>[  673.484305]                      bus_for_each_dev+0x74/0xc0
      <4>[  673.484305]                      bus_add_driver+0x142/0x220
      <4>[  673.484305]                      driver_register+0x56/0xf0
      <4>[  673.484305]                      do_one_initcall+0x58/0x2ff
      <4>[  673.484305]                      do_init_module+0x56/0x1f8
      <4>[  673.484305]                      load_module+0x243e/0x29f0
      <4>[  673.484305]                      __do_sys_finit_module+0xe9/0x110
      <4>[  673.484305]                      do_syscall_64+0x4f/0x210
      <4>[  673.484305]                      entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4>[  673.484305]   }
      <4>[  673.484305]   ... key      at: [<ffffffffa0a8f160>] __key.70307+0x0/0xffffffffffef2ea0 [i915]
      <4>[  673.484305]   ... acquired at:
      <4>[  673.484305]    _raw_spin_lock_irqsave+0x33/0x50
      <4>[  673.484305]    execlists_submit_request+0x2b/0x1e0 [i915]
      <4>[  673.484305]    submit_notify+0xa8/0x13c [i915]
      <4>[  673.484305]    __i915_sw_fence_complete+0x81/0x250 [i915]
      <4>[  673.484305]    i915_sw_fence_wake+0x51/0x70 [i915]
      <4>[  673.484305]    __i915_sw_fence_complete+0x1ee/0x250 [i915]
      <4>[  673.484305]    dma_i915_sw_fence_wake+0x1b/0x30 [i915]
      <4>[  673.484305]    dma_fence_signal_locked+0x9e/0x1b0
      <4>[  673.484305]    dma_fence_signal+0x1f/0x40
      <4>[  673.484305]    fence_work+0x28/0x80 [i915]
      <4>[  673.484305]    process_one_work+0x26a/0x620
      <4>[  673.484305]    worker_thread+0x37/0x380
      <4>[  673.484305]    kthread+0x119/0x130
      <4>[  673.484305]    ret_from_fork+0x24/0x50
      
      <4>[  673.484305] -> (&i915_request_get(rq)->submit/1){-...} ops: 857694 {
      <4>[  673.484305]    IN-HARDIRQ-W at:
      <4>[  673.484305]                     lock_acquire+0xa7/0x1c0
      <4>[  673.484305]                     _raw_spin_lock_irqsave_nested+0x39/0x50
      <4>[  673.484305]                     __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  673.484305]                     intel_engine_breadcrumbs_irq+0x3d0/0x5a0 [i915]
      <4>[  673.484305]                     cs_irq_handler+0x39/0x50 [i915]
      <4>[  673.484305]                     gen11_gt_irq_handler+0x17b/0x280 [i915]
      <4>[  673.484305]                     gen11_irq_handler+0x54/0xf0 [i915]
      <4>[  673.484305]                     __handle_irq_event_percpu+0x41/0x2c0
      <4>[  673.484305]                     handle_irq_event_percpu+0x2b/0x70
      <4>[  673.484305]                     handle_irq_event+0x2f/0x50
      <4>[  673.484305]                     handle_edge_irq+0x99/0x1b0
      <4>[  673.484305]                     do_IRQ+0x7e/0x160
      <4>[  673.484305]                     ret_from_intr+0x0/0x1d
      <4>[  673.484305]                     cpuidle_enter_state+0xb2/0x450
      <4>[  673.484305]                     cpuidle_enter+0x24/0x40
      <4>[  673.484305]                     do_idle+0x1e7/0x250
      <4>[  673.484305]                     cpu_startup_entry+0x14/0x20
      <4>[  673.484305]                     start_secondary+0x15f/0x1b0
      <4>[  673.484305]                     secondary_startup_64+0xa4/0xb0
      <4>[  673.484305]    INITIAL USE at:
      <4>[  673.484305]                    lock_acquire+0xa7/0x1c0
      <4>[  673.484305]                    _raw_spin_lock_irqsave_nested+0x39/0x50
      <4>[  673.484305]                    __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  673.484305]                    __engine_park+0x233/0x420 [i915]
      <4>[  673.484305]                    ____intel_wakeref_put_last+0x1c/0x70 [i915]
      <4>[  673.484305]                    intel_gt_resume+0x202/0x2c0 [i915]
      <4>[  673.484305]                    i915_gem_init+0x36e/0x900 [i915]
      <4>[  673.484305]                    i915_driver_probe+0xb70/0x15d0 [i915]
      <4>[  673.484305]                    i915_pci_probe+0x43/0x1b0 [i915]
      <4>[  673.484305]                    pci_device_probe+0x9e/0x120
      <4>[  673.484305]                    really_probe+0xea/0x420
      <4>[  673.484305]                    driver_probe_device+0x10b/0x120
      <4>[  673.484305]                    device_driver_attach+0x4a/0x50
      <4>[  673.484305]                    __driver_attach+0x97/0x130
      <4>[  673.484305]                    bus_for_each_dev+0x74/0xc0
      <4>[  673.484305]                    bus_add_driver+0x142/0x220
      <4>[  673.484305]                    driver_register+0x56/0xf0
      <4>[  673.484305]                    do_one_initcall+0x58/0x2ff
      <4>[  673.484305]                    do_init_module+0x56/0x1f8
      <4>[  673.484305]                    load_module+0x243e/0x29f0
      <4>[  673.484305]                    __do_sys_finit_module+0xe9/0x110
      <4>[  673.484305]                    do_syscall_64+0x4f/0x210
      <4>[  673.484305]                    entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4>[  673.484305]  }
      <4>[  673.484305]  ... key      at: [<ffffffffa0a8f6a1>] __key.80173+0x1/0xffffffffffef2960 [i915]
      <4>[  673.484305]  ... acquired at:
      <4>[  673.484305]    mark_lock+0x382/0x500
      <4>[  673.484305]    __lock_acquire+0x7e1/0x15d0
      <4>[  673.484305]    lock_acquire+0xa7/0x1c0
      <4>[  673.484305]    _raw_spin_lock_irqsave_nested+0x39/0x50
      <4>[  673.484305]    __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  673.484305]    intel_engine_breadcrumbs_irq+0x3d0/0x5a0 [i915]
      <4>[  673.484305]    cs_irq_handler+0x39/0x50 [i915]
      <4>[  673.484305]    gen11_gt_irq_handler+0x17b/0x280 [i915]
      <4>[  673.484305]    gen11_irq_handler+0x54/0xf0 [i915]
      <4>[  673.484305]    __handle_irq_event_percpu+0x41/0x2c0
      <4>[  673.484305]    handle_irq_event_percpu+0x2b/0x70
      <4>[  673.484305]    handle_irq_event+0x2f/0x50
      <4>[  673.484305]    handle_edge_irq+0x99/0x1b0
      <4>[  673.484305]    do_IRQ+0x7e/0x160
      <4>[  673.484305]    ret_from_intr+0x0/0x1d
      <4>[  673.484305]    cpuidle_enter_state+0xb2/0x450
      <4>[  673.484305]    cpuidle_enter+0x24/0x40
      <4>[  673.484305]    do_idle+0x1e7/0x250
      <4>[  673.484305]    cpu_startup_entry+0x14/0x20
      <4>[  673.484305]    start_secondary+0x15f/0x1b0
      <4>[  673.484305]    secondary_startup_64+0xa4/0xb0
      
      <4>[  673.484305]
                        stack backtrace:
      <4>[  673.484305] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G     U            5.4.0-rc1-CI-Trybot_5118+ #1
      <4>[  673.484305] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3183.A00.1905020411 05/02/2019
      <4>[  673.484305] Call Trace:
      <4>[  673.484305]  <IRQ>
      <4>[  673.484305]  dump_stack+0x67/0x9b
      <4>[  673.484305]  check_usage_forwards+0x13c/0x150
      <4>[  673.484305]  ? mark_lock+0x382/0x500
      <4>[  673.484305]  mark_lock+0x382/0x500
      <4>[  673.484305]  ? check_usage_backwards+0x140/0x140
      <4>[  673.484305]  __lock_acquire+0x7e1/0x15d0
      <4>[  673.484305]  ? debug_object_deactivate+0x17e/0x190
      <4>[  673.484305]  lock_acquire+0xa7/0x1c0
      <4>[  673.484305]  ? __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  673.484305]  _raw_spin_lock_irqsave_nested+0x39/0x50
      <4>[  673.484305]  ? __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  673.484305]  __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  673.484305]  intel_engine_breadcrumbs_irq+0x3d0/0x5a0 [i915]
      <4>[  673.484305]  cs_irq_handler+0x39/0x50 [i915]
      <4>[  673.484305]  gen11_gt_irq_handler+0x17b/0x280 [i915]
      <4>[  673.484305]  gen11_irq_handler+0x54/0xf0 [i915]
      <4>[  673.484305]  __handle_irq_event_percpu+0x41/0x2c0
      <4>[  673.484305]  handle_irq_event_percpu+0x2b/0x70
      <4>[  673.484305]  handle_irq_event+0x2f/0x50
      <4>[  673.484305]  handle_edge_irq+0x99/0x1b0
      <4>[  673.484305]  do_IRQ+0x7e/0x160
      <4>[  673.484305]  common_interrupt+0xf/0xf
      <4>[  673.484305]  </IRQ>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191004203121.31138-1-chris@chris-wilson.co.uk
      1664f35a
    • Chris Wilson's avatar
      drm/i915/execlists: Fix annotation for decoupling virtual request · 08ad9a38
      Chris Wilson authored
      As we may signal a request and take the engine->active.lock within the
      signaler, the engine submission paths have to use a nested annotation on
      their requests -- but we guarantee that we can never submit on the same
      engine as the signaling fence.
      
      <4>[  723.763281] WARNING: possible circular locking dependency detected
      <4>[  723.763285] 5.3.0-g80fa0e042cdb-drmtip_379+ #1 Tainted: G     U
      <4>[  723.763288] ------------------------------------------------------
      <4>[  723.763291] gem_exec_await/1388 is trying to acquire lock:
      <4>[  723.763294] ffff93a7b53221d8 (&engine->active.lock){..-.}, at: execlists_submit_request+0x2b/0x1e0 [i915]
      <4>[  723.763378]
                        but task is already holding lock:
      <4>[  723.763381] ffff93a7c25f6d20 (&i915_request_get(rq)->submit/1){-.-.}, at: __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  723.763420]
                        which lock already depends on the new lock.
      
      <4>[  723.763423]
                        the existing dependency chain (in reverse order) is:
      <4>[  723.763427]
                        -> #2 (&i915_request_get(rq)->submit/1){-.-.}:
      <4>[  723.763434]        _raw_spin_lock_irqsave_nested+0x39/0x50
      <4>[  723.763478]        __i915_sw_fence_complete+0x1b2/0x250 [i915]
      <4>[  723.763513]        intel_engine_breadcrumbs_irq+0x3aa/0x5e0 [i915]
      <4>[  723.763600]        cs_irq_handler+0x49/0x50 [i915]
      <4>[  723.763659]        gen11_gt_irq_handler+0x17b/0x280 [i915]
      <4>[  723.763690]        gen11_irq_handler+0x54/0xf0 [i915]
      <4>[  723.763695]        __handle_irq_event_percpu+0x41/0x2d0
      <4>[  723.763699]        handle_irq_event_percpu+0x2b/0x70
      <4>[  723.763702]        handle_irq_event+0x2f/0x50
      <4>[  723.763706]        handle_edge_irq+0xee/0x1a0
      <4>[  723.763709]        do_IRQ+0x7e/0x160
      <4>[  723.763712]        ret_from_intr+0x0/0x1d
      <4>[  723.763717]        __slab_alloc.isra.28.constprop.33+0x4f/0x70
      <4>[  723.763720]        kmem_cache_alloc+0x28d/0x2f0
      <4>[  723.763724]        vm_area_dup+0x15/0x40
      <4>[  723.763727]        dup_mm+0x2dd/0x550
      <4>[  723.763730]        copy_process+0xf21/0x1ef0
      <4>[  723.763734]        _do_fork+0x71/0x670
      <4>[  723.763737]        __se_sys_clone+0x6e/0xa0
      <4>[  723.763741]        do_syscall_64+0x4f/0x210
      <4>[  723.763744]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4>[  723.763747]
                        -> #1 (&(&rq->lock)->rlock#2){-.-.}:
      <4>[  723.763752]        _raw_spin_lock+0x2a/0x40
      <4>[  723.763789]        __unwind_incomplete_requests+0x3eb/0x450 [i915]
      <4>[  723.763825]        __execlists_submission_tasklet+0x9ec/0x1d60 [i915]
      <4>[  723.763864]        execlists_submission_tasklet+0x34/0x50 [i915]
      <4>[  723.763874]        tasklet_action_common.isra.5+0x47/0xb0
      <4>[  723.763878]        __do_softirq+0xd8/0x4ae
      <4>[  723.763881]        irq_exit+0xa9/0xc0
      <4>[  723.763883]        smp_apic_timer_interrupt+0xb7/0x280
      <4>[  723.763887]        apic_timer_interrupt+0xf/0x20
      <4>[  723.763892]        cpuidle_enter_state+0xae/0x450
      <4>[  723.763895]        cpuidle_enter+0x24/0x40
      <4>[  723.763899]        do_idle+0x1e7/0x250
      <4>[  723.763902]        cpu_startup_entry+0x14/0x20
      <4>[  723.763905]        start_secondary+0x15f/0x1b0
      <4>[  723.763908]        secondary_startup_64+0xa4/0xb0
      <4>[  723.763911]
                        -> #0 (&engine->active.lock){..-.}:
      <4>[  723.763916]        __lock_acquire+0x15d8/0x1ea0
      <4>[  723.763919]        lock_acquire+0xa6/0x1c0
      <4>[  723.763922]        _raw_spin_lock_irqsave+0x33/0x50
      <4>[  723.763956]        execlists_submit_request+0x2b/0x1e0 [i915]
      <4>[  723.764002]        submit_notify+0xa8/0x13c [i915]
      <4>[  723.764035]        __i915_sw_fence_complete+0x81/0x250 [i915]
      <4>[  723.764054]        i915_sw_fence_wake+0x51/0x64 [i915]
      <4>[  723.764054]        __i915_sw_fence_complete+0x1ee/0x250 [i915]
      <4>[  723.764054]        dma_i915_sw_fence_wake_timer+0x14/0x20 [i915]
      <4>[  723.764054]        dma_fence_signal_locked+0x9e/0x1c0
      <4>[  723.764054]        dma_fence_signal+0x1f/0x40
      <4>[  723.764054]        vgem_fence_signal_ioctl+0x67/0xc0 [vgem]
      <4>[  723.764054]        drm_ioctl_kernel+0x83/0xf0
      <4>[  723.764054]        drm_ioctl+0x2f3/0x3b0
      <4>[  723.764054]        do_vfs_ioctl+0xa0/0x6f0
      <4>[  723.764054]        ksys_ioctl+0x35/0x60
      <4>[  723.764054]        __x64_sys_ioctl+0x11/0x20
      <4>[  723.764054]        do_syscall_64+0x4f/0x210
      <4>[  723.764054]        entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4>[  723.764054]
                        other info that might help us debug this:
      
      <4>[  723.764054] Chain exists of:
                          &engine->active.lock --> &(&rq->lock)->rlock#2 --> &i915_request_get(rq)->submit/1
      
      <4>[  723.764054]  Possible unsafe locking scenario:
      
      <4>[  723.764054]        CPU0                    CPU1
      <4>[  723.764054]        ----                    ----
      <4>[  723.764054]   lock(&i915_request_get(rq)->submit/1);
      <4>[  723.764054]                                lock(&(&rq->lock)->rlock#2);
      <4>[  723.764054]                                lock(&i915_request_get(rq)->submit/1);
      <4>[  723.764054]   lock(&engine->active.lock);
      <4>[  723.764054]
                         *** DEADLOCK ***
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111862Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191004194758.19679-1-chris@chris-wilson.co.uk
      08ad9a38
    • Chris Wilson's avatar
      drm/i915/gt: Prefer local path to runtime powermanagement · cd6a8513
      Chris Wilson authored
      Avoid going to the base i915 device when we already have a path from gt
      to the runtime powermanagement interface. The benefit is that it looks a
      bit more self-consistent to always be acquiring the gt->uncore->rpm for
      use with the gt->uncore.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191007154531.1750-1-chris@chris-wilson.co.uk
      cd6a8513
    • Colin Ian King's avatar
      drm/i915: make array hw_engine_mask static, makes object smaller · b9dcb97b
      Colin Ian King authored
      Don't populate the array hw_engine_mask on the stack but instead make it
      static. Makes the object code smaller by 316 bytes.
      
      Before:
         text	   data	    bss	    dec	    hex	filename
        34004	   4388	    320	  38712	   9738	gpu/drm/i915/gt/intel_reset.o
      
      After:
         text	   data	    bss	    dec	    hex	filename
        33528	   4548	    320	  38396	   95fc	gpu/drm/i915/gt/intel_reset.o
      
      (gcc version 9.2.1, amd64)
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.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/20191007154151.23245-1-colin.king@canonical.com
      b9dcb97b
    • Matt Roper's avatar
      drm/i915/vbt: Child device size remains unchanged through VBT 229 · 3aec2c6a
      Matt Roper authored
      The latest documented version of the VBT is 229, but no further data has
      been added to the child device definition in block 2.  Update the child
      device version test to eliminate the "Expected child device config size
      for VBT version XXX not known; assuming 39" debug messages from the
      logs.
      
      Bspec: 20124
      Bspec: 20157
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191002192258.1013-1-matthew.d.roper@intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      3aec2c6a
    • Lionel Landwerlin's avatar
    • Chris Wilson's avatar
      drm/i915/gt: Restore dropped 'interruptible' flag · abc47ff6
      Chris Wilson authored
      Lost in the rebasing was Tvrtko's reminder that we need to keep an
      uninterruptible wait around for the Ironlake VT-d w/a
      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/20191006165002.30312-3-chris@chris-wilson.co.uk
      abc47ff6
    • Joonas Lahtinen's avatar
  3. 06 Oct, 2019 3 commits
  4. 04 Oct, 2019 23 commits