1. 26 2月, 2016 2 次提交
  2. 16 2月, 2016 2 次提交
  3. 15 2月, 2016 1 次提交
    • D
      Revert "drm/i915: fix context/engine cleanup order" · 1ffedc06
      Daniel Vetter 提交于
      This reverts commit 1b39a917.
      
      Chris retracted his reviewed-by (which I failed to notice) and somehow
      it blows up (I did it again!) as reported by Mika with the below
      backtrace on module reload:
      
      [   58.170374] IP: [<ffffffffa00e04d3>]
      intel_logical_ring_cleanup+0x83/0x100 [i915]
      ...
      [   58.170469] Call Trace:
      [   58.170479]  [<ffffffffa00d0ed4>] i915_gem_cleanup_engines+0x34/0x60
      [i915]
      [   58.170493]  [<ffffffffa0154520>] i915_driver_unload+0x140/0x220
      [i915]
      [   58.170497]  [<ffffffff8154a4f4>] drm_dev_unregister+0x24/0xa0
      [   58.170501]  [<ffffffff8154aace>] drm_put_dev+0x1e/0x60
      [   58.170506]  [<ffffffffa00912a0>] i915_pci_remove+0x10/0x20 [i915]
      [   58.170510]  [<ffffffff814766e4>] pci_device_remove+0x34/0xb0
      [   58.170514]  [<ffffffff8156e7d5>] __device_release_driver+0x95/0x140
      [   58.170518]  [<ffffffff8156e97c>] driver_detach+0xbc/0xc0
      [   58.170521]  [<ffffffff8156d883>] bus_remove_driver+0x53/0xd0
      [   58.170525]  [<ffffffff8156f3a7>] driver_unregister+0x27/0x50
      [   58.170528]  [<ffffffff81475725>] pci_unregister_driver+0x25/0x70
      [   58.170531]  [<ffffffff8154c274>] drm_pci_exit+0x74/0x90
      [   58.170543]  [<ffffffffa0154cb0>] i915_exit+0x20/0x1aa [i915]
      [   58.170548]  [<ffffffff8111846f>] SyS_delete_module+0x18f/0x1f0
      
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Dave Gordon <david.s.gordon@intel.com>
      Cc: Nick Hoath <nicholas.hoath@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      1ffedc06
  4. 10 2月, 2016 1 次提交
  5. 04 2月, 2016 1 次提交
  6. 29 1月, 2016 1 次提交
  7. 27 1月, 2016 3 次提交
    • I
      drm/i915: Sanitize i915_gem_load() init and clean-up · d64aa096
      Imre Deak 提交于
      Factor out common clean-up code for the GEM load time init function.
      Also rename i915_gem_load() to i915_gem_load_init() to have a better
      match with its new clean-up function.
      
      No functional change.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NDavid Weinehall <david.weinehall@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453209992-25995-5-git-send-email-imre.deak@intel.com
      d64aa096
    • I
      drm/i915: Sanitize GEM shrinker init and clean-up · a8a40589
      Imre Deak 提交于
      Factor out the common GEM shrinker clean-up code and call the shrinker
      init function from the same function from where the corresponding
      shrinker clean-up function is called. Also add sanity checking to the
      shrinker and OOM registration calls.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NDavid Weinehall <david.weinehall@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453209992-25995-4-git-send-email-imre.deak@intel.com
      a8a40589
    • D
      Revert "drm/i915: Fix context/engine cleanup order" · 9a15a873
      Daniel Vetter 提交于
      This reverts commit 1803c035.
      
      It seems to blow up on module unload due to a use-after free hitting a
      BUG_ON with CONFIG_DEBUG_SG. Quoting from Tvrtko's mail:
      
      "I've decoded the instructions and it pointed to SG_MAGIC checking:
      
      488b8098010000  mov 0x198(%rax),%rax
      ba21436587      mov $0x87654321,%edx
      488b00          mov (%rax),%rax       *** CRASH
      
      "Grep showed 0x87654321 is SG_MAGIC, so likely candidate for this code
      pattern is:
      
      static inline struct page *sg_page(struct scatterlist *sg)
      {
          BUG_ON(sg->sg_magic != SG_MAGIC);
          BUG_ON(sg_is_chain(sg));
          return (struct page *)((sg)->page_link & ~0x3);
      }
      
      "Which would mean the offender is in intel_logical_ring_cleanup is most
      likely:
      
      ...
          if (ring->status_page.obj) {
              kunmap(sg_page(ring->status_page.obj->pages->sgl));
              ring->status_page.obj = NULL;
          }
      ...
      
      "I think that the i915_gem_context_fini will do a final unref on
      dev_priv->kernel_context and then the ring buff has a copy which is
      left dangling because:
      
          lrc_setup_hardware_status_page(ring,
              dev_priv->kernel_context->engine[ring->id].state);
      
      and:
      
      ring->status_page.obj = default_ctx_obj;
      
      "Where default_ctx_obj == dev_priv->kernel_context->engine[ring->id].state
      So indeed looks like the unload ordering is the trigger.  In fact it
      is almost the same fragility wrt/ kernel_context hidden dependency I
      expressed my worry about in an e-mail yesterday or so. It only shows
      if CONFIG_DEBUG_SG is set, otherwise it accesses freed memory and
      probably just survives."
      
      This causes serious trouble in our CI system since it took out all
      gen8+ machines. Not yet clear why this wasn't caught in pre-merge
      testing.
      
      Backtrace from CI, for posterity:
      
      [  163.737836] general protection fault: 0000 [#1] PREEMPT SMP
      [  163.737849] Modules linked in: ax88179_178a usbnet mii snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic i915(-) x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm mei_me mei i2c_hid e1000e ptp pps_core [last unloaded: snd_hda_intel]
      [  163.737902] CPU: 0 PID: 5812 Comm: rmmod Tainted: G     U  W       4.5.0-rc1-gfxbench+ #1
      [  163.737911] Hardware name: System manufacturer System Product Name/Z170M-PLUS, BIOS 0505 11/16/2015
      [  163.737920] task: ffff8800bb99cf80 ti: ffff88022ff2c000 task.ti: ffff88022ff2c000
      [  163.737928] RIP: 0010:[<ffffffffa018f723>]  [<ffffffffa018f723>] intel_logical_ring_cleanup+0x83/0x100 [i915]
      [  163.737969] RSP: 0018:ffff88022ff2fd30  EFLAGS: 00010282
      [  163.737975] RAX: 6b6b6b6b6b6b6b6b RBX: ffff8800bb2f31b8 RCX: 0000000000000002
      [  163.737982] RDX: 0000000087654321 RSI: 000000000000000d RDI: ffff8800bb2f31f0
      [  163.737989] RBP: ffff88022ff2fd40 R08: 0000000000000000 R09: 0000000000000001
      [  163.737996] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800bb2f0000
      [  163.738003] R13: ffff8800bb2f8fc8 R14: ffff8800bb285668 R15: 000055af1ae55210
      [  163.738010] FS:  00007f187014b700(0000) GS:ffff88023bc00000(0000) knlGS:0000000000000000
      [  163.738021] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  163.738030] CR2: 0000558f84e4cbc8 CR3: 000000022cd55000 CR4: 00000000003406f0
      [  163.738039] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  163.738048] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  163.738057] Stack:
      [  163.738062]  ffff8800bb2f31b8 ffff8800bb2f0000 ffff88022ff2fd70 ffffffffa0180414
      [  163.738079]  ffff8800bb2f0000 ffff8800bb285668 ffff8800bb2856c8 ffffffffa0242460
      [  163.738094]  ffff88022ff2fd98 ffffffffa0202d30 ffff8800bb285668 ffff8800bb285668
      [  163.738109] Call Trace:
      [  163.738140]  [<ffffffffa0180414>] i915_gem_cleanup_engines+0x34/0x60 [i915]
      [  163.738185]  [<ffffffffa0202d30>] i915_driver_unload+0x150/0x270 [i915]
      [  163.738198]  [<ffffffff815100f4>] drm_dev_unregister+0x24/0xa0
      [  163.738208]  [<ffffffff815106ce>] drm_put_dev+0x1e/0x60
      [  163.738225]  [<ffffffffa01412a0>] i915_pci_remove+0x10/0x20 [i915]
      [  163.738237]  [<ffffffff8143d9b4>] pci_device_remove+0x34/0xb0
      [  163.738249]  [<ffffffff81533d15>] __device_release_driver+0x95/0x140
      [  163.738259]  [<ffffffff81533eb6>] driver_detach+0xb6/0xc0
      [  163.738268]  [<ffffffff81532de3>] bus_remove_driver+0x53/0xd0
      [  163.738278]  [<ffffffff815348d7>] driver_unregister+0x27/0x50
      [  163.738289]  [<ffffffff8143ca15>] pci_unregister_driver+0x25/0x70
      [  163.738299]  [<ffffffff81511de4>] drm_pci_exit+0x74/0x90
      [  163.738337]  [<ffffffffa02034a9>] i915_exit+0x20/0x1a5 [i915]
      [  163.738349]  [<ffffffff8110400f>] SyS_delete_module+0x18f/0x1f0
      [  163.738361]  [<ffffffff817b8a9b>] entry_SYSCALL_64_fastpath+0x16/0x73
      [  163.738370] Code: ff d0 48 89 df e8 de a1 fd ff 48 8d 7b 38 e8 25 ab fd ff 48 8b 83 90 00 00 00 48 85 c0 74 25 48 8b 80 98 01 00 00 ba 21 43 65 87 <48> 8b 00 48 39 10 75 3c f6 40 08 01 75 38 48 c7 83 90 00 00 00
      [  163.738459] RIP  [<ffffffffa018f723>] intel_logical_ring_cleanup+0x83/0x100 [i915]
      [  163.738498]  RSP <ffff88022ff2fd30>
      [  163.738507] ---[ end trace 68f69ce4740fa44f ]---
      
      Cc: Nick Hoath <nicholas.hoath@intel.com>
      Cc: Dave Gordon <david.s.gordon@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Tested-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      9a15a873
  8. 26 1月, 2016 1 次提交
    • N
      drm/i915: Fix context/engine cleanup order · 1803c035
      Nick Hoath 提交于
      Swap the order of context & engine cleanup, so that contexts are cleaned
      up first, and *then* engines. This is a more sensible order anyway, but
      in particular has become necessary since the 'intel_ring_initialized()
      must be simple and inline' patch, which now uses ring->dev as an
      'initialised' flag, so it can now be NULL after engine teardown. This
      in turn can cause a problem in the context code, which (used to) check
      the ring->dev->struct_mutex -- causing a fault if ring->dev was NULL.
      
      Also rename the cleanup function to reflect what it actually does
      (cleanup engines, not a ringbuffer), and fix an annoying whitespace issue.
      
      v2: Also make the fix in i915_load_modeset_init, not just in
          i915_driver_unload (Chris Wilson)
      v3: Had extra stuff in it.
      v4: Reverted extra stuff (so we're back to v2).
          Rebased and updated commentary above (Dave Gordon).
      Signed-off-by: NNick Hoath <nicholas.hoath@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v2)
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453405067-32890-3-git-send-email-david.s.gordon@intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1803c035
  9. 21 1月, 2016 5 次提交
  10. 18 1月, 2016 1 次提交
  11. 13 1月, 2016 2 次提交
  12. 22 12月, 2015 4 次提交
  13. 19 12月, 2015 3 次提交
    • C
      drm/i915: Only spin whilst waiting on the current request · 821485dc
      Chris Wilson 提交于
      Limit busywaiting only to the request currently being processed by the
      GPU. If the request is not currently being processed by the GPU, there
      is a very low likelihood of it being completed within the 2 microsecond
      spin timeout and so we will just be wasting CPU cycles.
      
      v2: Check for logical inversion when rebasing - we were incorrectly
      checking for this request being active, and instead busywaiting for
      when the GPU was not yet processing the request of interest.
      
      v3: Try another colour for the seqno names.
      v4: Another colour for the function names.
      
      v5: Remove the forced coherency when checking for the active request. On
      reflection and plenty of recent experimentation, the issue is not a
      cache coherency problem - but an irq/seqno ordering problem (timing issue).
      Here, we do not need the w/a to force ordering of the read with an
      interrupt.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: "Rogozhkin, Dmitry V" <dmitry.v.rogozhkin@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Eero Tamminen <eero.t.tamminen@intel.com>
      Cc: "Rantala, Valtteri" <valtteri.rantala@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449833608-22125-4-git-send-email-chris@chris-wilson.co.uk
      821485dc
    • C
      drm/i915: Limit the busy wait on requests to 5us not 10ms! · ca5b721e
      Chris Wilson 提交于
      When waiting for high frequency requests, the finite amount of time
      required to set up the irq and wait upon it limits the response rate. By
      busywaiting on the request completion for a short while we can service
      the high frequency waits as quick as possible. However, if it is a slow
      request, we want to sleep as quickly as possible. The tradeoff between
      waiting and sleeping is roughly the time it takes to sleep on a request,
      on the order of a microsecond. Based on measurements of synchronous
      workloads from across big core and little atom, I have set the limit for
      busywaiting as 10 microseconds. In most of the synchronous cases, we can
      reduce the limit down to as little as 2 miscroseconds, but that leaves
      quite a few test cases regressing by factors of 3 and more.
      
      The code currently uses the jiffie clock, but that is far too coarse (on
      the order of 10 milliseconds) and results in poor interactivity as the
      CPU ends up being hogged by slow requests. To get microsecond resolution
      we need to use a high resolution timer. The cheapest of which is polling
      local_clock(), but that is only valid on the same CPU. If we switch CPUs
      because the task was preempted, we can also use that as an indicator that
       the system is too busy to waste cycles on spinning and we should sleep
      instead.
      
      __i915_spin_request was introduced in
      commit 2def4ad9 [v4.2]
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Apr 7 16:20:41 2015 +0100
      
           drm/i915: Optimistically spin for the request completion
      
      v2: Drop full u64 for unsigned long - the timer is 32bit wraparound safe,
      so we can use native register sizes on smaller architectures. Mention
      the approximate microseconds units for elapsed time and add some extra
      comments describing the reason for busywaiting.
      
      v3: Raise the limit to 10us
      v4: Now 5us.
      Reported-by: NJens Axboe <axboe@kernel.dk>
      Link: https://lkml.org/lkml/2015/11/12/621Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: "Rogozhkin, Dmitry V" <dmitry.v.rogozhkin@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Eero Tamminen <eero.t.tamminen@intel.com>
      Cc: "Rantala, Valtteri" <valtteri.rantala@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449833608-22125-3-git-send-email-chris@chris-wilson.co.uk
      ca5b721e
    • C
      drm/i915: Break busywaiting for requests on pending signals · 91b0c352
      Chris Wilson 提交于
      The busywait in __i915_spin_request() does not respect pending signals
      and so may consume the entire timeslice for the task instead of
      returning to userspace to handle the signal.
      
      In the worst case this could cause a delay in signal processing of 20ms,
      which would be a noticeable jitter in cursor tracking. If a higher
      resolution signal was being used, for example to provide fairness of a
      server timeslices between clients, we could expect to detect some
      unfairness between clients (i.e. some windows not updating as fast as
      others). This issue was noticed when inspecting a report of poor
      interactivity resulting from excessively high __i915_spin_request usage.
      
      Fixes regression from
      commit 2def4ad9 [v4.2]
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Apr 7 16:20:41 2015 +0100
      
           drm/i915: Optimistically spin for the request completion
      
      v2: Try to assess the impact of the bug
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc; "Rogozhkin, Dmitry V" <dmitry.v.rogozhkin@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Eero Tamminen <eero.t.tamminen@intel.com>
      Cc: "Rantala, Valtteri" <valtteri.rantala@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449833608-22125-2-git-send-email-chris@chris-wilson.co.uk
      91b0c352
  14. 17 12月, 2015 1 次提交
  15. 12 12月, 2015 3 次提交
  16. 10 12月, 2015 2 次提交
  17. 09 12月, 2015 2 次提交
    • C
      drm/i915: Add soft-pinning API for execbuffer · 506a8e87
      Chris Wilson 提交于
      Userspace can pass in an offset that it presumes the object is located
      at. The kernel will then do its utmost to fit the object into that
      location. The assumption is that userspace is handling its own object
      locations (for example along with full-ppgtt) and that the kernel will
      rarely have to make space for the user's requests.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      
      v2: Fixed incorrect eviction found by Michal Winiarski - fix suggested by Chris
      Wilson.  Fixed incorrect error paths causing crash found by Michal Winiarski.
      (Not published externally)
      
      v3: Rebased because of trivial conflict in object_bind_to_vm.  Fixed eviction
      to allow eviction of soft-pinned objects when another soft-pinned object used
      by a subsequent execbuffer overlaps reported by Michal Winiarski.
      (Not published externally)
      
      v4: Moved soft-pinned objects to the front of ordered_vmas so that they are
      pinned first after an address conflict happens to avoid repeated conflicts in
      rare cases (Suggested by Chris Wilson).  Expanded comment on
      drm_i915_gem_exec_object2.offset to cover this new API.
      
      v5: Added I915_PARAM_HAS_EXEC_SOFTPIN parameter for detecting this capability
      (Kristian). Added check for multiple pinnings on eviction (Akash). Made sure
      buffers are not considered misplaced without the user specifying
      EXEC_OBJECT_SUPPORTS_48B_ADDRESS.  User must assume responsibility for any
      addressing workarounds.  Updated object2.offset field comment again to clarify
      NO_RELOC case (Chris).  checkpatch cleanup.
      
      v6: Trivial rebase on latest drm-intel-nightly
      
      v7: Catch attempts to pin above the max virtual address size and return
      EINVAL (Tvrtko). Decouple EXEC_OBJECT_SUPPORTS_48B_ADDRESS and
      EXEC_OBJECT_PINNED flags, user must pass both flags in any attempt to pin
      something at an offset above 4GB (Chris, Daniel Vetter).
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Akash Goel <akash.goel@intel.com>
      Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
      Cc: Michal Winiarski <michal.winiarski@intel.com>
      Cc: Zou Nanhai <nanhai.zou@intel.com>
      Cc: Kristian Høgsberg <hoegsberg@gmail.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Reviewed-by: NMichel Thierry <michel.thierry@intel.com>
      Acked-by: PDT
      Signed-off-by: NThomas Daniel <thomas.daniel@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449575707-20933-1-git-send-email-thomas.daniel@intel.com
      506a8e87
    • D
      drm: Move drm_display_mode an related docs into kerneldoc · 30ecad77
      Daniel Vetter 提交于
      This was in the documentation for modeset helper hooks, where it is a
      bit misplaced.
      
      v2: Reindent the drm_mode_status enum, inspired by Ville.
      
      v3: Suggestions from Ville and Thierry.
      
      v4: Small fixup that 0day spotted.
      
      v5: Slight change to avoid accidental headings in kerneldoc output.
      
      Cc: ville.syrjala@linux.intel.com
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449218769-16577-27-git-send-email-daniel.vetter@ffwll.ch
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v3)
      Reviewed-by: Thierry Reding <treding@nvidia.com> (v3)
      30ecad77
  18. 05 12月, 2015 1 次提交
  19. 04 12月, 2015 1 次提交
    • C
      drm/i915: Fix RPS pointer passed from wait_ioctl to i915_wait_request · b6aa0873
      Chris Wilson 提交于
      In commit 2e1b8730 [v4.2]
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Mon Apr 27 13:41:22 2015 +0100
      
          drm/i915: Convert RPS tracking to a intel_rps_client struct
      
      we converted the __i915_wait_request() to take a new intel_rps_client
      struct (rather than having to pass fake drm_i915_file_private structs).
      However, due to use of passing a void pointer, I didn't spot one
      callsite in wait-ioctl was passing the wrong pointer.
      
      Fwiw, the impact of this bug is zero. Along the rps path, we always
      first call list_empty(rps) which when we pass in the wrong pointer
      always evaluates to false and we return early and never chase the
      invalid pointers.
      
      The user visible impact is then wait-ioctl doesn't get the same
      waitboosting as the other interfaces (set-domain, throttle), which is a
      performance concern for the *very* few users of the wait interface.
      There is also a libdrm_intel patch to use the wait-ioctl for
      drm_intel_bo_wait_rendering() if anyone feels inclined to review
      libdrm_intel patches.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      [danvet: Add Chris' explanation for why the impact of this is pretty
      close to 0.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b6aa0873
  20. 03 12月, 2015 1 次提交
    • N
      drm/i915: Extend LRC pinning to cover GPU context writeback · 6d65ba94
      Nick Hoath 提交于
      Use the first retired request on a new context to unpin
      the old context. This ensures that the hw context remains
      bound until it has been written back to by the GPU.
      Now that the context is pinned until later in the request/context
      lifecycle, it no longer needs to be pinned from context_queue to
      retire_requests.
      This fixes an issue with GuC submission where the GPU might not
      have finished writing back the context before it is unpinned. This
      results in a GPU hang.
      
      v2: Moved the new pin to cover GuC submission (Alex Dai)
          Moved the new unpin to request_retire to fix coverage leak
      v3: Added switch to default context if freeing a still pinned
          context just in case the hw was actually still using it
      v4: Unwrapped context unpin to allow calling without a request
      v5: Only create a switch to idle context if the ring doesn't
          already have a request pending on it (Alex Dai)
          Rename unsaved to dirty to avoid double negatives (Dave Gordon)
          Changed _no_req postfix to __ prefix for consistency (Dave Gordon)
          Split out per engine cleanup from context_free as it
          was getting unwieldy
          Corrected locking (Dave Gordon)
      v6: Removed some bikeshedding (Mika Kuoppala)
          Added explanation of the GuC hang that this fixes (Daniel Vetter)
      v7: Removed extra per request pinning from ring reset code (Alex Dai)
          Added forced ring unpin/clean in error case in context free (Alex Dai)
      Signed-off-by: NNick Hoath <nicholas.hoath@intel.com>
      Issue: VIZ-4277
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Gordon <david.s.gordon@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Alex Dai <yu.dai@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6d65ba94
  21. 01 12月, 2015 1 次提交
  22. 18 11月, 2015 1 次提交