1. 16 10月, 2012 3 次提交
  2. 03 10月, 2012 1 次提交
  3. 27 9月, 2012 2 次提交
    • D
      drm/radeon: add 2-level VM pagetables support v9 · fa87e62d
      Dmitry Cherkasov 提交于
      PDE/PTE update code uses CP ring for memory writes.
      All page table entries are preallocated for now in alloc_pt().
      
      It is made as whole because it's hard to divide it to several patches
      that compile and doesn't break anything being applied separately.
      
      Tested on cayman card.
      
      v2: rebased on top of "refactor set_page chipset interface v3",
          code cleanups
      
      v3: switched offsets calc macros to inline funcs where possible,
          remove pd_addr from radeon_vm, switched RADEON_BLOCK_SIZE define,
          to 9 (and PTE_COUNT to 1 << BLOCK_SIZE)
      
      v4 (ck): move "incr" documentation to previous patch, cleanup and
               document RADEON_VM_* constants, change commit message to
               our usual format, simplify patch allot by removing
               everything current not necessary, disable SI workaround.
      
      v5: (agd5f): Fix typo in tables_size calculation in
                   radeon_vm_alloc_pt().  Second line should have been
                   '+=' rather than '='.
      
      v6: fix npdes calculation. In scenario when pfns to be mapped overlap
      two PDE spans:
      
         +-----------+-------------+
         | PDE span  | PDE span    |
         +-----------+----+--------+
                |         |
                +---------+
                | pfns    |
                +---------+
      
      the following npdes calculation gives incorrect result:
      
      npdes = (nptes >> RADEON_VM_BLOCK_SIZE) + 1;
      
      For the case above picture it should give npdes = 2, but gives one.
      
      This patch corrects it by rounding last pfn up to 512 border,
      first - down to 512 border and then subtracting and dividing by 512.
      
      v7: Make npde calculation clearer, fix ndw calculation.
      
      v8: (agd5f): reserve enough for 2 full VM PTs, add some
                   additional comments.
      
      v9: fix typo in npde calculation
      Signed-off-by: NDmitry Cherkasov <Dmitrii.Cherkasov@amd.com>
      Signed-off-by: NChristian König <deathsimple@vodafone.de>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      fa87e62d
    • C
      drm/radeon: refactor set_page chipset interface v5 · dce34bfd
      Christian König 提交于
      Cleanup the interface in preparation for hierarchical page tables.
      
      v2: add incr parameter to set_page for simple scattered PTs uptates
          added PDE-specific flags to r600_flags and radeon_drm.h
          removed superfluous value masking with 0xffffffff
      
      v3: removed superfluous bo_va->valid checking
          changed R600_PTE_VALID to R600_ENTRY_VALID to handle PDE too
      
      v4 (ck): fix indention style, rework and fix typos in commit message,
               add documentation for incr parameter, also use incr
               parameter for system pages
      
      v5 (agd5f): use upper_32_bits() and minor white space fixes
      Signed-off-by: NChristian König <deathsimple@vodafone.de>
      Signed-off-by: NDmitry Cherkassov <Dmitrii.Cherkasov@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      dce34bfd
  4. 21 9月, 2012 12 次提交
  5. 13 8月, 2012 2 次提交
  6. 18 7月, 2012 2 次提交
  7. 17 7月, 2012 2 次提交
  8. 29 6月, 2012 1 次提交
    • A
      drm/radeon: fix VM page table setup on SI · c21b328e
      Alex Deucher 提交于
      Cayman and trinity allow for variable sized VM page
      tables, but SI requires that all page tables be the
      same size.  The current code assumes variablely sized
      VM page tables so SI may end up with part of each page
      table overlapping with other memory which could end
      up being interpreted by the VM hw as garbage.
      
      Change the code to better accomodate SI.  Allocate enough
      space for at least 2 full page tables and always set
      last_pfn to max_pfn on SI so each VM is backed by a full
      page table.  This limits us to only 2 VMs active at any
      given time on SI.  This will be rectified and the code can
      be reunified once we move to two level page tables.
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NJerome Glisse <jglisse@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c21b328e
  9. 21 6月, 2012 1 次提交
  10. 05 6月, 2012 1 次提交
  11. 23 5月, 2012 1 次提交
  12. 10 5月, 2012 4 次提交
  13. 06 4月, 2012 1 次提交
  14. 01 3月, 2012 1 次提交
  15. 09 1月, 2012 3 次提交
  16. 06 1月, 2012 1 次提交
    • J
      drm/radeon: GPU virtual memory support v22 · 721604a1
      Jerome Glisse 提交于
      Virtual address space are per drm client (opener of /dev/drm).
      Client are in charge of virtual address space, they need to
      map bo into it by calling DRM_RADEON_GEM_VA ioctl.
      
      First 16M of virtual address space is reserved by the kernel.
      
      Once using 2 level page table we should be able to have a small
      vram memory footprint for each pt (there would be one pt for all
      gart, one for all vram and then one first level for each virtual
      address space).
      
      Plan include using the sub allocator for a common vm page table
      area and using memcpy to copy vm page table in & out. Or use
      a gart object and copy things in & out using dma.
      
      v2: agd5f fixes:
      - Add vram base offset for vram pages.  The GPU physical address of a
      vram page is FB_OFFSET + page offset.  FB_OFFSET is 0 on discrete
      cards and the physical bus address of the stolen memory on
      integrated chips.
      - VM_CONTEXT1_PROTECTION_FAULT_DEFAULT_ADDR covers all vmid's >= 1
      
      v3: agd5f:
      - integrate with the semaphore/multi-ring stuff
      
      v4:
      - rebase on top ttm dma & multi-ring stuff
      - userspace is now in charge of the address space
      - no more specific cs vm ioctl, instead cs ioctl has a new
        chunk
      
      v5:
      - properly handle mem == NULL case from move_notify callback
      - fix the vm cleanup path
      
      v6:
      - fix update of page table to only happen on valid mem placement
      
      v7:
      - add tlb flush for each vm context
      - add flags to define mapping property (readable, writeable, snooped)
      - make ring id implicit from ib->fence->ring, up to each asic callback
        to then do ring specific scheduling if vm ib scheduling function
      
      v8:
      - add query for ib limit and kernel reserved virtual space
      - rename vm->size to max_pfn (maximum number of page)
      - update gem_va ioctl to also allow unmap operation
      - bump kernel version to allow userspace to query for vm support
      
      v9:
      - rebuild page table only when bind and incrementaly depending
        on bo referenced by cs and that have been moved
      - allow virtual address space to grow
      - use sa allocator for vram page table
      - return invalid when querying vm limit on non cayman GPU
      - dump vm fault register on lockup
      
      v10: agd5f:
      - Move the vm schedule_ib callback to a standalone function, remove
        the callback and use the existing ib_execute callback for VM IBs.
      
      v11:
      - rebase on top of lastest Linus
      
      v12: agd5f:
      - remove spurious backslash
      - set IB vm_id to 0 in radeon_ib_get()
      
      v13: agd5f:
      - fix handling of RADEON_CHUNK_ID_FLAGS
      
      v14:
      - fix va destruction
      - fix suspend resume
      - forbid bo to have several different va in same vm
      
      v15:
      - rebase
      
      v16:
      - cleanup left over of vm init/fini
      
      v17: agd5f:
      - cs checker
      
      v18: agd5f:
      - reworks the CS ioctl to better support multiple rings and
      VM.  Rather than adding a new chunk id for VM, just re-use the
      IB chunk id and add a new flags for VM mode.  Also define additional
      dwords for the flags chunk id to define the what ring we want to use
      (gfx, compute, uvd, etc.) and the priority.
      
      v19:
      - fix cs fini in weird case of no ib
      - semi working flush fix for ni
      - rebase on top of sa allocator changes
      
      v20: agd5f:
      - further CS ioctl cleanups from Christian's comments
      
      v21: agd5f:
      - integrate CS checker improvements
      
      v22: agd5f:
      - final cleanups for release, only allow VM CS on cayman
      Signed-off-by: NJerome Glisse <jglisse@redhat.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      721604a1
  17. 06 12月, 2011 1 次提交
  18. 04 11月, 2011 1 次提交