1. 16 1月, 2019 2 次提交
  2. 15 1月, 2019 7 次提交
  3. 09 1月, 2019 1 次提交
  4. 05 1月, 2019 1 次提交
    • C
      drm/i915: Remove partial attempt to swizzle on pread/pwrite · b9d126e7
      Chris Wilson 提交于
      Our attempt to account for bit17 swizzling of pread/pwrite onto tiled
      objects was flawed due to the simple fact that we do not always know the
      swizzling for a particular page (due to the swizzling varying based on
      location in certain unbalanced configurations). Furthermore, the
      pread/pwrite paths are now unbalanced in that we are required to use the
      GTT as in some cases we do not have direct CPU access to the backing
      physical pages (thus some paths trying to account for the swizzle, but
      others neglecting, chaos ensues).
      
      There are no known users who do use pread/pwrite into a tiled object
      (you need to manually detile anyway, so why now just use mmap and avoid
      the copy?) and no user bug reports to indicate that it is being used in
      the wild. As no one is hitting the buggy path, we can just remove the
      buggy code.
      
      v2: Just use the fault allowing kmap() + normal copy_(to|from)_user
      v3: Avoid int overflow in computing 'length' from 'remain' (Tvrtko)
      
      References: fe115628 ("drm/i915: Implement pwrite without struct-mutex")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Acked-by: NKenneth Graunke <kenneth@whitecape.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190105120758.9237-1-chris@chris-wilson.co.uk
      b9d126e7
  5. 04 1月, 2019 2 次提交
    • C
      drm/i915: Do not allow unwedging following a failed driver initialisation · 55c15512
      Chris Wilson 提交于
      If we declare the driver wedged during early initialisation, we leave
      the driver in an undefined state (with respect to GEM execution). As
      this leads to unexpected behaviour if we allow the user to unwedge the
      device (through debugfs, and performed by igt at test start), do not.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190103213340.1669-1-chris@chris-wilson.co.uk
      55c15512
    • L
      Remove 'type' argument from access_ok() function · 96d4f267
      Linus Torvalds 提交于
      Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
      of the user address range verification function since we got rid of the
      old racy i386-only code to walk page tables by hand.
      
      It existed because the original 80386 would not honor the write protect
      bit when in kernel mode, so you had to do COW by hand before doing any
      user access.  But we haven't supported that in a long time, and these
      days the 'type' argument is a purely historical artifact.
      
      A discussion about extending 'user_access_begin()' to do the range
      checking resulted this patch, because there is no way we're going to
      move the old VERIFY_xyz interface to that model.  And it's best done at
      the end of the merge window when I've done most of my merges, so let's
      just get this done once and for all.
      
      This patch was mostly done with a sed-script, with manual fix-ups for
      the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.
      
      There were a couple of notable cases:
      
       - csky still had the old "verify_area()" name as an alias.
      
       - the iter_iov code had magical hardcoded knowledge of the actual
         values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
         really used it)
      
       - microblaze used the type argument for a debug printout
      
      but other than those oddities this should be a total no-op patch.
      
      I tried to fix up all architectures, did fairly extensive grepping for
      access_ok() uses, and the changes are trivial, but I may have missed
      something.  Any missed conversion should be trivially fixable, though.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      96d4f267
  6. 03 1月, 2019 1 次提交
  7. 31 12月, 2018 1 次提交
  8. 29 12月, 2018 1 次提交
  9. 28 12月, 2018 1 次提交
  10. 13 12月, 2018 1 次提交
  11. 12 12月, 2018 1 次提交
  12. 05 12月, 2018 1 次提交
    • T
      drm/i915: Record GT workarounds in a list · 00936779
      Tvrtko Ursulin 提交于
      To enable later verification of GT workaround state at various stages of
      driver lifetime, we record the list of applicable ones per platforms to a
      list, from which they are also applied.
      
      The added data structure is a simple array of register, mask and value
      items, which is allocated on demand as workarounds are added to the list.
      
      This is a temporary implementation which later in the series gets fused
      with the existing per context workaround list handling. It is separated at
      this stage since the following patch fixes a bug which needs to be as easy
      to backport as possible.
      
      Also, since in the following patch we will be adding a new class of
      workarounds (per engine) which can be applied from interrupt context, we
      straight away make the provision for safe read-modify-write cycle.
      
      v2:
       * Change dev_priv to i915 along the init path. (Chris Wilson)
       * API rename. (Chris Wilson)
      
      v3:
       * Remove explicit list size tracking in favour of growing the allocation
         in power of two chunks. (Chris Wilson)
      
      v4:
       Chris Wilson:
       * Change wa_list_finish to early return.
       * Copy workarounds using the compiler for static checking.
       * Do not bother zeroing unused entries.
       * Re-order struct i915_wa_list.
      
      v5:
       * kmalloc_array.
       * Whitespace cleanup.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181203133319.10174-1-tvrtko.ursulin@linux.intel.com
      (cherry picked from commit 25d140fa)
      Fixes: 59b449d5 ("drm/i915: Split out functions for different kinds of workarounds")
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      00936779
  13. 04 12月, 2018 4 次提交
    • C
      drm/i915: Allocate a common scratch page · 51797499
      Chris Wilson 提交于
      Currently we allocate a scratch page for each engine, but since we only
      ever write into it for post-sync operations, it is not exposed to
      userspace nor do we care for coherency. As we then do not care about its
      contents, we can use one page for all, reducing our allocations and
      avoid complications by not assuming per-engine isolation.
      
      For later use, it simplifies engine initialisation (by removing the
      allocation that required struct_mutex!) and means that we can always rely
      on there being a scratch page.
      
      v2: Check that we allocated a large enough scratch for I830 w/a
      
      Fixes: 06e562e7f515 ("drm/i915/ringbuffer: Delay after EMIT_INVALIDATE for gen4/gen5") # v4.18.20
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108850Signed-off-by: NChris 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>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181204141522.13640-1-chris@chris-wilson.co.uk
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.18.20+
      51797499
    • T
      drm/i915: Verify GT workaround state after GPU init · 094304be
      Tvrtko Ursulin 提交于
      Since we now have all the GT workarounds in a table, by adding a simple
      shared helper function we can now verify that their values are still
      applied after some interesting events in the lifetime of the driver.
      
      Initially we only do this after GPU initialization.
      
      v2:
       Chris Wilson:
       * Simplify verification by realizing it's a simple xor and and.
       * Remove verification from engine reset path.
       * Return bool straight away from the verify API.
      
      v3:
       * API rename. (Chris Wilson)
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181203125014.3219-4-tvrtko.ursulin@linux.intel.com
      094304be
    • T
      drm/i915: Record GT workarounds in a list · 25d140fa
      Tvrtko Ursulin 提交于
      To enable later verification of GT workaround state at various stages of
      driver lifetime, we record the list of applicable ones per platforms to a
      list, from which they are also applied.
      
      The added data structure is a simple array of register, mask and value
      items, which is allocated on demand as workarounds are added to the list.
      
      This is a temporary implementation which later in the series gets fused
      with the existing per context workaround list handling. It is separated at
      this stage since the following patch fixes a bug which needs to be as easy
      to backport as possible.
      
      Also, since in the following patch we will be adding a new class of
      workarounds (per engine) which can be applied from interrupt context, we
      straight away make the provision for safe read-modify-write cycle.
      
      v2:
       * Change dev_priv to i915 along the init path. (Chris Wilson)
       * API rename. (Chris Wilson)
      
      v3:
       * Remove explicit list size tracking in favour of growing the allocation
         in power of two chunks. (Chris Wilson)
      
      v4:
       Chris Wilson:
       * Change wa_list_finish to early return.
       * Copy workarounds using the compiler for static checking.
       * Do not bother zeroing unused entries.
       * Re-order struct i915_wa_list.
      
      v5:
       * kmalloc_array.
       * Whitespace cleanup.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181203133319.10174-1-tvrtko.ursulin@linux.intel.com
      25d140fa
    • C
      drm/i915: Complete the fences as they are cancelled due to wedging · 3800960a
      Chris Wilson 提交于
      We inspect the requests under the assumption that they will be marked as
      completed when they are removed from the queue. Currently however, in the
      process of wedging the requests will be removed from the queue before they
      are completed, so rearrange the code to complete the fences before the
      locks are dropped.
      
      <1>[  354.473346] BUG: unable to handle kernel NULL pointer dereference at 0000000000000250
      <6>[  354.473363] PGD 0 P4D 0
      <4>[  354.473370] Oops: 0000 [#1] PREEMPT SMP PTI
      <4>[  354.473380] CPU: 0 PID: 4470 Comm: gem_eio Tainted: G     U            4.20.0-rc4-CI-CI_DRM_5216+ #1
      <4>[  354.473393] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS JYGLKCPX.86A.0027.2018.0125.1347 01/25/2018
      <4>[  354.473480] RIP: 0010:__i915_schedule+0x311/0x5e0 [i915]
      <4>[  354.473490] Code: 49 89 44 24 20 4d 89 4c 24 28 4d 89 29 44 39 b3 a0 04 00 00 7d 3a 41 8b 44 24 78 85 c0 74 13 48 8b 93 78 04 00 00 48 83 e2 fc <39> 82 50 02 00 00 79 1e 44 89 b3 a0 04 00 00 48 8d bb d0 03 00 00
      <4>[  354.473515] RSP: 0018:ffffc900001bba90 EFLAGS: 00010046
      <4>[  354.473524] RAX: 0000000000000003 RBX: ffff8882624c8008 RCX: f34a737800000000
      <4>[  354.473535] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8882624c8048
      <4>[  354.473545] RBP: ffffc900001bbab0 R08: 000000005963f1f1 R09: 0000000000000000
      <4>[  354.473556] R10: ffffc900001bba10 R11: ffff8882624c8060 R12: ffff88824fdd7b98
      <4>[  354.473567] R13: ffff88824fdd7bb8 R14: 0000000000000001 R15: ffff88824fdd7750
      <4>[  354.473578] FS:  00007f44b4b5b980(0000) GS:ffff888277e00000(0000) knlGS:0000000000000000
      <4>[  354.473590] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4>[  354.473599] CR2: 0000000000000250 CR3: 000000026976e000 CR4: 0000000000340ef0
      <4>[  354.473611] Call Trace:
      <4>[  354.473622]  ? lock_acquire+0xa6/0x1c0
      <4>[  354.473677]  ? i915_schedule_bump_priority+0x57/0xd0 [i915]
      <4>[  354.473736]  i915_schedule_bump_priority+0x72/0xd0 [i915]
      <4>[  354.473792]  i915_request_wait+0x4db/0x840 [i915]
      <4>[  354.473804]  ? get_pwq.isra.4+0x2c/0x50
      <4>[  354.473813]  ? ___preempt_schedule+0x16/0x18
      <4>[  354.473824]  ? wake_up_q+0x70/0x70
      <4>[  354.473831]  ? wake_up_q+0x70/0x70
      <4>[  354.473882]  ? gen6_rps_boost+0x118/0x120 [i915]
      <4>[  354.473936]  i915_gem_object_wait_fence+0x8a/0x110 [i915]
      <4>[  354.473991]  i915_gem_object_wait+0x113/0x500 [i915]
      <4>[  354.474047]  i915_gem_wait_ioctl+0x11c/0x2f0 [i915]
      <4>[  354.474101]  ? i915_gem_unset_wedged+0x210/0x210 [i915]
      <4>[  354.474113]  drm_ioctl_kernel+0x81/0xf0
      <4>[  354.474123]  drm_ioctl+0x2de/0x390
      <4>[  354.474175]  ? i915_gem_unset_wedged+0x210/0x210 [i915]
      <4>[  354.474187]  ? finish_task_switch+0x95/0x260
      <4>[  354.474197]  ? lock_acquire+0xa6/0x1c0
      <4>[  354.474207]  do_vfs_ioctl+0xa0/0x6e0
      <4>[  354.474217]  ? __fget+0xfc/0x1e0
      <4>[  354.474225]  ksys_ioctl+0x35/0x60
      <4>[  354.474233]  __x64_sys_ioctl+0x11/0x20
      <4>[  354.474241]  do_syscall_64+0x55/0x190
      <4>[  354.474251]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4>[  354.474260] RIP: 0033:0x7f44b3de65d7
      <4>[  354.474267] Code: b3 66 90 48 8b 05 b1 48 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 48 2d 00 f7 d8 64 89 01 48
      <4>[  354.474293] RSP: 002b:00007fff974948e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      <4>[  354.474305] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f44b3de65d7
      <4>[  354.474316] RDX: 00007fff97494940 RSI: 00000000c010646c RDI: 0000000000000007
      <4>[  354.474327] RBP: 00007fff97494940 R08: 0000000000000000 R09: 00007f44b40bbc40
      <4>[  354.474337] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000c010646c
      <4>[  354.474348] R13: 0000000000000007 R14: 0000000000000000 R15: 0000000000000000
      
      v2: Avoid floating requests.
      v3: Can't call dma_fence_signal() under the timeline lock!
      v4: Can't call dma_fence_signal() from inside another fence either.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181203113701.12106-2-chris@chris-wilson.co.uk
      3800960a
  14. 09 11月, 2018 2 次提交
  15. 07 11月, 2018 1 次提交
  16. 06 11月, 2018 1 次提交
  17. 18 10月, 2018 1 次提交
  18. 15 10月, 2018 1 次提交
  19. 02 10月, 2018 1 次提交
  20. 30 9月, 2018 1 次提交
    • M
      xarray: Replace exceptional entries · 3159f943
      Matthew Wilcox 提交于
      Introduce xarray value entries and tagged pointers to replace radix
      tree exceptional entries.  This is a slight change in encoding to allow
      the use of an extra bit (we can now store BITS_PER_LONG - 1 bits in a
      value entry).  It is also a change in emphasis; exceptional entries are
      intimidating and different.  As the comment explains, you can choose
      to store values or pointers in the xarray and they are both first-class
      citizens.
      Signed-off-by: NMatthew Wilcox <willy@infradead.org>
      Reviewed-by: NJosef Bacik <jbacik@fb.com>
      3159f943
  21. 27 9月, 2018 2 次提交
  22. 26 9月, 2018 1 次提交
  23. 21 9月, 2018 1 次提交
  24. 20 9月, 2018 1 次提交
  25. 14 9月, 2018 3 次提交