1. 31 7月, 2017 1 次提交
  2. 15 7月, 2017 1 次提交
    • C
      dma-buf/fence: Avoid use of uninitialised timestamp · 76250f2b
      Chris Wilson 提交于
      [  236.821534] WARNING: kmemcheck: Caught 64-bit read from uninitialized memory (ffff8802538683d0)
      [  236.828642] 420000001e7f0000000000000000000000080000000000000000000000000000
      [  236.839543]  i i i i u u u u i i i i i i i i u u u u u u u u u u u u u u u u
      [  236.850420]                                  ^
      [  236.854123] RIP: 0010:[<ffffffff81396f07>]  [<ffffffff81396f07>] fence_signal+0x17/0xd0
      [  236.861313] RSP: 0018:ffff88024acd7ba0  EFLAGS: 00010282
      [  236.865027] RAX: ffffffff812f6a90 RBX: ffff8802527ca800 RCX: ffff880252cb30e0
      [  236.868801] RDX: ffff88024ac5d918 RSI: ffff880252f780e0 RDI: ffff880253868380
      [  236.872579] RBP: ffff88024acd7bc0 R08: ffff88024acd7be0 R09: 0000000000000000
      [  236.876407] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880253868380
      [  236.880185] R13: ffff8802538684d0 R14: ffff880253868380 R15: ffff88024cd48e00
      [  236.883983] FS:  00007f1646d1a740(0000) GS:ffff88025d000000(0000) knlGS:0000000000000000
      [  236.890959] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  236.894702] CR2: ffff880251360318 CR3: 000000024ad21000 CR4: 00000000001406f0
      [  236.898481]  [<ffffffff8130d1ad>] i915_gem_request_retire+0x1cd/0x230
      [  236.902439]  [<ffffffff8130e2b3>] i915_gem_request_alloc+0xa3/0x2f0
      [  236.906435]  [<ffffffff812fb1bd>] i915_gem_do_execbuffer.isra.41+0xb6d/0x18b0
      [  236.910434]  [<ffffffff812fc265>] i915_gem_execbuffer2+0x95/0x1e0
      [  236.914390]  [<ffffffff812ad625>] drm_ioctl+0x1e5/0x460
      [  236.918275]  [<ffffffff8110d4cf>] do_vfs_ioctl+0x8f/0x5c0
      [  236.922168]  [<ffffffff8110da3c>] SyS_ioctl+0x3c/0x70
      [  236.926090]  [<ffffffff814b7a5f>] entry_SYSCALL_64_fastpath+0x17/0x93
      [  236.930045]  [<ffffffffffffffff>] 0xffffffffffffffff
      
      We only set the timestamp before we mark the fence as signaled. It is
      done before to avoid observers having a window in which they may see the
      fence as complete but no timestamp. Having it does incur a potential for
      the timestamp to be written twice, and even for it to be corrupted if
      the u64 write is not atomic. Instead use a new bit to record the
      presence of the timestamp, and teach the readers to wait until it is set
      if the fence is complete. There still remains a race where the timestamp
      for the signaled fence may be shown before the fence is reported as
      signaled, but that's a pre-existing error.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Reported-by: NRafael Antognolli <rafael.antognolli@intel.com>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170214124001.1930-1-chris@chris-wilson.co.uk
      76250f2b
  3. 25 5月, 2017 1 次提交
    • C
      dma-buf/sync-file: Defer creation of sync_file->name · 71ebc9a3
      Chris Wilson 提交于
      Constructing the name takes the majority of the time for allocating a
      sync_file to wrap a fence, and the name is very rarely used (only via
      the sync_file status user interface). To reduce the impact on the common
      path (that of creating sync_file to pass around), defer the construction
      of the name until it is first used.
      
      v2: Update kerneldoc (kbuild test robot)
      v3: sync_debug.c was peeking at the name
      v4: Comment upon the potential race between two users of
      sync_file_get_name() and claim that such a race is below the level of
      notice. However, to prevent any future nuisance, use a global spinlock
      to serialize the assignment of the name.
      v5: Completely avoid the read/write race by only storing the name passed
      in from the user inside sync_file->user_name and passing in a buffer to
      dynamically construct the name otherwise.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170516111042.24719-1-chris@chris-wilson.co.uk
      71ebc9a3
  4. 08 5月, 2017 4 次提交
  5. 28 4月, 2017 1 次提交
  6. 20 4月, 2017 1 次提交
  7. 18 4月, 2017 1 次提交
  8. 04 4月, 2017 1 次提交
  9. 31 3月, 2017 1 次提交
  10. 18 3月, 2017 1 次提交
  11. 02 3月, 2017 1 次提交
  12. 27 2月, 2017 1 次提交
  13. 16 2月, 2017 1 次提交
  14. 28 1月, 2017 1 次提交
  15. 09 1月, 2017 3 次提交
  16. 30 12月, 2016 2 次提交
  17. 13 12月, 2016 4 次提交
  18. 18 11月, 2016 1 次提交
  19. 09 11月, 2016 6 次提交
  20. 25 10月, 2016 2 次提交
  21. 21 10月, 2016 1 次提交
  22. 12 10月, 2016 3 次提交
  23. 22 9月, 2016 1 次提交