23 Apr, 2019

1 commit

  • sync_dump() is an unused, unexported, function that adds 64k to the
    kernel image and doesn't even provide locking around the global array it
    uses.

    add/remove: 0/2 grow/shrink: 0/0 up/down: 0/-65734 (-65734)
    Function old new delta
    sync_dump 198 - -198
    sync_dump_buf 65536 - -65536

    Signed-off-by: Chris Wilson
    Cc: Sumit Semwal
    Cc: Gustavo Padovan
    Reviewed-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20190419181904.6199-1-chris@chris-wilson.co.uk

    Chris Wilson
     

07 May, 2018

1 commit

  • The sync_debug.h header is internal, and only used by
    sw_sync.c. Therefore, SW_SYNC is always defined and there
    is no need for the stubs. Remove them and make the code
    simpler.

    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20180504180037.10661-1-ezequiel@collabora.com

    Ezequiel Garcia
     

30 Jun, 2017

2 commits

  • Reduce the list iteration when incrementing the timeline by storing the
    fences in increasing order.

    v2: Prevent spinlock recursion on free during create
    v3: Fixup rebase conflict inside comments that escaped the compiler.

    Signed-off-by: Chris Wilson
    Cc: Sumit Semwal
    Cc: Sean Paul
    Cc: Gustavo Padovan
    Reviewed-by: Sean Paul
    Signed-off-by: Gustavo Padovan
    Link: http://patchwork.freedesktop.org/patch/msgid/20170629211253.22766-1-chris@chris-wilson.co.uk

    Chris Wilson
     
  • The sync_pt were not adding themselves atomically to the timeline lists,
    corruption imminent. Only a single list is required to track the
    unsignaled sync_pt, so reduce it and rename the lock more appropriately
    along with using idiomatic names to distinguish a list from links along
    it.

    v2: Prevent spinlock recursion on free during create (next patch) and
    fixup crossref in kerneldoc

    Signed-off-by: Chris Wilson
    Cc: Sumit Semwal
    Cc: Sean Paul
    Cc: Gustavo Padovan
    Reviewed-by: Sean Paul
    Signed-off-by: Gustavo Padovan
    Link: http://patchwork.freedesktop.org/patch/msgid/20170629210532.5617-1-chris@chris-wilson.co.uk

    Chris Wilson
     

25 Oct, 2016

1 commit

  • 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: Chris Wilson
    Reviewed-by: Gustavo Padovan
    Acked-by: Sumit Semwal
    Acked-by: Christian König
    Signed-off-by: Daniel Vetter
    Link: http://patchwork.freedesktop.org/patch/msgid/20161025120045.28839-1-chris@chris-wilson.co.uk

    Chris Wilson
     

15 Aug, 2016

1 commit

  • SW_SYNC allows to run tests on the sync_file framework via debugfs on

    /sync/sw_sync

    Opening and closing the file triggers creation and release of a sync
    timeline. To create fences on this timeline the SW_SYNC_IOC_CREATE_FENCE
    ioctl should be used. To increment the timeline value use SW_SYNC_IOC_INC.

    Also it exports Sync information on

    /sync/info

    Signed-off-by: Gustavo Padovan
    Reviewed-by: Eric Engestrom
    Signed-off-by: Greg Kroah-Hartman

    Gustavo Padovan