1. 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
  2. 22 10月, 2016 1 次提交
  3. 17 10月, 2016 3 次提交
  4. 10 10月, 2016 1 次提交
  5. 04 10月, 2016 1 次提交
  6. 22 9月, 2016 3 次提交
  7. 19 9月, 2016 3 次提交
  8. 29 8月, 2016 5 次提交
  9. 17 8月, 2016 3 次提交
  10. 16 8月, 2016 4 次提交
  11. 11 8月, 2016 1 次提交
  12. 09 8月, 2016 2 次提交
  13. 29 7月, 2016 1 次提交
    • M
      drm: add generic zpos property · 44d1240d
      Marek Szyprowski 提交于
      version 8:
      - move drm_blend.o from drm-y to drm_kms_helper-y to avoid
        EXPORT_SYMBOL(drm_atomic_helper_normalize_zpos)
      - remove dead function declarations in drm_crtc.h
      
      version 7:
      - remove useless EXPORT_SYMBOL()
      - better z-order wording in Documentation
      
      version 6:
      - add zpos in gpu documentation file
      - merge Ville patch about zpos initial value and API improvement.
        I have split Ville patch between zpos core and drivers
      
      version 5:
      - remove zpos range check and comeback to 0 to N-1
        normalization algorithm
      
      version 4:
      - make sure that normalized zpos value is stay
        in the defined property range and warn user if not
      
      This patch adds support for generic plane's zpos property property with
      well-defined semantics:
      - added zpos properties to plane and plane state structures
      - added helpers for normalizing zpos properties of given set of planes
      - well defined semantics: planes are sorted by zpos values and then plane
        id value if zpos equals
      
      Normalized zpos values are calculated automatically when generic
      muttable zpos property has been initialized. Drivers can simply use
      plane_state->normalized_zpos in their atomic_check and/or plane_update
      callbacks without any additional calls to DRM core.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      
      Compare to Marek's original patch zpos property is now specific to each
      plane and no more to the core.
      Normalize function take care of the range of per plane defined range
      before set normalized_zpos.
      Signed-off-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Tested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: vincent.abriou@st.com
      Cc: fabien.dessenne@st.com
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      44d1240d
  14. 20 7月, 2016 1 次提交
  15. 19 7月, 2016 3 次提交
  16. 12 7月, 2016 1 次提交
  17. 24 6月, 2016 1 次提交
  18. 22 6月, 2016 2 次提交
  19. 17 6月, 2016 2 次提交
  20. 10 6月, 2016 1 次提交
    • D
      drm/atomic-helper: nonblocking commit support · 9f2a7950
      Daniel Vetter 提交于
      Design ideas:
      
      - split up the actual commit into different phases, and have
        completions for each of them. This will be useful for the future
        when we want to interleave phases much more aggressively, for e.g.
        queue depth > 1. For not it's just a minimal optimization compared
        to current common nonblocking implementation patterns from drivers,
        which all stall for the entire commit to complete, including vblank
        waits and cleanups.
      
      - Extract a separate atomic_commit_hw hook since that's the part most
        drivers will need to overwrite, hopefully allowing even more shared
        code.
      
      - Enforce EBUSY seamntics by attaching one of the completions to the
        flip_done vblank event. Side benefit of forcing atomic drivers using
        these helpers to implement event handlign at least semi-correct. I'm
        evil that way ;-)
      
      - Ridiculously modular, as usual.
      
      - The main tracking unit for a commit stays struct drm_atomic_state,
        and the ownership rules for that are unchanged. Ownership still
        gets transferred to the driver (and subsequently to the worker) on
        successful commits. What is added is a small, per-crtc, refcounted
        structure to track pending commits called struct drm_crtc_commit.
        No actual state is attached to that though, it's purely for ordering
        and waiting.
      
      - Dependencies are implicitly handled by assuming that any CRTC part
        of &drm_atomic_state is a dependency, and that the current commit
        must wait for any commits to complete on those CRTC. This way
        drivers can easily add more depencies using
        drm_atomic_get_crtc_state(), which is very natural since in most
        case a dependency exists iff there's some bit of state that needs to
        be cross checked.
      
        Removing depencies is not possible, drivers simply need to be
        careful to not include every CRTC in a commit if that's not
        necessary. Which is a good idea anyway, since that also avoids
        ww_mutex lock contention.
      
      - Queue depth > 1 sees some prep work in this patch by adding a stall
        paramater to drm_atomic_helper_swap_states(). To be able to push
        commits entirely free-standing and in a deeper queue through the
        back-end the driver must not access any obj->state pointers. This
        means we need to track the old state in drm_atomic_state (much
        easier with the consolidated arrays), and pass them all explicitly
        to driver backends (this will be serious amounts of churn).
      
        Once that's done stall can be set to false in swap_states.
      
      v2: Dont ask for flip_done signalling when the CRTC is off and stays
      off: Drivers don't handle events in that case. Instead complete right
      away. This way future commits don't need to have special-case logic,
      but can keep blocking for the flip_done completion.
      
      v3: Tons of fixes:
      - Stall for preceeding commit for real, not the current one by
        accident.
      - Add WARN_ON in case drivers don't fire the drm event.
      - Don't double-free drm events.
      
      v4: Make legacy cursor not stall.
      
      v5: Extend the helper hook to cover the entire commit tail. Some
      drivers need special code for cleanup and vblank waiting, this makes
      it a bit more useful. Inspired by the rockchip driver.
      
      v6: Add WARN_ON to catch drivers who forget to send out the
      drm event.
      
      v7: Fixup the stalls in swap_state for real!!
      
      v8:
      - Fixup trailing whitespace, spotted by Maarten.
      - Actually wait for flip_done in cleanup_done, like the comment says
        we should do. Thanks a lot for Tomeu for helping with debugging this
        on.
      
      v9: Now with awesome kerneldoc!
      
      v10: Split out drm_crtc_commit tracking infrastructure.
      
      v:
      - Add missing static (Gustavo).
      - Split out the sync functions, only do the actual nonblocking
        logic in this patch (Maarten).
      
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Tested-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Tested-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Testcase: igt/kms_flip/*
      Testcase: igt/kms_cursor*
      Testcase: igt/kms*plane*
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-10-git-send-email-daniel.vetter@ffwll.ch
      9f2a7950