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 2 次提交
  4. 19 9月, 2016 1 次提交
  5. 13 9月, 2016 1 次提交
  6. 29 8月, 2016 3 次提交
  7. 17 8月, 2016 1 次提交
    • D
      drm/doc: Include new drm_blend.c · 52a9fcda
      Daniel Vetter 提交于
      There's not much point in kerneldoc if it's not included:
      - It won't show up in the pretty html pages.
      - The comments itself won't get parsed, which means 0day won't pick up
        changes, resulting in stale docs fast.
      
      Also, uapi really should be core, not helpers, so move drm_blend.c to
      that. That also means that the zpos normilize function loses it's
      helper status (and we might as well call it always). For that,
      EXPORT_SYMBOL. Just spotted while integrating docs and noticing that
      one was missing.
      
      With sphinx there's really no excuse any more to not build the docs
      and make sure it's all nice!
      
      $ make DOCBOOKS="" htmldocs
      
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-15-git-send-email-daniel.vetter@ffwll.ch
      52a9fcda
  8. 09 8月, 2016 1 次提交
  9. 08 8月, 2016 2 次提交
    • P
      drm/atomic-helper: Add atomic_mode_set helper callback · fe4a11c9
      Philipp Zabel 提交于
      Some encoders need more information from crtc and connector state or
      connector display info than just the mode during mode setting. This
      patch adds an atomic encoder mode setting variant that passes the crtc
      state (which contains the modes) and the connector state.
      
      atomic_enable/disable variants that additionally pass crtc and connector
      state don't seem to be necessary for any current driver. mode_fixup
      already has an atomic equivalent in atomic_check.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fe4a11c9
    • K
      drm: Don't prepare or cleanup unchanging frame buffers [v3] · fcc60b41
      Keith Packard 提交于
      When reconfiguring a plane position (as in moving the cursor), the
      frame buffer for the cursor isn't changing, so don't call the prepare
      or cleanup driver functions.
      
      This avoids making cursor position updates block on all pending rendering.
      
      v3: use drm_atomic_helper_framebuffer_changed in both prepare and
          cleanup phases instead of keeping state in the plane.
      
      cc: dri-devel@lists.freedesktop.org
      cc: David Airlie <airlied@linux.ie>
      cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      [danvet: Rebase onto 4.8]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fcc60b41
  10. 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
  11. 15 6月, 2016 2 次提交
  12. 10 6月, 2016 3 次提交
    • 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
    • D
      drm/atomic-helper: roll out commit synchronization · a095caa7
      Daniel Vetter 提交于
      To facilitate easier reviewing this is split out from the overall
      nonblocking commit rework. It just rolls out the helper functions
      and uses them in the main drm_atomic_helper_commit() function
      to make it clear where in the flow they're used.
      
      The next patch will actually split drm_atomic_helper_commit() into
      2 pieces, with the tail being run asynchronously from a worker.
      
      v2: Improve kerneldocs (Maarten).
      
      v3: Don't convert ERESTARTSYS to EINTR (Maarten). Also don't fail if
      the wait succeed in stall_check - we need to convert that case (it
      returns the remaining jiffies) to 0 for success.
      
      v4: Switch to long for wait_for_completion_timeout return value
      everywhere (Maarten).
      
      v5: Fix miscaped function in kerneldoc (Maarten).
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      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>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465398936-22305-1-git-send-email-daniel.vetter@ffwll.ch
      a095caa7
    • D
      drm/atomic-helper: Massage swap_state signature somewhat · 5e84c269
      Daniel Vetter 提交于
      - dev is redundant, we have state->atomic
      - add stall parameter, which must be set when swapping needs to stall
        for preceeding commits to stop looking at ->state pointers. Currently
        all drivers need this to be, just prep work for a glorious future.
      
      v2: Rebased on top of
      
      commit e7cf0963
      Author: Gerd Hoffmann <kraxel@redhat.com>
      Date:   Tue May 31 08:50:47 2016 +0200
      
          virtio-gpu: add atomic_commit function
      
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465509992-19284-1-git-send-email-daniel.vetter@ffwll.ch
      Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-2-git-send-email-daniel.vetter@ffwll.ch
      5e84c269
  13. 09 6月, 2016 1 次提交
  14. 07 6月, 2016 2 次提交
  15. 04 6月, 2016 1 次提交
  16. 02 6月, 2016 6 次提交
  17. 30 5月, 2016 1 次提交
  18. 17 5月, 2016 3 次提交
  19. 12 5月, 2016 2 次提交
  20. 10 5月, 2016 1 次提交
  21. 05 5月, 2016 1 次提交
  22. 02 5月, 2016 2 次提交
  23. 27 4月, 2016 1 次提交