1. 17 12月, 2021 1 次提交
  2. 22 6月, 2021 2 次提交
  3. 16 6月, 2021 1 次提交
  4. 06 6月, 2021 2 次提交
  5. 02 6月, 2021 1 次提交
  6. 27 5月, 2021 1 次提交
    • T
      drm/amdgpu: Implement mmap as GEM object function · 71df0368
      Thomas Zimmermann 提交于
      Moving the driver-specific mmap code into a GEM object function allows
      for using DRM helpers for various mmap callbacks.
      
      This change resolves several inconsistencies between regular mmap and
      prime-based mmap. The vm_ops field in vma is now set for all mmap'ed
      areas. Previously it way only set for regular mmap calls, prime-based
      mmap used TTM's default vm_ops. The function amdgpu_verify_access() is
      no longer being called and therefore removed by this patch.
      
      As a side effect, amdgpu_ttm_vm_ops and amdgpu_ttm_fault() are now
      implemented in amdgpu's GEM code.
      
      v4:
      	* rebased
      v3:
      	* rename mmap function to amdgpu_gem_object_mmap() (Christian)
      	* remove unnecessary checks from mmap (Christian)
      v2:
      	* rename amdgpu_ttm_vm_ops and amdgpu_ttm_fault() to
      	  amdgpu_gem_vm_ops and amdgpu_gem_fault() (Christian)
      	* the check for kfd_bo has meanwhile been removed
      Signed-off-by: NThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-3-tzimmermann@suse.de
      71df0368
  7. 16 4月, 2021 1 次提交
  8. 24 3月, 2021 2 次提交
  9. 27 2月, 2021 1 次提交
  10. 06 1月, 2021 1 次提交
  11. 14 12月, 2020 1 次提交
  12. 10 12月, 2020 1 次提交
  13. 09 12月, 2020 1 次提交
  14. 09 11月, 2020 1 次提交
  15. 24 9月, 2020 1 次提交
  16. 09 9月, 2020 1 次提交
  17. 25 8月, 2020 1 次提交
  18. 11 8月, 2020 1 次提交
  19. 13 7月, 2020 1 次提交
    • M
      drm: amdgpu: fix common struct sg_table related issues · 39913934
      Marek Szyprowski 提交于
      The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function
      returns the number of the created entries in the DMA address space.
      However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and
      dma_unmap_sg must be called with the original number of the entries
      passed to the dma_map_sg().
      
      struct sg_table is a common structure used for describing a non-contiguous
      memory buffer, used commonly in the DRM and graphics subsystems. It
      consists of a scatterlist with memory pages and DMA addresses (sgl entry),
      as well as the number of scatterlist entries: CPU pages (orig_nents entry)
      and DMA mapped pages (nents entry).
      
      It turned out that it was a common mistake to misuse nents and orig_nents
      entries, calling DMA-mapping functions with a wrong number of entries or
      ignoring the number of mapped entries returned by the dma_map_sg()
      function.
      
      To avoid such issues, lets use a common dma-mapping wrappers operating
      directly on the struct sg_table objects and use scatterlist page
      iterators where possible. This, almost always, hides references to the
      nents and orig_nents entries, making the code robust, easier to follow
      and copy/paste safe.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Link: https://patchwork.freedesktop.org/patch/371142/Signed-off-by: NChristian König <christian.koenig@amd.com>
      39913934
  20. 20 5月, 2020 2 次提交
  21. 01 4月, 2020 3 次提交
  22. 27 2月, 2020 4 次提交
  23. 06 12月, 2019 1 次提交
  24. 28 10月, 2019 2 次提交
  25. 03 10月, 2019 1 次提交
  26. 13 8月, 2019 1 次提交
  27. 06 8月, 2019 2 次提交
  28. 05 8月, 2019 1 次提交
  29. 31 7月, 2019 1 次提交
    • D
      drm/amdgpu: Fill out gem_object->resv · b2ad978f
      Daniel Vetter 提交于
      That way we can ditch our gem_prime_res_obj implementation. Since ttm
      absolutely needs the right reservation object all the boilerplate is
      already there and we just have to wire it up correctly.
      
      Note that gem/prime doesn't care when we do this, as long as we do it
      before the bo is registered and someone can call the handle2fd ioctl
      on it.
      
      Aside: ttm_buffer_object.ttm_resv could probably be ditched in favour
      of always passing a non-NULL resv to ttm_bo_init(). At least for gem
      drivers that would avoid having two of these, on in ttm_buffer_object
      and the other in drm_gem_object, one just there for confusion.
      Acked-by: NGerd Hoffmann <kraxel@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NEmil Velikov <emil.velikov@collabora.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: "Michel Dänzer" <michel.daenzer@amd.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Huang Rui <ray.huang@amd.com>
      Cc: Felix Kuehling <Felix.Kuehling@amd.com>
      Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
      Cc: Evan Quan <evan.quan@amd.com>
      Cc: Sonny Jiang <sonny.jiang@amd.com>
      Cc: Amber Lin <Amber.Lin@amd.com>
      Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
      Cc: Junwei Zhang <Jerry.Zhang@amd.com>
      Cc: Thomas Zimmermann <contact@tzimmermann.org>
      Cc: Samuel Li <Samuel.Li@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190725132655.11951-4-daniel.vetter@ffwll.ch
      b2ad978f