1. 06 Dec, 2011 3 commits
  2. 31 Oct, 2011 1 commit
  3. 27 Jun, 2011 1 commit
  4. 04 Apr, 2011 1 commit
  5. 22 Feb, 2011 2 commits
  6. 27 Jan, 2011 2 commits
  7. 08 Nov, 2010 1 commit
  8. 05 Apr, 2010 1 commit
    • Pauli Nieminen's avatar
      drm/ttm: add pool wc/uc page allocator V3 · 1403b1a3
      Pauli Nieminen authored
      On AGP system we might allocate/free routinely uncached or wc memory,
      changing page from cached (wb) to uc or wc is very expensive and involves
      a lot of flushing. To improve performance this allocator use a pool
      of uc,wc pages.
      Pools are protected with spinlocks to allow multiple threads to allocate pages
      simultanously. Expensive operations are done outside of spinlock to maximize
      Pools are linked lists of pages that were recently freed. mm shrink callback
      allows kernel to claim back pages when they are required for something else.
      * set_pages_array_wb handles highmem pages so we don't have to remove them
        from pool.
      * Add count parameter to ttm_put_pages to avoid looping in free code.
      * Change looping from _safe to normal in pool fill error path.
      * Initialize sum variable and make the loop prettier in get_num_unused_pages.
      * Moved pages_freed reseting inside the loop in ttm_page_pool_free.
      * Add warning comment about spinlock context in ttm_page_pool_free.
      Based on Jerome Glisse's and Dave Airlie's pool allocator.
      Signed-off-by: default avatarJerome Glisse <jglisse@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarPauli Nieminen <suokkos@gmail.com>
      Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
  9. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  10. 14 Mar, 2010 1 commit
  11. 24 Feb, 2010 1 commit
  12. 19 Feb, 2010 1 commit
  13. 31 Jan, 2010 1 commit
  14. 06 Dec, 2009 1 commit
  15. 03 Nov, 2009 1 commit
    • Dave Airlie's avatar
      drm/radeon/kms: fix coherency issues on AGP cards. · df67bed9
      Dave Airlie authored
      When we are evicting from VRAM->RAM we allocate the ttm object,
      but we don't set the caching policy on it before blitting into it.
      This means on AGP we end up blitting into cached pages, and
      the CPU later flushes out on top of them. This was mostly seen as
      font corruption.
      The other question is why we don't evict VRAM->GTT in a lot of cases,
      this would save us some cache transitions since a lot of objects
      that are evicted from VRAM will probably end up being pulled back in
      a few operations later, and evicting them to system memory involves
      2 unnecessary cache transitions.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
  16. 26 Aug, 2009 1 commit
  17. 19 Aug, 2009 2 commits
  18. 29 Jul, 2009 1 commit
  19. 28 Jul, 2009 1 commit
  20. 15 Jul, 2009 1 commit
  21. 24 Jun, 2009 1 commit
  22. 18 Jun, 2009 1 commit
  23. 14 Jun, 2009 1 commit
    • Thomas Hellstrom's avatar
      drm: Add the TTM GPU memory manager subsystem. · ba4e7d97
      Thomas Hellstrom authored
      TTM is a GPU memory manager subsystem designed for use with GPU
      devices with various memory types (On-card VRAM, AGP,
      PCI apertures etc.). It's essentially a helper library that assists
      the DRM driver in creating and managing persistent buffer objects.
      TTM manages placement of data and CPU map setup and teardown on
      data movement. It can also optionally manage synchronization of
      data on a per-buffer-object level.
      TTM takes care to provide an always valid virtual user-space address
      to a buffer object which makes user-space sub-allocation of
      big buffer objects feasible.
      TTM uses a fine-grained per buffer-object locking scheme, taking
      care to release all relevant locks when waiting for the GPU.
      Although this implies some locking overhead, it's probably a big
      win for devices with multiple command submission mechanisms, since
      the lock contention will be minimal.
      TTM can be used with whatever user-space interface the driver
      chooses, including GEM. It's used by the upcoming Radeon KMS DRM driver
      and is also the GPU memory management core of various new experimental
      DRM drivers.
      Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: default avatarJerome Glisse <jglisse@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>