1. 05 6月, 2014 1 次提交
    • R
      drm: convert crtc and connection_mutex to ww_mutex (v5) · 51fd371b
      Rob Clark 提交于
      For atomic, it will be quite necessary to not need to care so much
      about locking order.  And 'state' gives us a convenient place to stash a
      ww_ctx for any sort of update that needs to grab multiple crtc locks.
      
      Because we will want to eventually make locking even more fine grained
      (giving locks to planes, connectors, etc), split out drm_modeset_lock
      and drm_modeset_acquire_ctx to track acquired locks.
      
      Atomic will use this to keep track of which locks have been acquired
      in a transaction.
      
      v1: original
      v2: remove a few things not needed until atomic, for now
      v3: update for v3 of connection_mutex patch..
      v4: squash in docbook
      v5: doc tweaks/fixes
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      51fd371b
  2. 27 5月, 2014 1 次提交
    • S
      Documentation: drm: describing drm properties exposed by various drivers · 6c6a3996
      Sagar Kamble 提交于
      Started documenting drm properties for drm drivers. This patch provides
      information about properties in drm, i915, psb and cdv/gma-500. Information
      about other properties can be added on top of these.
      
      v2: Added description of drm properties in armada, exynos, i2c/ch7006, noveau,
      omap, qxl, radeon, rcar-du
      
      v3: Removed "Property Object" column since it is implementation related. Property
      type column refined.[Ville's review comments]
      
      v4: Removed whitespace warnings and minor nits. [Randy's review comments]
      
      v5: Restructured output for ENUM properties
      
      v6: Review comments on formatting the table. [Laurent's review comments]
      
      v7: Minor restructuring. [Laurent's review comments]
      
      Cc: Rob Landley <rob@landley.net>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Sagar Kamble <sagar.a.kamble@intel.com>
      Cc: "Purushothaman, Vijay A" <vijay.a.purushothaman@intel.com>
      Cc: linux-doc@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: NSagar Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      6c6a3996
  3. 26 5月, 2014 1 次提交
  4. 22 5月, 2014 2 次提交
  5. 21 5月, 2014 2 次提交
  6. 05 5月, 2014 1 次提交
  7. 23 4月, 2014 1 次提交
  8. 22 4月, 2014 1 次提交
    • A
      drm: make mode_valid callback optional · f9b0e251
      Andrzej Hajda 提交于
      Many drm connectors do not need mode validation.
      The patch makes this callback optional and removes dumb implementations.
      
      v2: Rebase:
      - imx move to a shared (but still dummy) ->mode_valid implementation.
      - probe helpers have been extracted to drm_probe_helper.c
      
      Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f9b0e251
  9. 18 4月, 2014 1 次提交
    • D
      drm: Split out drm_probe_helper.c from drm_crtc_helper.c · 8d754544
      Daniel Vetter 提交于
      This is leftover stuff from my previous doc round which I kinda wanted
      to do but didn't yet due to rebase hell.
      
      The modeset helpers and the probing helpers a independent and e.g.
      i915 uses the probing stuff but has its own modeset infrastructure. It
      hence makes to split this up. While at it add a DOC: comment for the
      probing libraray.
      
      It would be rather neat to pull some of the DocBook documenting these
      two helpers into in-line DOC: comments. But unfortunately kerneldoc
      doesn't support markdown or something similar to make nice-looking
      documentation, so the current state is better.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8d754544
  10. 02 4月, 2014 1 次提交
  11. 13 3月, 2014 18 次提交
  12. 30 8月, 2013 1 次提交
    • D
      drm: implement experimental render nodes · 1793126f
      David Herrmann 提交于
      Render nodes provide an API for userspace to use non-privileged GPU
      commands without any running DRM-Master. It is useful for offscreen
      rendering, GPGPU clients, and normal render clients which do not perform
      modesetting.
      
      Compared to legacy clients, render clients no longer need any
      authentication to perform client ioctls. Instead, user-space controls
      render/client access to GPUs via filesystem access-modes on the
      render-node. Once a render-node was opened, a client has full access to
      the client/render operations on the GPU. However, no modesetting or ioctls
      that affect global state are allowed on render nodes.
      
      To prevent privilege-escalation, drivers must explicitly state that they
      support render nodes. They must mark their render-only ioctls as
      DRM_RENDER_ALLOW so render clients can use them. Furthermore, they must
      support clients without any attached master.
      
      If filesystem access-modes are not enough for fine-grained access control
      to render nodes (very unlikely, considering the versaitlity of FS-ACLs),
      you may still fall-back to fd-passing from server to client (which allows
      arbitrary access-control). However, note that revoking access is
      currently impossible and unlikely to get implemented.
      
      Note: Render clients no longer have any associated DRM-Master as they are
      supposed to be independent of any server state. DRM core highly depends on
      file_priv->master to be non-NULL for modesetting/ctx/etc. commands.
      Therefore, drivers must be very careful to not require DRM-Master if they
      support DRIVER_RENDER.
      
      So far render-nodes are protected by "drm_rnodes". As long as this
      module-parameter is not set to 1, a driver will not create render nodes.
      This allows us to experiment with the API a bit before we stabilize it.
      
      v2: drop insecure GEM_FLINK to force use of dmabuf
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      1793126f
  13. 19 8月, 2013 4 次提交
    • D
      drm: don't call ->firstopen for KMS drivers · 7d14bb6b
      Daniel Vetter 提交于
      It has way too much potential for driver writers to do stupid things
      like delayed hw setup because the load sequence is somehow racy (e.g.
      the imx driver in staging). So don't call it for modesetting drivers,
      which reduces the complexity of the drm core -> driver interface a
      notch.
      
      v2: Don't forget to update DocBook.
      
      v3: Go with Laurent's slightly more elaborate proposal for the DocBook
      update. Add a few words on top of his diff to elaborate a bit on what
      KMS drivers should and shouldn't do in lastclose. There was already a
      paragraph present talking about restoring properties, I've simply
      extended that one.
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      7d14bb6b
    • D
      drm/docs: rip out removed driver flags documentation · 2ba5f7d5
      Daniel Vetter 提交于
      I've forgotten this and shuffling all the little pieces into the
      respective patches is rather cumbersome ...
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      2ba5f7d5
    • R
      drm: add flip-work helper · cabaafc7
      Rob Clark 提交于
      A small helper to queue up work to do, from workqueue context, after a
      flip.  Typically useful to defer unreffing buffers that may be read by
      the display controller until vblank.
      
      v1: original
      v2: wire up docbook + couple docbook fixes
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      cabaafc7
    • D
      drm: remove FASYNC support · b0e898ac
      Daniel Vetter 提交于
      So I've stumbled over drm_fasync and wondered what it does. Digging
      that up is quite a story.
      
      First I've had to read up on what this does and ended up being rather
      bewildered why peopled loved signals so much back in the days that
      they've created SIGIO just for that ...
      
      Then I wondered how this ever works, and what that strange "No-op."
      comment right above it should mean. After all calling the core fasync
      helper is pretty obviously not a noop. After reading through the
      kernels FASYNC implementation I've noticed that signals are only sent
      out to the processes attached with FASYNC by calling kill_fasync.
      
      No merged drm driver has ever done that.
      
      After more digging I've found out that the only driver that ever used
      this is the so called GAMMA driver. I've frankly never heard of such a
      gpu brand ever before. Now FASYNC seems to not have been the only bad
      thing with that driver, since Dave Airlie removed it from the drm
      driver with prejudice:
      
      commit 1430163b4bbf7b00367ea1066c1c5fe85dbeefed
      Author: Dave Airlie <airlied@linux.ie>
      Date:   Sun Aug 29 12:04:35 2004 +0000
      
          Drop GAMMA DRM from a great height ...
      
      Long story short, the drm fasync support seems to be doing absolutely
      nothing. And the only user of it was never merged into the upstream
      kernel. And we don't need any fops->fasync callback since the fcntl
      implementation in the kernel already implements the noop case
      correctly.
      
      So stop this particular cargo-cult and rip it all out.
      
      v2: Kill drm_fasync assignments in rcar (newly added) and imx drivers
      (somehow I've missed that one in staging). Also drop the reference in
      the drm DocBook. ARM compile-fail reported by Rob Clark.
      
      v3: Move the removal of dev->buf_asnyc assignment in drm_setup to this
      patch here.
      
      v4: Actually git add ... tsk.
      
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      b0e898ac
  14. 25 7月, 2013 1 次提交
    • D
      drm: add unified vma offset manager · fe3078fa
      David Herrmann 提交于
      If we want to map GPU memory into user-space, we need to linearize the
      addresses to not confuse mm-core. Currently, GEM and TTM both implement
      their own offset-managers to assign a pgoff to each object for user-space
      CPU access. GEM uses a hash-table, TTM uses an rbtree.
      
      This patch provides a unified implementation that can be used to replace
      both. TTM allows partial mmaps with a given offset, so we cannot use
      hashtables as the start address may not be known at mmap time. Hence, we
      use the rbtree-implementation of TTM.
      
      We could easily update drm_mm to use an rbtree instead of a linked list
      for it's object list and thus drop the rbtree from the vma-manager.
      However, this would slow down drm_mm object allocation for all other
      use-cases (rbtree insertion) and add another 4-8 bytes to each mm node.
      Hence, use the separate tree but allow for later migration.
      
      This is a rewrite of the 2012-proposal by David Airlie <airlied@linux.ie>
      
      v2:
       - fix Docbook integration
       - drop drm_mm_node_linked() and use drm_mm_node_allocated()
       - remove unjustified likely/unlikely usage (but keep for rbtree paths)
       - remove BUG_ON() as drm_mm already does that
       - clarify page-based vs. byte-based addresses
       - use drm_vma_node_reset() for initialization, too
      v4:
       - allow external locking via drm_vma_offset_un/lock_lookup()
       - add locked lookup helper drm_vma_offset_lookup_locked()
      v5:
       - fix drm_vma_offset_lookup() to correctly validate range-mismatches
         (fix (offset > start + pages))
       - fix drm_vma_offset_exact_lookup() to actually do what it says
       - remove redundant vm_pages member (add drm_vma_node_size() helper)
       - remove unneeded goto
       - fix documentation
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@gmail.com>
      fe3078fa
  15. 28 6月, 2013 3 次提交
  16. 28 5月, 2013 1 次提交