1. 12 1月, 2018 1 次提交
  2. 25 10月, 2017 1 次提交
    • K
      drm: Add four ioctls for managing drm mode object leases [v7] · 62884cd3
      Keith Packard 提交于
      drm_mode_create_lease
      
      	Creates a lease for a list of drm mode objects, returning an
      	fd for the new drm_master and a 64-bit identifier for the lessee
      
      drm_mode_list_lesees
      
      	List the identifiers of the lessees for a master file
      
      drm_mode_get_lease
      
      	List the leased objects for a master file
      
      drm_mode_revoke_lease
      
      	Erase the set of objects managed by a lease.
      
      This should suffice to at least create and query leases.
      
      Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:
      
       * query ioctls only query the master associated with
         the provided file.
      
       * 'mask_lease' value has been removed
      
       * change ioctl has been removed.
      
      Changes for v3 suggested in part by Dave Airlie <airlied@gmail.com>
      
       * Add revoke ioctl.
      
      Changes for v4 suggested by Dave Airlie <airlied@gmail.com>
      
       * Expand on the comment about the magic use of &drm_lease_idr_object
       * Pad lease ioctl structures to align on 64-bit boundaries
      
      Changes for v5 suggested by Dave Airlie <airlied@gmail.com>
      
       * Check for non-negative object_id in create_lease to avoid debug
         output from the kernel.
      
      Changes for v6 provided by Dave Airlie <airlied@gmail.com>
      
       * For non-universal planes add primary/cursor planes to lease
      
         If we aren't exposing universal planes to this userspace client,
         and it requests a lease on a crtc, we should implicitly export the
         primary and cursor planes for the crtc.
      
         If the lessee doesn't request universal planes, it will just see
         the crtc, but if it does request them it will then see the plane
         objects as well.
      
         This also moves the object look ups earlier as a side effect, so
         we'd exit the ioctl quicker for non-existant objects.
      
       * Restrict leases to crtc/connector/planes.
      
         This only allows leasing for objects we wish to allow.
      
      Changes for v7 provided by Dave Airlie <airlied@gmail.com>
      
       * Check pad args are 0
       * Check create flags and object count are valid.
       * Check return from fd allocation
       * Refactor lease idr setup and add some simple validation
       * Use idr_mutex uniformly (Keith)
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      62884cd3
  3. 23 10月, 2017 1 次提交
    • K
      drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3] · 3064abfa
      Keith Packard 提交于
      These provide crtc-id based functions instead of pipe-number, while
      also offering higher resolution time (ns) and wider frame count (64)
      as required by the Vulkan API.
      
      v2:
      
       * Check for DRIVER_MODESET in new crtc-based vblank ioctls
      
      	Failing to check this will oops the driver.
      
       * Ensure vblank interupt is running in crtc_get_sequence ioctl
      
      	The sequence and timing values are not correct while the
      	interrupt is off, so make sure it's running before asking for
      	them.
      
       * Short-circuit get_sequence if the counter is enabled and accurate
      
      	Steal the idea from the code in wait_vblank to avoid the
      	expense of drm_vblank_get/put
      
       * Return active state of crtc in crtc_get_sequence ioctl
      
      	Might be useful for applications that aren't in charge of
      	modesetting?
      
       * Use drm_crtc_vblank_get/put in new crtc-based vblank sequence ioctls
      
      	Daniel Vetter prefers these over the old drm_vblank_put/get
      	APIs.
      
       * Return s64 ns instead of u64 in new sequence event
      Suggested-by: NDaniel Vetter <daniel@ffwll.ch>
      Suggested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      
      v3:
      
       * Removed FIRST_PIXEL_OUT_FLAG
       * Document that the timestamp in the query and event are
         that of the first pixel leaving the display engine for
         the display (using the same wording as the Vulkan spec).
      Suggested-by: NMichel Dänzer <michel@daenzer.net>
      Acked-by: NDave Airlie <airlied@redhat.com>
      
      [airlied: left->leaves (Michel)]
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3064abfa
  4. 13 10月, 2017 1 次提交
  5. 29 8月, 2017 3 次提交
    • J
      drm/syncobj: Add a signal ioctl (v3) · ffa9443f
      Jason Ekstrand 提交于
      This IOCTL provides a mechanism for userspace to trigger a sync object
      directly.  There are other ways that userspace can trigger a syncobj
      such as submitting a dummy batch somewhere or hanging on to a triggered
      sync_file and doing an import.  This just provides an easy way to
      manually trigger the sync object without weird hacks.
      
      The motivation for this IOCTL is Vulkan fences.  Vulkan lets you create
      a fence already in the signaled state so that you can wait on it
      immediatly without stalling.  We could also handle this with a new
      create flag to ask the driver to create a syncobj that is already
      signaled but the IOCTL seemed a bit cleaner and more generic.
      
      v2:
       - Take an array of sync objects (Dave Airlie)
      v3:
       - Throw -EINVAL if pad != 0
      Signed-off-by: NJason Ekstrand <jason@jlekstrand.net>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ffa9443f
    • J
      drm/syncobj: Add a reset ioctl (v3) · aa4035d2
      Jason Ekstrand 提交于
      This just resets the dma_fence to NULL so it looks like it's never been
      signaled.  This will be useful once we add the new wait API for allowing
      wait on "submit and signal" behavior.
      
      v2:
       - Take an array of sync objects (Dave Airlie)
      v3:
       - Throw -EINVAL if pad != 0
      Signed-off-by: NJason Ekstrand <jason@jlekstrand.net>
      Reviewed-by: Christian König <christian.koenig@amd.com> (v1)
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      aa4035d2
    • D
      drm/syncobj: add sync obj wait interface. (v8) · 5e60a10e
      Dave Airlie 提交于
      This interface will allow sync object to be used to back
      Vulkan fences. This API is pretty much the vulkan fence waiting
      API, and I've ported the code from amdgpu.
      
      v2: accept relative timeout, pass remaining time back
      to userspace.
      v3: return to absolute timeouts.
      v4: absolute zero = poll,
          rewrite any/all code to have same operation for arrays
          return -EINVAL for 0 fences.
      v4.1: fixup fences allocation check, use u64_to_user_ptr
      v5: move to sec/nsec, and use timespec64 for calcs.
      v6: use -ETIME and drop the out status flag. (-ETIME
      is suggested by ickle, I can feel a shed painting)
      v7: talked to Daniel/Arnd, use ktime and ns everywhere.
      v8: be more careful in the timeout calculations
          use uint32_t for counter variables so we don't overflow
          graciously handle -ENOINT being returned from dma_fence_wait_timeout
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NJason Ekstrand <jason@jlekstrand.net>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5e60a10e
  6. 11 8月, 2017 1 次提交
  7. 05 7月, 2017 1 次提交
  8. 21 6月, 2017 1 次提交
  9. 20 6月, 2017 3 次提交
  10. 14 6月, 2017 1 次提交
    • D
      drm: introduce sync objects (v4) · e9083420
      Dave Airlie 提交于
      Sync objects are new toplevel drm object, that contain a
      pointer to a fence. This fence can be updated via command
      submission ioctls via drivers.
      
      There is also a generic wait obj API modelled on the vulkan
      wait API (with code modelled on some amdgpu code).
      
      These objects can be converted to an opaque fd that can be
      passes between processes.
      
      v2: rename reference/unreference to put/get (Chris)
      fix leaked reference (David Zhou)
      drop mutex in favour of cmpxchg (Chris)
      v3: cleanups from danvet, rebase on drm_fops rename
      check fd_flags is 0 in ioctls.
      v4: export find/free, change replace fence to take a
      syncobj. In order to support lookup first, replace
      later semantics which seem in the end to be cleaner.
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e9083420
  11. 28 5月, 2017 4 次提交
  12. 05 4月, 2017 2 次提交
  13. 26 3月, 2017 1 次提交
  14. 30 12月, 2016 2 次提交
  15. 18 12月, 2016 1 次提交
  16. 13 12月, 2016 3 次提交
  17. 08 12月, 2016 1 次提交
  18. 06 12月, 2016 1 次提交
  19. 30 11月, 2016 1 次提交
  20. 19 9月, 2016 1 次提交
    • D
      drm: drop obsolete drm_core.h · 82d5e73f
      David Herrmann 提交于
      The drm_core.h header contains a set of constants meant to be used
      throughout DRM. However, as it turns out, they're each used just once and
      don't bring any benefit. They're also grossly mis-named and lack
      name-spacing. This patch inlines them, or moves them into drm_internal.h
      as appropriate:
      
       - CORE_AUTHOR and CORE_DESC are inlined into corresponding MODULE_*()
         macros. It's just confusing having to follow 2 pointers when trying to
         find the definition of these fields. Grep'ping for MODULE_AUTHOR()
         should reveal the full information, if there's no strong reason not to.
      
       - CORE_NAME, CORE_DATE, CORE_MAJOR, CORE_MINOR, and CORE_PATCHLEVEL are
         inlined into the sysfs 'version' attribute. They're stripped
         everywhere else (which is just some printk() statements). CORE_NAME
         just doesn't make *any* sense, as we hard-code it in many places,
         anyway. The other constants are outdated and just serve
         binary-compatibility purposes. Hence, inline them in 'version' sysfs
         attribute (we might even try dropping it..).
      
       - DRM_IF_MAJOR and DRM_IF_MINOR are moved into drm_internal.h as they're
         only used by the global ioctl handlers. Furthermore, versioning
         interfaces breaks backports and as such is deprecated, anyway. We just
         keep them for historic reasons. I doubt anyone will ever modify them
         again.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160901124837.680-6-dh.herrmann@gmail.com
      82d5e73f
  21. 25 8月, 2016 1 次提交
  22. 11 8月, 2016 1 次提交
  23. 08 8月, 2016 1 次提交
  24. 14 7月, 2016 1 次提交
  25. 30 6月, 2016 1 次提交
  26. 22 6月, 2016 4 次提交