1. 23 2月, 2011 3 次提交
    • D
      drm: mm: add api for embedding struct drm_mm_node · b0b7af18
      Daniel Vetter 提交于
      The old api has a two-step process: First search for a suitable
      free hole, then allocate from that specific hole. No user used
      this to do anything clever. So drop it for the embeddable variant
      of the drm_mm api (the old one retains this ability, for the time
      being).
      
      With struct drm_mm_node embedded, we cannot track allocations
      anymore by checking for a NULL pointer. So keep track of this
      and add a small helper drm_mm_node_allocated.
      
      Also add a function to move allocations between different struct
      drm_mm_node.
      
      v2: Implement suggestions by Chris Wilson.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      b0b7af18
    • D
      9fc935de
    • D
      drm: mm: track free areas implicitly · ea7b1dd4
      Daniel Vetter 提交于
      The idea is to track free holes implicitly by marking the allocation
      immediatly preceeding a hole.
      
      To avoid an ugly corner case add a dummy head_node to struct drm_mm
      to track the hole that spans to complete allocation area when the
      memory manager is empty.
      
      To guarantee that there's always a preceeding/following node (that might
      be marked as hole_follows == 1), move the mm->node_list list_head to the
      head_node.
      
      The main allocator and fair-lru scan code actually becomes simpler.
      Only the debug code slightly suffers because free areas are no longer
      explicit.
      
      Also add drm_mm_for_each_node (which will be much more useful when
      struct drm_mm_node is embeddable).
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ea7b1dd4
  2. 28 10月, 2010 1 次提交
  3. 27 8月, 2010 1 次提交
  4. 07 7月, 2010 5 次提交
  5. 15 2月, 2010 1 次提交
  6. 23 12月, 2009 1 次提交
  7. 10 12月, 2009 2 次提交
  8. 04 12月, 2009 1 次提交
  9. 24 11月, 2009 1 次提交
    • J
      drm: mm always protect change to unused_nodes with unused_lock spinlock · a698cf34
      Jerome Glisse 提交于
      unused_nodes modification needs to be protected by unused_lock spinlock.
      Here is an example of an usage where there is no such protection without
      this patch.
      
        Process 1: 1-drm_mm_pre_get(this function modify unused_nodes list)
                   2-spin_lock(spinlock protecting mm struct)
                   3-drm_mm_put_block(this function might modify unused_nodes
                     list but doesn't protect modification with unused_lock)
                   4-spin_unlock(spinlock protecting mm struct)
        Process2:  1-drm_mm_pre_get(this function modify unused_nodes list)
      At this point Process1 & Process2 might both be doing modification to
      unused_nodes list. This patch add unused_lock protection into
      drm_mm_put_block to avoid such issue.
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a698cf34
  10. 02 9月, 2009 1 次提交
  11. 19 6月, 2009 1 次提交
  12. 15 6月, 2009 1 次提交
  13. 12 6月, 2009 1 次提交
  14. 29 12月, 2008 1 次提交
    • D
      DRM: add mode setting support · f453ba04
      Dave Airlie 提交于
      Add mode setting support to the DRM layer.
      
      This is a fairly big chunk of work that allows DRM drivers to provide
      full output control and configuration capabilities to userspace.  It was
      motivated by several factors:
        - the fb layer's APIs aren't suited for anything but simple
          configurations
        - coordination between the fb layer, DRM layer, and various userspace
          drivers is poor to non-existent (radeonfb excepted)
        - user level mode setting drivers makes displaying panic & oops
          messages more difficult
        - suspend/resume of graphics state is possible in many more
          configurations with kernel level support
      
      This commit just adds the core DRM part of the mode setting APIs.
      Driver specific commits using these new structure and APIs will follow.
      
      Co-authors: Jesse Barnes <jbarnes@virtuousgeek.org>, Jakob Bornecrantz <jakob@tungstengraphics.com>
      Contributors: Alan Hourihane <alanh@tungstengraphics.com>, Maarten Maathuis <madman2003@gmail.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f453ba04
  15. 18 10月, 2008 1 次提交
    • E
      drm: Add GEM ("graphics execution manager") to i915 driver. · 673a394b
      Eric Anholt 提交于
      GEM allows the creation of persistent buffer objects accessible by the
      graphics device through new ioctls for managing execution of commands on the
      device.  The userland API is almost entirely driver-specific to ensure that
      any driver building on this model can easily map the interface to individual
      driver requirements.
      
      GEM is used by the 2d driver for managing its internal state allocations and
      will be used for pixmap storage to reduce memory consumption and enable
      zero-copy GLX_EXT_texture_from_pixmap, and in the 3d driver is used to enable
      GL_EXT_framebuffer_object and GL_ARB_pixel_buffer_object.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      673a394b
  16. 14 7月, 2008 1 次提交
    • D
      drm: reorganise drm tree to be more future proof. · c0e09200
      Dave Airlie 提交于
      With the coming of kernel based modesetting and the memory manager stuff,
      the everything in one directory approach was getting very ugly and
      starting to be unmanageable.
      
      This restructures the drm along the lines of other kernel components.
      
      It creates a drivers/gpu/drm directory and moves the hw drivers into
      subdirectores. It moves the includes into an include/drm, and
      sets up the unifdef for the userspace headers we should be exporting.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c0e09200
  17. 07 2月, 2008 1 次提交
  18. 20 10月, 2007 1 次提交
  19. 11 7月, 2007 1 次提交
  20. 11 3月, 2007 1 次提交
  21. 08 2月, 2007 1 次提交
    • T
      drm: update core memory manager from git drm tree · 1d58420b
      Thomas Hellstrom 提交于
      Remove the memory manager parameter from the put_block function, as this
      makes the client code a lot cleaner. Prepare buffer manager for lock and
      unlock calls.
      Fix buggy aligned allocations.
      Remove the stupid root_node field from the core memory manager.
      Support multi-page buffer offset alignments
      Add improved alignment functionality to the core memory manager.
      This makes an allocated block actually align itself and returns any
      wasted space to the manager.
      Signed-off-by: NDave Airlie <airlied@linux.ie>
      1d58420b
  22. 22 9月, 2006 2 次提交