1. 11 7月, 2022 2 次提交
  2. 11 5月, 2022 2 次提交
  3. 08 4月, 2022 1 次提交
    • A
      drm/amdgpu: add drm buddy support to amdgpu · c9cad937
      Arunpravin Paneer Selvam 提交于
      - Switch to drm buddy allocator
      - Add resource cursor support for drm buddy
      
      v2(Matthew Auld):
        - replace spinlock with mutex as we call kmem_cache_zalloc
          (..., GFP_KERNEL) in drm_buddy_alloc() function
      
        - lock drm_buddy_block_trim() function as it calls
          mark_free/mark_split are all globally visible
      
      v3(Matthew Auld):
        - remove trim method error handling as we address the failure case
          at drm_buddy_block_trim() function
      
      v4:
        - fix warnings reported by kernel test robot <lkp@intel.com>
      
      v5:
        - fix merge conflict issue
      
      v6:
        - fix warnings reported by kernel test robot <lkp@intel.com>
      
      v7:
        - remove DRM_BUDDY_RANGE_ALLOCATION flag usage
      
      v8:
        - keep DRM_BUDDY_RANGE_ALLOCATION flag usage
        - resolve conflicts created by drm/amdgpu: remove VRAM accounting v2
      
      v9(Christian):
        - merged the below patch
           - drm/amdgpu: move vram inline functions into a header
        - rename label name as fallback
        - move struct amdgpu_vram_mgr to amdgpu_vram_mgr.h
        - remove unnecessary flags from struct amdgpu_vram_reservation
        - rewrite block NULL check condition
        - change else style as per coding standard
        - rewrite the node max size
        - add a helper function to fetch the first entry from the list
      
      v10(Christian):
         - rename amdgpu_get_node() function name as amdgpu_vram_mgr_first_block
      
      v11:
         - if size is not aligned with min_page_size, enable is_contiguous flag,
           therefore, the size round up to the power of two and trimmed to the
           original size.
      v12:
         - rename the function names having prefix as amdgpu_vram_mgr_*()
         - modify the round_up() logic conforming to contiguous flag enablement
           or if size is not aligned to min_block_size
         - modify the trim logic
         - rename node as block wherever applicable
      Signed-off-by: NArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220407224843.2416-1-Arunpravin.PaneerSelvam@amd.comSigned-off-by: NChristian König <christian.koenig@amd.com>
      c9cad937
  4. 14 2月, 2022 1 次提交
  5. 08 2月, 2022 1 次提交
  6. 26 1月, 2022 2 次提交
  7. 12 1月, 2022 1 次提交
  8. 31 8月, 2021 1 次提交
  9. 01 7月, 2021 1 次提交
    • O
      drm/amdgpu: Set ttm caching flags during bo allocation · 8dbe43e9
      Oak Zeng 提交于
      The ttm caching flags (ttm_cached, ttm_write_combined etc) are
      used to determine a buffer object's mapping attributes in both
      CPU page table and GPU page table (when that buffer is also
      accessed by GPU). Currently the ttm caching flags are set in
      function amdgpu_ttm_io_mem_reserve which is called during
      DRM_AMDGPU_GEM_MMAP ioctl. This has a problem since the GPU
      mapping of the buffer object (ioctl DRM_AMDGPU_GEM_VA) can
      happen earlier than the mmap time, thus the GPU page table
      update code can't pick up the right ttm caching flags to
      decide the right GPU page table attributes.
      
      This patch moves the ttm caching flags setting to function
      amdgpu_vram_mgr_new - this function is called during the
      first step of a buffer object create (eg, DRM_AMDGPU_GEM_CREATE)
      so the later both CPU and GPU mapping function calls will
      pick up this flag for CPU/GPU page table set up.
      
      v2: rebase (Alex)
      Signed-off-by: NOak Zeng <Oak.Zeng@amd.com>
      Suggested-by: NChristian Koenig <Christian.Koenig@amd.com>
      Reviewed-by: NChristian Koenig <Christian.Koenig@amd.com>
      Reviewed-by: NFeifei Xu <Feifei.Xu@amd.com>
      Tested-by: NPo Huang <Po.Huang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      8dbe43e9
  10. 10 6月, 2021 1 次提交
  11. 04 6月, 2021 2 次提交
  12. 02 6月, 2021 1 次提交
  13. 20 5月, 2021 3 次提交
  14. 29 4月, 2021 1 次提交
  15. 24 4月, 2021 1 次提交
  16. 23 4月, 2021 1 次提交
  17. 16 4月, 2021 1 次提交
  18. 10 4月, 2021 1 次提交
    • T
      drm/amdgpu: Convert sysfs sprintf/snprintf family to sysfs_emit · 36000c7a
      Tian Tao 提交于
      Fix the following coccicheck warning:
      drivers/gpu//drm/amd/amdgpu/amdgpu_ras.c:434:9-17: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c:220:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c:249:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/df_v3_6.c:208:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_psp.c:2973:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:75:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:112:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:58:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:93:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:125:9-17: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_gtt_mgr.c:52:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_gtt_mgr.c:71:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_device.c:140:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_device.c:164:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_device.c:186:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_device.c:208:8-16: WARNING:
      use scnprintf or sprintf
      drivers/gpu//drm/amd/amdgpu/amdgpu_atombios.c:1916:8-16: WARNING:
      use scnprintf or sprintf
      Signed-off-by: NTian Tao <tiantao6@hisilicon.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      36000c7a
  19. 24 3月, 2021 1 次提交
  20. 27 2月, 2021 2 次提交
  21. 03 2月, 2021 1 次提交
  22. 14 11月, 2020 1 次提交
    • L
      drm/amd/amdgpu/amdgpu_vram_mgr: Add missing descriptions for 'dev' and 'dir' · 2c8645b7
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:648: warning: Function parameter or member 'dev' not described in 'amdgpu_vram_mgr_free_sgt'
       drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:648: warning: Function parameter or member 'dir' not described in 'amdgpu_vram_mgr_free_sgt'
      
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: amd-gfx@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      2c8645b7
  23. 03 11月, 2020 1 次提交
  24. 30 10月, 2020 1 次提交
    • D
      drm/amdgpu: fix the issue of reserving bad pages failed · 676deb38
      Dennis Li 提交于
      In amdgpu_ras_reset_gpu, because bad pages may not be freed,
      it has high probability to reserve bad pages failed.
      
      Change to reserve bad pages when freeing VRAM.
      
      v2:
      1. avoid allocating the drm_mm node outside of amdgpu_vram_mgr.c
      2. move bad page reserving into amdgpu_ras_add_bad_pages, if vram mgr
         reserve bad page failed, it will put it into pending list, otherwise
         put it into processed list;
      3. remove amdgpu_ras_release_bad_pages, because retired page's info has
         been moved into amdgpu_vram_mgr
      
      v3:
      1. formate code style;
      2. rename amdgpu_vram_reserve_scope as amdgpu_vram_reservation;
      3. rename scope_pending as reservations_pending;
      4. rename scope_processed as reserved_pages;
      5. change to iterate over all the pending ones and try to insert them
         with drm_mm_reserve_node();
      
      v4:
      1. rename amdgpu_vram_mgr_reserve_scope as
      amdgpu_vram_mgr_reserve_range;
      2. remove unused include "amdgpu_ras.h";
      3. rename amdgpu_vram_mgr_check_and_reserve as
      amdgpu_vram_mgr_do_reserve;
      4. refine amdgpu_vram_mgr_reserve_range to call
      amdgpu_vram_mgr_do_reserve.
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NHawking Zhang <hawking.zhang@amd.com>
      Signed-off-by: NDennis Li <Dennis.Li@amd.com>
      Signed-off-by: NWenhui Sheng <Wenhui.Sheng@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      676deb38
  25. 29 10月, 2020 1 次提交
    • M
      drm: amdgpu: kernel-doc: update some adev parameters · ca766ff0
      Mauro Carvalho Chehab 提交于
      Running "make htmldocs: produce lots of warnings on those files:
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'p_size' description in 'amdgpu_gtt_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:134: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'p_size' description in 'amdgpu_gtt_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:134: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init'
      
      They're related to the repacement of some parameters by adev,
      and due to a few renamed parameters.
      
      While here, uniform the name of the parameter for it to be
      the same on all functions using a pointer to struct amdgpu_device.
      
      Update the kernel-doc documentation accordingly.
      Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      Link: https://lore.kernel.org/r/5755c2b361890b8ae5cea0f61dfd70b1c135eefe.1603791716.git.mchehab+huawei@kernel.orgSigned-off-by: NJonathan Corbet <corbet@lwn.net>
      ca766ff0
  26. 24 10月, 2020 1 次提交
  27. 22 10月, 2020 1 次提交
    • M
      drm: amdgpu: kernel-doc: update some adev parameters · 982a820b
      Mauro Carvalho Chehab 提交于
      Running "make htmldocs: produce lots of warnings on those files:
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'p_size' description in 'amdgpu_gtt_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:134: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'p_size' description in 'amdgpu_gtt_mgr_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:134: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_fini'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init'
      	./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init'
      
      They're related to the repacement of some parameters by adev,
      and due to a few renamed parameters.
      
      While here, uniform the name of the parameter for it to be
      the same on all functions using a pointer to struct amdgpu_device.
      
      Update the kernel-doc documentation accordingly.
      Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      982a820b
  28. 07 10月, 2020 1 次提交
  29. 15 9月, 2020 2 次提交
  30. 25 8月, 2020 1 次提交
  31. 12 8月, 2020 1 次提交
  32. 11 8月, 2020 1 次提交