1. 11 7月, 2018 1 次提交
  2. 01 6月, 2018 1 次提交
  3. 25 5月, 2018 1 次提交
  4. 19 5月, 2018 1 次提交
    • O
      drm/amdgpu: conditionally compile amdgpu's amdkfd files · fcdfa432
      Oded Gabbay 提交于
      In case CONFIG_HSA_AMD is not chosen, there is no need to compile amdkfd
      files that reside inside amdgpu dirver. In addition, because amdkfd
      depends on x86_64 architecture and amdgpu is not, compiling amdkfd files
      under i386 architecture can cause compiler errors and warnings.
      
      This patch modifies amdgpu's makefile to build amdkfd files only if
      CONFIG_HSA_AMD is chosen. The only file to be compiled unconditionally
      is amdgpu_amdkfd.c
      
      There are stub functions that are compiled only if amdkfd is not
      compiled. In that case, calls from amdgpu driver proper will go to those
      functions instead of the real functions.
      
      v2: instead of using function pointers, use stub functions
      
      v3: initialize kgd2kfd to NULL in case amdkfd is not compiled
      Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      fcdfa432
  5. 16 5月, 2018 1 次提交
  6. 11 4月, 2018 2 次提交
  7. 15 3月, 2018 1 次提交
  8. 20 2月, 2018 3 次提交
  9. 09 1月, 2018 1 次提交
    • A
      drm/amdgpu: use %pap format string for phys_addr_t · fb8baefc
      Arnd Bergmann 提交于
      The newly added get_local_mem_info() function prints a phys_addr_t
      using 0x%llx, which is wrong on most 32-bit systems, as shown by
      this warning:
      
      drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c: In function 'get_local_mem_info':
      include/linux/kern_levels.h:5:18: error: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'resource_size_t {aka unsigned int}' [-Werror=format=]
      drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:297:31: note: format string is defined here
        pr_debug("Address base: 0x%llx limit 0x%llx public 0x%llx private 0x%llx\n",
      
      Passing the address by reference to the special %pap format string will
      produce the correct output and avoid the warning.
      
      Fixes: 30f1c042 ("drm/amdgpu: Implement get_local_mem_info")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      fb8baefc
  10. 18 12月, 2017 1 次提交
  11. 09 12月, 2017 4 次提交
  12. 07 2月, 2018 5 次提交
  13. 05 1月, 2018 1 次提交
  14. 05 12月, 2017 1 次提交
  15. 28 11月, 2017 1 次提交
  16. 16 8月, 2017 3 次提交
  17. 14 7月, 2017 2 次提交
  18. 08 6月, 2017 1 次提交
  19. 01 6月, 2017 3 次提交
  20. 22 9月, 2016 1 次提交
  21. 08 7月, 2016 1 次提交
  22. 28 2月, 2016 2 次提交
    • O
      drm/amdgpu: Return -EPROBE_DEFER when amdkfd not loaded · efb1c658
      Oded Gabbay 提交于
      amdgpu must load only after amdkfd's loading has been completed. If that
      is not enforced, then amdgpu's call into amdkfd's functions will cause a
      kernel BUG.
      
      When amdgpu and amdkfd are built as kernel modules, that rule is enforced
      by the kernel's modules loading mechanism. When amdgpu and amdkfd are
      built inside the kernel image, that rule is enforced by ordering in the
      drm Makefile (amdkfd before amdgpu).
      
      Instead of using drm Makefile ordering, we can now use deferred loading
      as amdkfd now returns -EPROBE_DEFER in kgd2kfd_init() when it is not yet
      loaded.
      
      This patch defers amdgpu loading by propagating -EPROBE_DEFER to the
      kernel's drivers loading infrastructure. That will put amdgpu into the
      pending drivers list (see description in dd.c). Once amdkfd is loaded,
      a call to kgd2kfd_init() will return successfully and amdgpu will be able
      to load.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      efb1c658
    • O
      drm/amdkfd: Track when module's init is complete · c68f4528
      Oded Gabbay 提交于
      Current dependencies between amdkfd and radeon/amdgpu force the loading
      of amdkfd _before_ radeon and/or amdgpu are loaded. When all these kernel
      drivers are built as modules, this ordering is enforced by the kernel
      built-in mechanism of loading dependent modules.
      
      However, there is no such mechanism in case where all these drivers are
      compiled inside the kernel image (not as modules). The current way to
      enforce loading of amdkfd before radeon/amdgpu, is to put amdkfd before
      radeon/amdgpu in the drm Makefile, but that method is way too fragile.
      
      In addition, there is no kernel mechanism to check whether a kernel
      driver that is built inside the kernel image, has already been loaded.
      
      To solve this, this patch adds to kfd_module.c a new static variable,
      amdkfd_init_completed, that is set to 1 only when amdkfd's
      module initialization function has been completed (successfully).
      
      kgd2kfd_init(), which is the initialization function of the
      kgd-->kfd interface, and which is the first function in amdkfd called by
      radeon/amdgpu, will return successfully only if amdkfd_init_completed is
      equal 1.
      
      If amdkfd_init_completed is not equal to 1, kgd2kfd_init() will
      return -EPROBE_DEFER to signal radeon/amdgpu they need to defer
      their loading until amdkfd is loaded.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      c68f4528
  23. 24 9月, 2015 1 次提交
  24. 18 8月, 2015 1 次提交