1. 28 2月, 2017 1 次提交
  2. 27 2月, 2017 1 次提交
    • M
      drm: Add a new connector atomic property for link status · 40ee6fbe
      Manasi Navare 提交于
      At the time userspace does setcrtc, we've already promised the mode
      would work. The promise is based on the theoretical capabilities of
      the link, but it's possible we can't reach this in practice. The DP
      spec describes how the link should be reduced, but we can't reduce
      the link below the requirements of the mode. Black screen follows.
      
      One idea would be to have setcrtc return a failure. However, it
      already should not fail as the atomic checks have passed. It would
      also conflict with the idea of making setcrtc asynchronous in the
      future, returning before the actual mode setting and link training.
      
      Another idea is to train the link "upfront" at hotplug time, before
      pruning the mode list, so that we can do the pruning based on
      practical not theoretical capabilities. However, the changes for link
      training are pretty drastic, all for the sake of error handling and
      DP compliance, when the most common happy day scenario is the current
      approach of link training at mode setting time, using the optimal
      parameters for the mode. It is also not certain all hardware could do
      this without the pipe on; not even all our hardware can do this. Some
      of this can be solved, but not trivially.
      
      Both of the above ideas also fail to address link degradation *during*
      operation.
      
      The solution is to add a new "link-status" connector property in order
      to address link training failure in a way that:
      a) changes the current happy day scenario as little as possible, to
      avoid regressions, b) can be implemented the same way by all drm
      drivers, c) is still opt-in for the drivers and userspace, and opting
      out doesn't regress the user experience, d) doesn't prevent drivers
      from implementing better or alternate approaches, possibly without
      userspace involvement. And, of course, handles all the issues presented.
      In the usual happy day scenario, this is always "good". If something
      fails during or after a mode set, the kernel driver can set the link
      status to "bad" and issue a hotplug uevent for userspace to have it
      re-check the valid modes through GET_CONNECTOR IOCTL, and try modeset
      again. If the theoretical capabilities of the link can't be reached,
      the mode list is trimmed based on that.
      
      v7 by Jani:
      * Rebase, simplify set property while at it, checkpatch fix
      v6:
      * Fix a typo in kernel doc (Sean Paul)
      v5:
      * Clarify doc for silent rejection of atomic properties by driver (Daniel Vetter)
      v4:
      * Add comments in kernel-doc format (Daniel Vetter)
      * Update the kernel-doc for link-status (Sean Paul)
      v3:
      * Fixed a build error (Jani Saarinen)
      v2:
      * Removed connector->link_status (Daniel Vetter)
      * Set connector->state->link_status in drm_mode_connector_set_link_status_property
      (Daniel Vetter)
      * Set the connector_changed flag to true if connector->state->link_status changed.
      * Reset link_status to GOOD in update_output_state (Daniel Vetter)
      * Never allow userspace to set link status from Good To Bad (Daniel Vetter)
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: NTony Cheng <tony.cheng@amd.com>
      Acked-by: NHarry Wentland <harry.wentland@amd.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Sean Paul <seanpaul@chromium.org>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: Eric Anholt <eric@anholt.net> (for the -modesetting patch)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/0182487051aa9f1594820e35a4853de2f8747b4e.1481883920.git.jani.nikula@intel.com
      40ee6fbe
  3. 15 2月, 2017 2 次提交
  4. 12 2月, 2017 1 次提交
  5. 08 2月, 2017 1 次提交
  6. 04 2月, 2017 1 次提交
  7. 01 2月, 2017 1 次提交
  8. 26 1月, 2017 1 次提交
  9. 25 1月, 2017 1 次提交
  10. 23 1月, 2017 1 次提交
  11. 12 1月, 2017 1 次提交
  12. 04 1月, 2017 2 次提交
  13. 30 12月, 2016 2 次提交
  14. 20 12月, 2016 1 次提交
  15. 19 12月, 2016 3 次提交
  16. 18 12月, 2016 1 次提交
  17. 08 12月, 2016 1 次提交
  18. 07 12月, 2016 1 次提交
  19. 06 12月, 2016 1 次提交
  20. 22 11月, 2016 1 次提交
  21. 16 11月, 2016 1 次提交
    • G
      drm/fence: add in-fences support · 96260142
      Gustavo Padovan 提交于
      There is now a new property called IN_FENCE_FD attached to every plane
      state that receives sync_file fds from userspace via the atomic commit
      IOCTL.
      
      The fd is then translated to a fence (that may be a fence_array
      subclass or just a normal fence) and then used by DRM to fence_wait() for
      all fences in the sync_file to signal. So it only commits when all
      framebuffers are ready to scanout.
      
      v2: Comments by Daniel Vetter:
      	- remove set state->fence = NULL in destroy phase
      	- accept fence -1 as valid and just return 0
      	- do not call fence_get() - sync_file_fences_get() already calls it
      	- fence_put() if state->fence is already set, in case userspace
      	set the property more than once.
      
      v3: WARN_ON if fence is set but state has no FB
      
      v4: Comment from Maarten Lankhorst
      	- allow set fence with no related fb
      
      v5: rename FENCE_FD to IN_FENCE_FD
      
      v6: Comments by Daniel Vetter:
      	- rename plane_state->in_fence back to "fence"
      	- re-introduce WARN_ON if fence set but no fb
      
           - rebase after fence -> dma_fence rename
      
      v7: Comments by Brian Starkey
      	- set state->fence to NULL when duplicating the state
      	- fail if IN_FENCE_FD was already set
      
      v8: rebase against latest drm-misc
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Reviewed-by: NBrian Starkey <brian.starkey@arm.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Tested-by: NRobert Foss <robert.foss@collabora.com>
      [danvet: Rebase onto extracted drm_mode_config.[hc].]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      96260142
  22. 27 10月, 2016 1 次提交
  23. 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
  24. 22 10月, 2016 1 次提交
  25. 17 10月, 2016 2 次提交
  26. 19 9月, 2016 1 次提交
  27. 13 9月, 2016 1 次提交
  28. 29 8月, 2016 3 次提交
  29. 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
  30. 09 8月, 2016 1 次提交
  31. 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