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
      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
    • D
      drm/nouveau: don't munge in drm_mm internals · 31a5b8ce
      Daniel Vetter 提交于
      Nouveau was checking drm_mm internals on teardown to see whether the
      memory manager was initialized. Hide these internals in a small
      inline helper function.
      Acked-by: NBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      31a5b8ce
  2. 28 10月, 2010 1 次提交
  3. 07 7月, 2010 3 次提交
  4. 10 12月, 2009 2 次提交
  5. 08 9月, 2009 1 次提交
  6. 02 9月, 2009 1 次提交
  7. 19 6月, 2009 1 次提交
  8. 12 6月, 2009 1 次提交