1. 29 11月, 2017 1 次提交
  2. 28 11月, 2017 1 次提交
  3. 21 9月, 2017 1 次提交
  4. 08 5月, 2017 3 次提交
  5. 20 4月, 2017 1 次提交
  6. 04 4月, 2017 1 次提交
  7. 31 3月, 2017 1 次提交
  8. 27 2月, 2017 1 次提交
  9. 30 12月, 2016 2 次提交
  10. 13 12月, 2016 3 次提交
  11. 25 10月, 2016 1 次提交
    • C
      dma-buf: Rename struct fence to dma_fence · f54d1867
      Chris Wilson 提交于
      I plan to usurp the short name of struct fence for a core kernel struct,
      and so I need to rename the specialised fence/timeline for DMA
      operations to make room.
      
      A consensus was reached in
      https://lists.freedesktop.org/archives/dri-devel/2016-July/113083.html
      that making clear this fence applies to DMA operations was a good thing.
      Since then the patch has grown a bit as usage increases, so hopefully it
      remains a good thing!
      
      (v2...: rebase, rerun spatch)
      v3: Compile on msm, spotted a manual fixup that I broke.
      v4: Try again for msm, sorry Daniel
      
      coccinelle script:
      @@
      
      @@
      - struct fence
      + struct dma_fence
      @@
      
      @@
      - struct fence_ops
      + struct dma_fence_ops
      @@
      
      @@
      - struct fence_cb
      + struct dma_fence_cb
      @@
      
      @@
      - struct fence_array
      + struct dma_fence_array
      @@
      
      @@
      - enum fence_flag_bits
      + enum dma_fence_flag_bits
      @@
      
      @@
      (
      - fence_init
      + dma_fence_init
      |
      - fence_release
      + dma_fence_release
      |
      - fence_free
      + dma_fence_free
      |
      - fence_get
      + dma_fence_get
      |
      - fence_get_rcu
      + dma_fence_get_rcu
      |
      - fence_put
      + dma_fence_put
      |
      - fence_signal
      + dma_fence_signal
      |
      - fence_signal_locked
      + dma_fence_signal_locked
      |
      - fence_default_wait
      + dma_fence_default_wait
      |
      - fence_add_callback
      + dma_fence_add_callback
      |
      - fence_remove_callback
      + dma_fence_remove_callback
      |
      - fence_enable_sw_signaling
      + dma_fence_enable_sw_signaling
      |
      - fence_is_signaled_locked
      + dma_fence_is_signaled_locked
      |
      - fence_is_signaled
      + dma_fence_is_signaled
      |
      - fence_is_later
      + dma_fence_is_later
      |
      - fence_later
      + dma_fence_later
      |
      - fence_wait_timeout
      + dma_fence_wait_timeout
      |
      - fence_wait_any_timeout
      + dma_fence_wait_any_timeout
      |
      - fence_wait
      + dma_fence_wait
      |
      - fence_context_alloc
      + dma_fence_context_alloc
      |
      - fence_array_create
      + dma_fence_array_create
      |
      - to_fence_array
      + to_dma_fence_array
      |
      - fence_is_array
      + dma_fence_is_array
      |
      - trace_fence_emit
      + trace_dma_fence_emit
      |
      - FENCE_TRACE
      + DMA_FENCE_TRACE
      |
      - FENCE_WARN
      + DMA_FENCE_WARN
      |
      - FENCE_ERR
      + DMA_FENCE_ERR
      )
       (
       ...
       )
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Acked-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161025120045.28839-1-chris@chris-wilson.co.uk
      f54d1867
  12. 16 8月, 2016 1 次提交
  13. 18 7月, 2016 1 次提交
  14. 21 6月, 2016 3 次提交
  15. 01 6月, 2016 1 次提交
  16. 21 3月, 2016 1 次提交
    • D
      dma-buf: Update docs for SYNC ioctl · 87e332d5
      Daniel Vetter 提交于
      Just a bit of wording polish plus mentioning that it can fail and must
      be restarted.
      
      Requested by Sumit.
      
      v2: Fix them typos (Hans).
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tiago Vignatti <tiago.vignatti@intel.com>
      Cc: Stéphane Marchesin <marcheu@chromium.org>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      CC: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: linaro-mm-sig@lists.linaro.org
      Cc: intel-gfx@lists.freedesktop.org
      Cc: devel@driverdev.osuosl.org
      Cc: Hans Verkuil <hverkuil@xs4all.nl>
      Acked-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      87e332d5
  17. 19 3月, 2016 1 次提交
    • C
      dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access() · 18b862dc
      Chris Wilson 提交于
      Drivers, especially i915.ko, can fail during the initial migration of a
      dma-buf for CPU access. However, the error code from the driver was not
      being propagated back to ioctl and so userspace was blissfully ignorant
      of the failure. Rendering corruption ensues.
      
      Whilst fixing the ioctl to return the error code from
      dma_buf_start_cpu_access(), also do the same for
      dma_buf_end_cpu_access().  For most drivers, dma_buf_end_cpu_access()
      cannot fail. i915.ko however, as most drivers would, wants to avoid being
      uninterruptible (as would be required to guarrantee no failure when
      flushing the buffer to the device). As userspace already has to handle
      errors from the SYNC_IOCTL, take advantage of this to be able to restart
      the syscall across signals.
      
      This fixes a coherency issue for i915.ko as well as reducing the
      uninterruptible hold upon its BKL, the struct_mutex.
      
      Fixes commit c11e391d
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Feb 11 20:04:51 2016 -0200
      
          dma-buf: Add ioctls to allow userspace to flush
      
      Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible
      Testcase: igt/prime_mmap_coherency/ioctl-errors
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tiago Vignatti <tiago.vignatti@intel.com>
      Cc: Stéphane Marchesin <marcheu@chromium.org>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      CC: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: linaro-mm-sig@lists.linaro.org
      Cc: intel-gfx@lists.freedesktop.org
      Cc: devel@driverdev.osuosl.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1458331359-2634-1-git-send-email-chris@chris-wilson.co.uk
      18b862dc
  18. 12 2月, 2016 1 次提交
    • D
      dma-buf: Add ioctls to allow userspace to flush · c11e391d
      Daniel Vetter 提交于
      The userspace might need some sort of cache coherency management e.g. when CPU
      and GPU domains are being accessed through dma-buf at the same time. To
      circumvent this problem there are begin/end coherency markers, that forward
      directly to existing dma-buf device drivers vfunc hooks. Userspace can make use
      of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be
      used like following:
           - mmap dma-buf fd
           - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write
             to mmap area 3. SYNC_END ioctl. This can be repeated as often as you
             want (with the new data being consumed by the GPU or say scanout device)
           - munmap once you don't need the buffer any more
      
      v2 (Tiago): Fix header file type names (u64 -> __u64)
      v3 (Tiago): Add documentation. Use enum dma_buf_sync_flags to the begin/end
      dma-buf functions. Check for overflows in start/length.
      v4 (Tiago): use 2d regions for sync.
      v5 (Tiago): forget about 2d regions (v4); use _IOW in DMA_BUF_IOCTL_SYNC and
      remove range information from struct dma_buf_sync.
      v6 (Tiago): use __u64 structured padded flags instead enum. Adjust
      documentation about the recommendation on using sync ioctls.
      v7 (Tiago): Alex' nit on flags definition and being even more wording in the
      doc about sync usage.
      v9 (Tiago): remove useless is_dma_buf_file check. Fix sync.flags conditionals
      and its mask order check. Add <linux/types.h> include in dma-buf.h.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Reviewed-by: NStéphane Marchesin <marcheu@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NTiago Vignatti <tiago.vignatti@intel.com>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1455228291-29640-1-git-send-email-tiago.vignatti@intel.com
      c11e391d
  19. 09 2月, 2016 1 次提交
  20. 21 5月, 2015 1 次提交
  21. 13 5月, 2015 1 次提交
  22. 21 4月, 2015 1 次提交
  23. 09 10月, 2014 1 次提交
  24. 09 7月, 2014 5 次提交
  25. 05 5月, 2014 1 次提交
  26. 13 2月, 2014 1 次提交
  27. 08 2月, 2014 1 次提交
    • C
      dma-buf: avoid using IS_ERR_OR_NULL · fee0c54e
      Colin Cross 提交于
      dma_buf_map_attachment and dma_buf_vmap can return NULL or
      ERR_PTR on a error.  This encourages a common buggy pattern in
      callers:
      	sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
      	if (IS_ERR_OR_NULL(sgt))
                      return PTR_ERR(sgt);
      
      This causes the caller to return 0 on an error.  IS_ERR_OR_NULL
      is almost always a sign of poorly-defined error handling.
      
      This patch converts dma_buf_map_attachment to always return
      ERR_PTR, and fixes the callers that incorrectly handled NULL.
      There are a few more callers that were not checking for NULL
      at all, which would have dereferenced a NULL pointer later.
      There are also a few more callers that correctly handled NULL
      and ERR_PTR differently, I left those alone but they could also
      be modified to delete the NULL check.
      
      This patch also converts dma_buf_vmap to always return NULL.
      All the callers to dma_buf_vmap only check for NULL, and would
      have dereferenced an ERR_PTR and panic'd if one was ever
      returned. This is not consistent with the rest of the dma buf
      APIs, but matches the expectations of all of the callers.
      Signed-off-by: NColin Cross <ccross@android.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fee0c54e
  28. 10 9月, 2013 2 次提交