1. 26 1月, 2012 2 次提交
  2. 25 1月, 2012 2 次提交
  3. 22 1月, 2012 3 次提交
  4. 18 1月, 2012 3 次提交
  5. 17 1月, 2012 15 次提交
  6. 10 1月, 2012 3 次提交
  7. 09 1月, 2012 5 次提交
  8. 06 1月, 2012 7 次提交
    • D
      drm: introduce drm_can_sleep and use in intel/radeon drivers. (v2) · cc1f7194
      Dave Airlie 提交于
      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: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      cc1f7194
    • M
      radeon: Fix disabling PCI bus mastering on big endian hosts. · 3df96909
      Michel Dänzer 提交于
      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: NMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3df96909
    • J
      ttm: fix agp since ttm tt rework · dea7e0ac
      Jerome Glisse 提交于
      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: NJerome Glisse <jglisse@redhat.com>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dea7e0ac
    • T
    • K
      drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page and... · 2c05114d
      Konrad Rzeszutek Wilk 提交于
      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: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      2c05114d
    • K
      drm/ttm/dma: Only call set_pages_array_wb when the page is not in WB pool. · 36d7c537
      Konrad Rzeszutek Wilk 提交于
      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: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      36d7c537
    • A
      drm/radeon/kms: sync across multiple rings when doing bo moves v3 · 3000bf39
      Alex Deucher 提交于
      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: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3000bf39