1. 26 Jan, 2012 1 commit
  2. 25 Jan, 2012 2 commits
  3. 24 Jan, 2012 1 commit
  4. 21 Jan, 2012 3 commits
  5. 17 Jan, 2012 16 commits
  6. 16 Jan, 2012 2 commits
  7. 10 Jan, 2012 3 commits
  8. 09 Jan, 2012 5 commits
  9. 06 Jan, 2012 7 commits
    • Dave Airlie's avatar
      drm: introduce drm_can_sleep and use in intel/radeon drivers. (v2) · cc1f7194
      Dave Airlie authored
      So we have a few places where the drm drivers would like to sleep to
      be nice to the system, mainly in the modesetting paths, but we also
      have two cases were atomic modesetting must take place, panic writing
      and kernel debugger. So provide a central inline to determine if a
      sleep or delay should be used and use this in the intel and radeon drivers.
      
      v2: drop intel_drv.h MSLEEP macro, nobody uses it.
      
      Based on patch from Michel Dänzer <michel.daenzer@amd.com>
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43941Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      cc1f7194
    • Michel Dänzer's avatar
      radeon: Fix disabling PCI bus mastering on big endian hosts. · 3df96909
      Michel Dänzer authored
      It would previously write basically random bits to PCI configuration space...
      Not very surprising that the GPU tended to stop responding completely. The
      resulting MCE even froze the whole machine sometimes.
      
      Now resetting the GPU after a lockup has at least a fighting chance of
      succeeding.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      3df96909
    • Jerome Glisse's avatar
      ttm: fix agp since ttm tt rework · dea7e0ac
      Jerome Glisse authored
      ttm tt rework modified the way we allocate and populate the
      ttm_tt structure, the AGP side was missing some bit to properly
      work. Fix those and fix radeon and nouveau AGP support.
      
      Tested on radeon only so far.
      Signed-off-by: default avatarJerome Glisse <jglisse@redhat.com>
      Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      dea7e0ac
    • Tormod Volden's avatar
    • Konrad Rzeszutek Wilk's avatar
      drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page and... · 2c05114d
      Konrad Rzeszutek Wilk authored
      drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page and don't try to free freed pages.
      
      The code to figure out how many pages to shrink the pool
      ends up capping the 'count' at _manager->options.max_size - which is OK.
      Except that the 'count' is also used when accounting for how many pages
      are recycled - which we end up with the invalid values. This fixes
      it by using a different value for the amount of pages to shrink.
      
      On top of that we would free the cached page pool - which is nonsense
      as they are deleted from the pool - so there are no free pages in that
      pool..
      
      Also we also missed the opportunity to batch the amount of pages
      to free (similar to how ttm_page_alloc.c does it). This reintroduces
      the code that was lost during rebasing.
      Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      2c05114d
    • Konrad Rzeszutek Wilk's avatar
      drm/ttm/dma: Only call set_pages_array_wb when the page is not in WB pool. · 36d7c537
      Konrad Rzeszutek Wilk authored
      Otherwise we are doing redundant work. Especially since the 'unbind'
      and 'unpopulate' have been merged and nouveau driver ends up calling
      it quite excessivly. On a GeForce 8600 GT with Gnome Shell (GNOME 3)
      we end up spending about 54% CPU time in __change_page_attr_set_clr
      checking the page flags.
      
      The callgraph (annotated) looks as so before this patch:
      
          53.29%  gnome-shell  [kernel.kallsyms]                   [k] static_protections
                  |
                  --- static_protections
                     |
                     |--91.80%-- __change_page_attr_set_clr
                     |          change_page_attr_set_clr
                     |          set_pages_array_wb
                     |          |
                     |          |--96.55%-- ttm_dma_unpopulate
                     |          |          nouveau_ttm_tt_unpopulate
                     |          |          ttm_tt_destroy
                     |          |          ttm_bo_cleanup_memtype_use
                     |          |          ttm_bo_release
                     |          |          kref_put
                     |          |          ttm_bo_unref
                     |          |          nouveau_gem_object_del
                     |          |          drm_gem_object_free
                     |          |          kref_put
                     |          |          drm_gem_object_unreference_unlocked
                     |          |          drm_gem_object_handle_unreference_unlocked.part.1
                     |          |          drm_gem_handle_delete
                     |          |          drm_gem_close_ioctl
                     |          |          drm_ioctl
                     |          |          do_vfs_ioctl
                     |          |          sys_ioctl
                     |          |          system_call_fastpath
                     |          |          __GI___ioctl
                     |          |
                     |           --3.45%-- ttm_dma_pages_put
                     |                     ttm_dma_page_pool_free
                     |                     ttm_dma_unpopulate
                     |                     nouveau_ttm_tt_unpopulate
                     |                     ttm_tt_destroy
                     |                     ttm_bo_cleanup_memtype_use
                     |                     ttm_bo_release
                     |                     kref_put
                     |                     ttm_bo_unref
                     |                     nouveau_gem_object_del
                     |                     drm_gem_object_free
                     |                     kref_put
                     |                     drm_gem_object_unreference_unlocked
                     |                     drm_gem_object_handle_unreference_unlocked.part.1
                     |                     drm_gem_handle_delete
                     |                     drm_gem_close_ioctl
                     |                     drm_ioctl
                     |                     do_vfs_ioctl
                     |                     sys_ioctl
                     |                     system_call_fastpath
                     |                     __GI___ioctl
                     |
                      --8.20%-- change_page_attr_set_clr
                                set_pages_array_wb
                                |
                                |--93.76%-- ttm_dma_unpopulate
                                |          nouveau_ttm_tt_unpopulate
                                |          ttm_tt_destroy
                                |          ttm_bo_cleanup_memtype_use
                                |          ttm_bo_release
                                |          kref_put
                                |          ttm_bo_unref
                                |          nouveau_gem_object_del
                                |          drm_gem_object_free
                                |          kref_put
                                |          drm_gem_object_unreference_unlocked
                                |          drm_gem_object_handle_unreference_unlocked.part.1
                                |          drm_gem_handle_delete
                                |          drm_gem_close_ioctl
                                |          drm_ioctl
                                |          do_vfs_ioctl
                                |          sys_ioctl
                                |          system_call_fastpath
                                |          __GI___ioctl
                                |
                                 --6.24%-- ttm_dma_pages_put
                                           ttm_dma_page_pool_free
                                           ttm_dma_unpopulate
                                           nouveau_ttm_tt_unpopulate
                                           ttm_tt_destroy
                                           ttm_bo_cleanup_memtype_use
                                           ttm_bo_release
                                           kref_put
                                           ttm_bo_unref
                                           nouveau_gem_object_del
                                           drm_gem_object_free
                                           kref_put
                                           drm_gem_object_unreference_unlocked
                                           drm_gem_object_handle_unreference_unlocked.part.1
                                           drm_gem_handle_delete
                                           drm_gem_close_ioctl
                                           drm_ioctl
                                           do_vfs_ioctl
                                           sys_ioctl
                                           system_call_fastpath
                                           __GI___ioctl
      
      and after this patch all of that disappears.
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      36d7c537
    • Alex Deucher's avatar
      drm/radeon/kms: sync across multiple rings when doing bo moves v3 · 3000bf39
      Alex Deucher authored
      We need to synchronize across rings when doing a bo move to make
      sure we the buffer is idle if it's in use by a different ring than
      the ring doing the move.
      
      v2: fix fence setup for bo moves
      
      v3: add missing ring lock/unlock
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      3000bf39