1. 05 2月, 2014 1 次提交
  2. 17 1月, 2014 3 次提交
  3. 09 12月, 2013 1 次提交
  4. 06 11月, 2013 1 次提交
  5. 21 1月, 2013 4 次提交
    • D
      drm/vmwgfx: add proper framebuffer refcounting · 2fd5eaba
      Daniel Vetter 提交于
      Afact vmwgfx already has all the right refcounting implemented on the
      backing storage, and we only need to ensure that the drm fb doesn't
      disappear untimely. So holding onto the fb reference from _lookup
      until vmw_kms_present has completed should be enough.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2fd5eaba
    • D
      drm: create drm_framebuffer_lookup · 786b99ed
      Daniel Vetter 提交于
      And replace all fb lookups with it. Also add a WARN to
      drm_mode_object_find since that is now no longer the blessed interface
      to look up an fb. And add kerneldoc to both functions.
      
      This only updates all callsites, but immediately drops the acquired
      refence again. Hence all callers still rely on the fact that a mode fb
      can't disappear while they're holding the struct mutex. Subsequent
      patches will instate proper use of refcounts, and then rework the rmfb
      and unref code to no longer serialize fb destruction with the
      mode_config lock. We don't want that since otherwise a compositor
      might end up stalling for a few frames in rmfb.
      
      v2: Don't use kref_get_unless_zero - Greg KH doesn't like that kind of
      interface.
      Reviewed-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      786b99ed
    • D
      drm: revamp locking around fb creation/destruction · 4b096ac1
      Daniel Vetter 提交于
      Well, at least step 1. The goal here is that framebuffer objects can
      survive outside of the mode_config lock, with just a reference held
      as protection. The first step to get there is to introduce a special
      fb_lock which protects fb lookup, creation and destruction, to make
      them appear atomic.
      
      This new fb_lock can nest within the mode_config lock. But the idea is
      (once the reference counting part is completed) that we only quickly
      take that fb_lock to lookup a framebuffer and grab a reference,
      without any other locks involved.
      
      vmwgfx is the only driver which does framebuffer lookups itself, also
      wrap those calls to drm_mode_object_find with the new lock.
      
      Also protect the fb_list walking in i915 and omapdrm with the new lock.
      
      As a slight complication there's also the list of user-created fbs
      attached to the file private. The problem now is that at fclose() time
      we need to walk that list, eventually do a modeset call to remove the
      fb from active usage (and are required to be able to take the
      mode_config lock), but in the end we need to grab the new fb_lock to
      remove the fb from the list. The easiest solution is to add another
      mutex to protect this per-file list.
      
      Currently that new fbs_lock nests within the modeset locks and so
      appears redudant. But later patches will switch around this sequence
      so that taking the modeset locks in the fb destruction path is
      optional in the fastpath. Ultimately the goal is that addfb and rmfb
      do not require the mode_config lock, since otherwise they have the
      potential to introduce stalls in the pageflip sequence of a compositor
      (if the compositor e.g. switches to a fullscreen client or if it
      enables a plane). But that requires a few more steps and hoops to jump
      through.
      
      Note that framebuffer creation/destruction is now double-protected -
      once by the fb_lock and in parts by the idr_lock. The later would be
      unnecessariy if framebuffers would have their own idr allocator. But
      that's material for another patch (series).
      
      v2: Properly initialize the fb->filp_head list in _init, otherwise the
      newly added WARN to check whether the fb isn't on a fpriv list any
      more will fail for driver-private objects.
      
      v3: Fixup two error-case unlock bugs spotted by Richard Wilbur.
      Reviewed-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4b096ac1
    • D
      drm/vmwgfx: use drm_modeset_lock_all · bbe4b99f
      Daniel Vetter 提交于
      Ok, this one here is a bit more complicated, and I can't really claim
      to fully understand the locking and lifetime rules of the vmwgfx
      driver. So just convert ever mutex_lock call, including the
      interruptible one. Since other places (e.g. in the execbuf ioctl) take
      the mode_config.mutex without bothering with interruptible handling,
      I've figured I should be able to get away with this in a few more
      places ...
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bbe4b99f
  6. 21 11月, 2012 1 次提交
  7. 16 11月, 2012 1 次提交
  8. 03 10月, 2012 1 次提交
  9. 19 12月, 2011 2 次提交
  10. 07 12月, 2011 1 次提交
  11. 18 10月, 2011 1 次提交
  12. 10 10月, 2011 1 次提交
  13. 05 10月, 2011 1 次提交
  14. 06 9月, 2011 3 次提交
  15. 06 10月, 2010 1 次提交
  16. 11 2月, 2010 1 次提交
  17. 01 2月, 2010 1 次提交
  18. 15 12月, 2009 1 次提交