1. 11 3月, 2013 1 次提交
  2. 20 2月, 2013 1 次提交
  3. 15 2月, 2013 1 次提交
  4. 05 2月, 2013 1 次提交
  5. 20 1月, 2013 1 次提交
    • D
      drm/nouveau: try to protect nbo->pin_refcount · 0ae6d7bc
      Daniel Vetter 提交于
      ... by moving the bo_pin/bo_unpin manipulation of the pin_refcount
      under the protection of the ttm reservation lock. pin/unpin seems
      to get called from all over the place, so atm this is completely racy.
      
      After this patch there are only a few places in cleanup functions
      left which access ->pin_refcount without locking. But I'm hoping that
      those are safe and some other code invariant guarantees that this
      won't blow up.
      
      In any case, I only need to fix up pin/unpin to make ->pageflip work
      safely, so let's keep it at that.
      
      Add a comment to the header to explain the new locking rule.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0ae6d7bc
  6. 04 1月, 2013 1 次提交
  7. 10 12月, 2012 1 次提交
    • M
      drm/ttm: remove no_wait_reserve, v3 · 97a875cb
      Maarten Lankhorst 提交于
      All items on the lru list are always reservable, so this is a stupid
      thing to keep. Not only that, it is used in a way which would
      guarantee deadlocks if it were ever to be set to block on reserve.
      
      This is a lot of churn, but mostly because of the removal of the
      argument which can be nested arbitrarily deeply in many places.
      
      No change of code in this patch except removal of the no_wait_reserve
      argument, the previous patch removed the use of no_wait_reserve.
      
      v2:
       - Warn if -EBUSY is returned on reservation, all objects on the list
         should be reservable. Adjusted patch slightly due to conflicts.
      v3:
       - Focus on no_wait_reserve removal only.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
      Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      97a875cb
  8. 20 11月, 2012 3 次提交
  9. 16 10月, 2012 1 次提交
  10. 03 10月, 2012 9 次提交
  11. 24 5月, 2012 9 次提交
  12. 23 5月, 2012 2 次提交
  13. 22 5月, 2012 1 次提交
  14. 22 3月, 2012 1 次提交
  15. 26 1月, 2012 1 次提交
    • B
      drm/ttm: fix two regressions since move_notify changes · 9f1feed2
      Ben Skeggs 提交于
      Both changes in dc97b340 cause serious
      regressions in the nouveau driver.
      
      move_notify() was originally able to presume that bo->mem is the old node,
      and new_mem is the new node.  The above commit moves the call to
      move_notify() to after move() has been done, which means that now, sometimes,
      new_mem isn't the new node at all, bo->mem is, and new_mem points at a
      stale, possibly-just-been-killed-by-move node.
      
      This is clearly not a good situation.  This patch reverts this change, and
      replaces it with a cleanup in the move() failure path instead.
      
      The second issue is that the call to move_notify() from cleanup_memtype_use()
      causes the TTM ghost objects to get passed into the driver.  This is clearly
      bad as the driver knows nothing about these "fake" TTM BOs, and ends up
      accessing uninitialised memory.
      
      I worked around this in nouveau's move_notify() hook by ensuring the BO
      destructor was nouveau's.  I don't particularly like this solution, and
      would rather TTM never pass the driver these objects.  However, I don't
      clearly understand the reason why we're calling move_notify() here anyway
      and am happy to work around the problem in nouveau instead of breaking the
      behaviour expected by other drivers.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
      Cc: Jerome Glisse <j.glisse@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      9f1feed2
  16. 06 1月, 2012 1 次提交
  17. 22 12月, 2011 1 次提交
  18. 06 12月, 2011 4 次提交
    • J
      drm/ttm: callback move_notify any time bo placement change v4 · dc97b340
      Jerome Glisse 提交于
      Previously we were calling back move_notify in error path when the
      bo is returned to it's original position or when destroy the bo.
      When destroying the bo set the new mem placement as NULL when calling
      back in the driver.
      
      Updating nouveau to deal with NULL placement properly.
      
      v2: reserve the object before calling move_notify in bo destroy path
          at that point ttm should be the only piece of code interacting
          with the object so atomic_set is safe here.
      v3: callback move notify only once the bo is in its new position
          call move notify want swaping out the buffer
      v4:- don't call move_notify when swapin out bo, assume driver should
           do what is appropriate in swap notify
         - move move_notify call back to ttm_bo_cleanup_memtype_use for
           destroy path
      Reviewed-by: NJerome Glisse <jglisse@redhat.com>
      Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
      dc97b340
    • J
      drm/ttm: simplify memory accounting for ttm user v2 · 57de4ba9
      Jerome Glisse 提交于
      Provide helper function to compute the kernel memory size needed
      for each buffer object. Move all the accounting inside ttm, simplifying
      driver and avoiding code duplication accross them.
      
      v2 fix accounting of ghost object, one would have thought that i
         would have run into the issue since a longtime but it seems
         ghost object are rare when you have plenty of vram ;)
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
      57de4ba9
    • J
      drm/ttm: isolate dma data from ttm_tt V4 · 8e7e7052
      Jerome Glisse 提交于
      Move dma data to a superset ttm_dma_tt structure which herit
      from ttm_tt. This allow driver that don't use dma functionalities
      to not have to waste memory for it.
      
      V2 Rebase on top of no memory account changes (where/when is my
         delorean when i need it ?)
      V3 Make sure page list is initialized empty
      V4 typo/syntax fixes
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
      8e7e7052
    • K
      drm/nouveau: enable the ttm dma pool when swiotlb is active V3 · 3230cfc3
      Konrad Rzeszutek Wilk 提交于
      If the card is capable of more than 32-bit, then use the default
      TTM page pool code which allocates from anywhere in the memory.
      
      Note: If the 'ttm.no_dma' parameter is set, the override is ignored
      and the default TTM pool is used.
      
      V2 use pci_set_consistent_dma_mask
      V3 Rebase on top of no memory account changes (where/when is my
         delorean when i need it ?)
      
      CC: Ben Skeggs <bskeggs@redhat.com>
      CC: Francisco Jerez <currojerez@riseup.net>
      CC: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: NJerome Glisse <jglisse@redhat.com>
      3230cfc3