1. 17 9月, 2013 1 次提交
  2. 30 7月, 2013 1 次提交
  3. 10 7月, 2013 1 次提交
  4. 01 7月, 2013 1 次提交
  5. 28 6月, 2013 1 次提交
  6. 14 2月, 2013 2 次提交
  7. 21 1月, 2013 1 次提交
    • D
      drm: revamp framebuffer cleanup interfaces · 36206361
      Daniel Vetter 提交于
      We have two classes of framebuffer
      - Created by the driver (atm only for fbdev), and the driver holds
        onto the last reference count until destruction.
      - Created by userspace and associated with a given fd. These
        framebuffers will be reaped when their assoiciated fb is closed.
      
      Now these two cases are set up differently, the framebuffers are on
      different lists and hence destruction needs to clean up different
      things. Also, for userspace framebuffers we remove them from any
      current usage, whereas for internal framebuffers it is assumed that
      the driver has done this already.
      
      Long story short, we need two different ways to cleanup such drivers.
      Three functions are involved in total:
      - drm_framebuffer_remove: Convenience function which removes the fb
        from all active usage and then drops the passed-in reference.
      - drm_framebuffer_unregister_private: Will remove driver-private
        framebuffers from relevant lists and drop the corresponding
        references. Should be called for driver-private framebuffers before
        dropping the last reference (or like for a lot of the drivers where
        the fbdev is embedded someplace else, before doing the cleanup
        manually).
      - drm_framebuffer_cleanup: Final cleanup for both classes of fbs,
        should be called by the driver's ->destroy callback once the last
        reference is gone.
      
      This patch just rolls out the new interfaces and updates all drivers
      (by adding calls to drm_framebuffer_unregister_private at all the
      right places)- no functional changes yet. Follow-on patches will move
      drm core code around and update the lifetime management for
      framebuffers, so that we are no longer required to keep framebuffers
      alive by locking mode_config.mutex.
      
      I've also updated the kerneldoc already.
      
      vmwgfx seems to again be a bit special, at least I haven't figured out
      how the fbdev support in that driver works. It smells like it's
      external though.
      
      v2: The i915 driver creates another private framebuffer in the
      load-detect code. Adjust its cleanup code, too.
      Reviewed-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      36206361
  8. 03 10月, 2012 6 次提交
  9. 26 6月, 2012 1 次提交
    • B
      drm/nouveau/fbcon: using nv_two_heads is not a good idea · 9bd0c15f
      Ben Skeggs 提交于
      nv_two_heads() was never meant to be used outside of pre-nv50 code.  The
      code checks for >= NV_10 for 2 CRTCs, then downgrades a few specific
      chipsets to 1 CRTC based on (pci_device & 0x0ff0).
      
      The breakage example seen is on GTX 560Ti, with a pciid of 0x1200, which
      gets detected as an NV20 (0x020x) with 1 CRTC by nv_two_heads(), causing
      memory corruption because there's actually 2 CRTCs..
      
      This switches fbcon to use the CRTC count directly from the mode_config
      structure, which will also fix the same issue on Kepler boards which have
      4 CRTCs.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      9bd0c15f
  10. 24 5月, 2012 2 次提交
  11. 09 2月, 2012 1 次提交
  12. 21 12月, 2011 1 次提交
  13. 20 12月, 2011 1 次提交
  14. 16 11月, 2011 1 次提交
  15. 10 11月, 2011 1 次提交
  16. 23 6月, 2011 2 次提交
  17. 20 4月, 2011 1 次提交
  18. 25 2月, 2011 2 次提交
  19. 17 1月, 2011 1 次提交
  20. 15 1月, 2011 1 次提交
  21. 07 1月, 2011 1 次提交
  22. 21 12月, 2010 2 次提交
  23. 08 12月, 2010 1 次提交
  24. 03 12月, 2010 3 次提交
  25. 07 10月, 2010 1 次提交
    • D
      drm: don't drop handle reference on unload · dab8dcfa
      Dave Airlie 提交于
      since the handle references are all tied to a file_priv, and when it disappears
      all the handle refs go with it.
      
      The fbcon ones we'd only notice on unload, but the nouveau notifier one
      would would happen on reboot.
      
      nouveau: Reported-by: Marc Dionne <marc.c.dionne@gmail.com>
      nouveau: Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
      i915 unload: Reported-by: Keith Packard <keithp@keithp.com>
      Acked-by: NBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dab8dcfa
  26. 06 10月, 2010 1 次提交
  27. 01 10月, 2010 1 次提交
    • D
      drm/gem: handlecount isn't really a kref so don't make it one. · 29d08b3e
      Dave Airlie 提交于
      There were lots of places being inconsistent since handle count
      looked like a kref but it really wasn't.
      
      Fix this my just making handle count an atomic on the object,
      and have it increase the normal object kref.
      
      Now i915/radeon/nouveau drivers can drop the normal reference on
      userspace object creation, and have the handle hold it.
      
      This patch fixes a memory leak or corruption on unload, because
      the driver had no way of knowing if a handle had been actually
      added for this object, and the fbcon object needed to know this
      to clean itself up properly.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      29d08b3e
  28. 11 8月, 2010 1 次提交