1. 06 4月, 2017 1 次提交
  2. 29 3月, 2017 4 次提交
  3. 27 3月, 2017 1 次提交
  4. 06 3月, 2017 1 次提交
  5. 15 2月, 2017 1 次提交
  6. 25 1月, 2017 1 次提交
  7. 12 1月, 2017 1 次提交
  8. 20 12月, 2016 1 次提交
  9. 13 9月, 2016 1 次提交
  10. 29 8月, 2016 2 次提交
  11. 16 8月, 2016 1 次提交
  12. 10 6月, 2016 4 次提交
    • L
      drm: Fix comment making reference to non-existing function · 5c0be3f1
      Liviu Dudau 提交于
      Documentation for drm_atomic_crtc_for_each_plane() makes reference to
      a function called drm_crtc_for_each_pending_plane(). I've guessed that
      the actual function name is drm_atomic_crtc_state_for_each_plane() as
      that matches best the intent of the comment.
      Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465571005-3877-1-git-send-email-Liviu.Dudau@arm.com
      5c0be3f1
    • 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. 07 6月, 2016 1 次提交
  14. 02 6月, 2016 1 次提交
  15. 17 5月, 2016 3 次提交
  16. 12 5月, 2016 1 次提交
  17. 02 5月, 2016 1 次提交
  18. 31 3月, 2016 1 次提交
  19. 08 3月, 2016 1 次提交
  20. 20 1月, 2016 1 次提交
  21. 05 1月, 2016 1 次提交
  22. 03 12月, 2015 1 次提交
  23. 30 11月, 2015 1 次提交
  24. 17 9月, 2015 1 次提交
  25. 08 9月, 2015 2 次提交
    • T
      drm/atomic-helper: Implement drm_atomic_helper_duplicate_state() · 397fd77c
      Thierry Reding 提交于
      This function can be used to duplicate an atomic state object. This is
      useful for example to implement suspend/resume, where the state before
      suspend can be saved and restored upon resume.
      
      v2: move locking to caller, be more explicit about prerequisites
      v3: explicitly pass lock acquisition context, improve kerneldoc
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      397fd77c
    • D
      drm/atomic-helper: Add option to update planes only on active crtc · aef9dbb8
      Daniel Vetter 提交于
      With drivers supporting runtime pm it's generally not a good idea to
      touch the hardware when it's off. Add an option to the commit_planes
      helper to support this case.
      
      Note that the helpers already add all planes on a crtc when a modeset
      happens, hence plane updates will not be lost if drivers set this to
      true.
      
      v2: Check for NULL state->crtc before chasing the pointer. Also check
      both old and new crtc if there's a switch. Finally just outright
      disallow switching crtcs for a plane if the plane is in active use, on
      most hardware that doesn't make sense.
      
      v3: Since commit_planes(active_only = true) is for enabling things
      only after all the crtc are on we should only look at the new crtc to
      decide whether to call the plane hooks - if the current CRTC isn't on
      then skip. If the old crtc (when moving a plane) went down then the
      plane should have been disabled as part of the pipe shutdown work
      already. For which there's currently no helper really unfortunately.
      Also move the check for wether a plane gets a new CRTC assigned while
      still in active use out of this patch.
      
      v4: Rebase over exynos changes.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Tested-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      aef9dbb8
  26. 27 7月, 2015 1 次提交
  27. 21 5月, 2015 1 次提交
  28. 13 5月, 2015 1 次提交
  29. 03 4月, 2015 1 次提交
    • T
      drm/atomic: Add helpers for state-subclassing drivers · f5e7840b
      Thierry Reding 提交于
      Drivers that subclass CRTC, plane or connector state need to carefully
      duplicate the code that the atomic helpers have. This is bound to cause
      breakage eventually because it requires auditing all drivers and update
      them when code is added to the helpers.
      
      In order to avoid that, implement new helpers that perform the required
      steps when copying and destroying state. These new helpers are exported
      so that state-subclassing drivers can use them. The default helpers are
      implemented using them as well, providing a single location that needs
      to be changed when adding to base atomic states.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      f5e7840b
  30. 24 2月, 2015 1 次提交