1. 21 Jun, 2018 6 commits
  2. 20 Jun, 2018 9 commits
    • Chris Wilson's avatar
      drm/i915/selftests: Remove unused dmabuf->kmap routines, fix the build · f55786fa
      Chris Wilson authored
      Fix i915's CI build after the removal of the dmabuf->kmap interface that
      left the mock routines intact.
      
      In file included from drivers/gpu/drm/i915/i915_gem_dmabuf.c:335:0:
      drivers/gpu/drm/i915/selftests/mock_dmabuf.c:104:13: error: ‘mock_dmabuf_kunmap_atomic’ defined but not used [-Werror=unused-function]
       static void mock_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, unsigned long page_num, void *addr)
      drivers/gpu/drm/i915/selftests/mock_dmabuf.c:97:14: error: ‘mock_dmabuf_kmap_atomic’ defined but not used [-Werror=unused-function]
       static void *mock_dmabuf_kmap_atomic(struct dma_buf *dma_buf, unsigned long page_num)
      
      Fixes: f664a526 ("dma-buf: remove kmap_atomic interface")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180620162152.1158-1-chris@chris-wilson.co.ukReviewed-by: default avatarChristian König <christian.koenig@amd.com>
      f55786fa
    • Gustavo Padovan's avatar
      Merge drm-upstream/drm-next into drm-misc-next · d98c71da
      Gustavo Padovan authored
      We got a few conflicts in drm_atomic.c after merging the DRM writeback support,
      now we need a backmerge to unlock develop development on drm-misc-next.
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
      d98c71da
    • Liviu Dudau's avatar
      drm: writeback: Add client capability for exposing writeback connectors · d67b6a20
      Liviu Dudau authored
      Due to the fact that writeback connectors behave in a special way
      in DRM (they always report being disconnected) we might confuse some
      userspace. Add a client capability for writeback connectors that will
      filter them out for clients that don't understand the capability.
      
      Changelog:
       - only accept the capability if the client has already set the
      DRM_CLIENT_CAP_ATOMIC one.
      
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Brian Starkey <brian.starkey@arm.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarBrian Starkey <brian.starkey@arm.com>
      Link: https://patchwork.freedesktop.org/patch/229038/
      d67b6a20
    • Brian Starkey's avatar
      drm: writeback: Add out-fences for writeback connectors · b13cc8dd
      Brian Starkey authored
      Add the WRITEBACK_OUT_FENCE_PTR property to writeback connectors, to
      enable userspace to get a fence which will signal once the writeback is
      complete. It is not allowed to request an out-fence without a
      framebuffer attached to the connector.
      
      A timeline is added to drm_writeback_connector for use by the writeback
      out-fences.
      
      In the case of a commit failure or DRM_MODE_ATOMIC_TEST_ONLY, the fence
      is set to -1.
      
      Changes from v2:
       - Rebase onto Gustavo Padovan's v9 explicit sync series
       - Change out_fence_ptr type to s32 __user *
       - Set *out_fence_ptr to -1 in drm_atomic_connector_set_property
       - Store fence in drm_writeback_job
       Gustavo Padovan:
       - Move out_fence_ptr out of connector_state
       - Signal fence from drm_writeback_signal_completion instead of
         in driver directly
      
      Changes from v3:
       - Rebase onto commit 7e9081c5 ("drm/fence: fix memory overwrite
         when setting out_fence fd") (change out_fence_ptr to s32 __user *,
         for real this time.)
       - Update documentation around WRITEBACK_OUT_FENCE_PTR
      Signed-off-by: default avatarBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: default avatarMihail Atanassov <mihail.atanassov@arm.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/229036/
      b13cc8dd
    • Brian Starkey's avatar
      drm: Add writeback connector type · 935774cd
      Brian Starkey authored
      Writeback connectors represent writeback engines which can write the
      CRTC output to a memory framebuffer. Add a writeback connector type and
      related support functions.
      
      Drivers should initialize a writeback connector with
      drm_writeback_connector_init() which takes care of setting up all the
      writeback-specific details on top of the normal functionality of
      drm_connector_init().
      
      Writeback connectors have a WRITEBACK_FB_ID property, used to set the
      output framebuffer, and a WRITEBACK_PIXEL_FORMATS blob used to expose the
      supported writeback formats to userspace.
      
      When a framebuffer is attached to a writeback connector with the
      WRITEBACK_FB_ID property, it is used only once (for the commit in which
      it was included), and userspace can never read back the value of
      WRITEBACK_FB_ID. WRITEBACK_FB_ID can only be set if the connector is
      attached to a CRTC.
      
      Changes since v1:
       - Added drm_writeback.c + documentation
       - Added helper to initialize writeback connector in one go
       - Added core checks
       - Squashed into a single commit
       - Dropped the client cap
       - Writeback framebuffers are no longer persistent
      
      Changes since v2:
       Daniel Vetter:
       - Subclass drm_connector to drm_writeback_connector
       - Relax check to allow CRTC to be set without an FB
       - Add some writeback_ prefixes
       - Drop PIXEL_FORMATS_SIZE property, as it was unnecessary
       Gustavo Padovan:
       - Add drm_writeback_job to handle writeback signalling centrally
      
      Changes since v3:
       - Rebased
       - Rename PIXEL_FORMATS -> WRITEBACK_PIXEL_FORMATS
      
      Chances since v4:
       - Embed a drm_encoder inside the drm_writeback_connector to
         reduce the amount of boilerplate code required from the drivers
         that are using it.
      
      Changes since v5:
       - Added Rob Clark's atomic_commit() vfunc to connector helper
         funcs, so that writeback jobs are committed from atomic helpers
       - Updated create_writeback_properties() signature to return an
         error code rather than a boolean false for failure.
       - Free writeback job with the connector state rather than when
         doing the cleanup_work()
      
      Changes since v7:
       - fix extraneous use of out_fence that is only introduced in a
         subsequent patch.
      
      Changes since v8:
       - whitespace changes pull from subsequent patch
      
      Changes since v9:
       - Revert the v6 changes that free the writeback job in the connector
         state cleanup and return to doing it in the cleanup_work() function
      Signed-off-by: default avatarBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: default avatarMihail Atanassov <mihail.atanassov@arm.com>
      [rebased and added atomic_commit() vfunc for writeback jobs]
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/229037/
      935774cd
    • Christian König's avatar
      dma-buf: remove kmap_atomic interface · f664a526
      Christian König authored
      Neither used nor correctly implemented anywhere. Just completely remove
      the interface.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/226645/
      f664a526
    • Christian König's avatar
      dma_buf: remove device parameter from attach callback v2 · a19741e5
      Christian König authored
      The device parameter is completely unused because it is available in the
      attachment structure as well.
      
      v2: fix kerneldoc as well
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/226643/
      a19741e5
    • Daniel Vetter's avatar
    • Daniel Vetter's avatar
      drm/gem-fb-helper: Always do implicit sync · 9d54fcd5
      Daniel Vetter authored
      I've done a lot of history digging. The first signs of this
      optimization was introduced in i915:
      
      commit 25067bfc
      Author: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Date:   Wed Sep 10 12:03:17 2014 -0300
      
          drm/i915: pin sprite fb only if it changed
      
      without much justification. Pinning already pinned stuff is real cheap
      (it's just obj->pin_count++ really), and the missing implicit sync was
      entirely forgotten about it seems. It's at least not mentioned
      anywhere it the commit message.
      
      It was also promptly removed shortly afterwards in
      
      commit ea2c67bb
      Author: Matt Roper <matthew.d.roper@intel.com>
      Date:   Tue Dec 23 10:41:52 2014 -0800
      
          drm/i915: Move to atomic plane helpers (v9)
      
      again without really mentioning the side-effect that plane updates
      with the same fb now again obey implicit syncing.
      
      Note that this only ever applied to the plane_update hook, all other
      legacy entry points (set_base, page_flip) always obeyed implicit sync
      in the drm/i915 driver.
      
      The real source of this code here seems to be msm, copied to vc4, then
      copied to tinydrm. I've also tried to dig around in all available msm
      sources, but the corresponding check for fb != old_fb is present ever
      since the initial merge in
      
      commit cf3a7e4c
      Author: Rob Clark <robdclark@gmail.com>
      Date:   Sat Nov 8 13:21:06 2014 -0500
      
          drm/msm: atomic core bits
      
      The only older version I've found of msm atomic code predates the
      atomic helpers, and so didn't even use any of this. It also does not
      have a corresponding check (because it simply did no implicit sync at
      all).
      
      I've chatted with Rob on irc, and he didn't remember the reason for
      this either.
      
      Note we had epic amounts of fun with too much syncing against
      _vblank_, especially around cursor updates. But I don't ever
      discussing a need for less syncing against implicit fences.
      
      Also note that explicit fencing allows you to sidetrack all of this,
      at least for all the drivers correctly implemented using
      drm_atomic_set_fence_for_plane().
      
      Given that it seems to be an accident of history, and that big drivers
      like i915 (and also nouveau it seems, I didn't follow the
      amdgpu/radeon sync code to figure this out properly there) never have
      done it, let's remove this.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: "Noralf Trønnes" <noralf@tronnes.org>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180405154449.23038-8-daniel.vetter@ffwll.ch
      9d54fcd5
  3. 18 Jun, 2018 3 commits
  4. 16 Jun, 2018 2 commits
  5. 15 Jun, 2018 4 commits
  6. 14 Jun, 2018 2 commits
  7. 13 Jun, 2018 13 commits
  8. 11 Jun, 2018 1 commit