1. 30 6月, 2017 2 次提交
  2. 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
  3. 08 5月, 2017 1 次提交
  4. 09 1月, 2017 1 次提交
  5. 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
  6. 15 8月, 2016 2 次提交
  7. 11 8月, 2016 1 次提交
    • G
      dma-buf/sync_file: refactor fence storage in struct sync_file · a02b9dc9
      Gustavo Padovan 提交于
      Create sync_file->fence to abstract the type of fence we are using for
      each sync_file. If only one fence is present we use a normal struct fence
      but if there is more fences to be added to the sync_file a fence_array
      is created.
      
      This change cleans up sync_file a bit. We don't need to have sync_file_cb
      array anymore. Instead, as we always have  one fence, only one fence
      callback is registered per sync_file.
      
      v2: Comments from Chris Wilson and Christian König
      	- Not using fence_ops anymore
      	- fence_is_array() was created to differentiate fence from fence_array
      	- fence_array_teardown() is now exported and used under fence_is_array()
      	- struct sync_file lost num_fences member
      
      v3: Comments from Chris Wilson and Christian König
      	- struct sync_file lost status member in favor of fence_is_signaled()
      	- drop use of fence_array_teardown()
      	- use sizeof(*fence) to allocate only an array on fence pointers
      
      v4: Comments from Chris Wilson
      	- use sizeof(*fence) to reallocate array
      	- fix typo in comments
      	- protect num_fences sum against overflows
      	- use array->base instead of casting the to struct fence
      
      v5: fixes checkpatch warnings
      
      v6: fix case where all fences are signaled.
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NSumit Semwal <sumit.semwal@linaro.org>
      a02b9dc9
  8. 18 6月, 2016 14 次提交
  9. 30 4月, 2016 4 次提交
  10. 15 2月, 2016 1 次提交
    • P
      drivers/staging/android: don't use modular references in sync_debug.c · 9c583af9
      Paul Gortmaker 提交于
      In commit 8a004484 ("staging/android:
      create a 'sync' dir for debugfs information"), modular references were
      introduced to this file.  However if we look, we find:
      
      drivers/staging/android/Makefile:obj-$(CONFIG_SYNC) += sync.o sync_debug.o
      
      drivers/staging/android/Kconfig:config SYNC
      drivers/staging/android/Kconfig:        bool "Synchronization framework"
      
      This file isn't currently buildable as a module, and hence the code
      for module_exit is just dead code.  Remove it and the module.h include.
      
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9c583af9
  11. 08 2月, 2016 7 次提交
  12. 22 12月, 2015 1 次提交
  13. 18 1月, 2015 1 次提交
  14. 28 10月, 2014 1 次提交
  15. 13 7月, 2014 1 次提交
  16. 09 7月, 2014 1 次提交