AMDGPU Driver with KFD used by the ROCm project. Also contains the current Linux Kernel that matches this base driver
Clone or download
Junwei Zhang Harish Kasiviswanathan
Junwei Zhang and Harish Kasiviswanathan drm/amdgpu: allocate gart memory when it's required (v3)
Instead of calling gart address space on every bo pin,
allocates it on demand

v2: fix error handling
v3: drop the change on amdgpu_amdkfd_gpuvm.c, not needed.

Change-Id: I206d776760ac81908c422ec041a04db2fbad5b6c
Signed-off-by: Junwei Zhang <>
Acked-by: Felix Kuehling <>
Reviewed-by: Christian König <>
Latest commit 5f91cd2 Jun 25, 2018
Failed to load latest commit information.
Documentation drm/doc: Add amdgpu hwmon/power documentation (v2) Jun 14, 2018
arch drm/amdkfd: Copy in KFD-related files Mar 19, 2018
block block: drain queue before waiting for q_usage_counter becoming zero Jan 5, 2018
certs License cleanup: add SPDX GPL-2.0 license identifier to files with no… Nov 2, 2017
crypto Merge branch 'linus' of git://… Jan 12, 2018
drivers drm/amdgpu: allocate gart memory when it's required (v3) Aug 24, 2018
firmware kbuild: remove all dummy assignments to obj- Nov 18, 2017
fs orangefs: fix deadlock; do not write i_size in read_iter Jan 26, 2018
include drm/amdgpu: Add DGMA domain to amdgpu domain mask Jul 23, 2018
init Merge branch 'sched-urgent-for-linus' of git://… Jan 12, 2018
ipc Rename superblock flags (MS_xyz -> SB_xyz) Nov 27, 2017
kernel Copy in non-KFD changes Mar 19, 2018
lib Merge git:// Jan 10, 2018
mm mm, page_vma_mapped: Introduce pfn_in_hpage() Jan 22, 2018
samples Merge git:// Dec 3, 2017
scripts scripts/gdb/linux/ fix get_thread_info Jan 19, 2018
security Merge branch 'x86-pti-for-linus' of git://… Jan 14, 2018
sound ASoC: amd: added cache invalidation logic for acp group registers Mar 23, 2018
tools Merge git:// Jan 19, 2018
usr initramfs: fix initramfs rebuilds w/ compression after disabling Nov 3, 2017
virt Merge tag 'kvm-arm-fixes-for-v4.15-3-v2' of git://… Jan 17, 2018
.cocciconfig scripts: add Linux .cocciconfig for coccinelle Jul 22, 2016
.get_maintainer.ignore Add hch to .get_maintainer.ignore Aug 21, 2015
.gitattributes .gitattributes: set git diff driver for C source code files Oct 8, 2016
.gitignore Merge tag 'kbuild-misc-v4.15' of git://… Nov 18, 2017
.mailmap mailmap: update Mark Yao's email address Jan 5, 2018
COPYING [PATCH] update FSF address in COPYING Sep 10, 2005
CREDITS MAINTAINERS: update TPM driver infrastructure changes Nov 10, 2017
Kbuild Merge tag 'kbuild-v4.15' of git://… Nov 18, 2017
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no… Nov 2, 2017
MAINTAINERS MAINTAINERS: add David (Chunming) Zhou as additional amdgpu maintainer Jan 31, 2018
Makefile Linux 4.15 Jan 28, 2018
README README: add a new README file, pointing to the Documentation/ Oct 24, 2016 drm/amdkfd: Copy in KFD-related files Mar 19, 2018

AMD Radeon Open Compute Kernel driver

What's New in this tree ?

  • dGPU support for Fiji
  • device and host memory support
  • multiple GPU support
  • host memory allocations are shared between GPUs

Known Issues

  • On consumer grade products (Nano, Fury, Fury X), thermal control is not working correctly. As a workaround, fans are hardcoded to 100% to prevent overheating.

Package Contents

The kernel image is built from a source tree based on the 4.15 upstream release plus:

  • Features in the HSA kernel driver ("amdkfd") that are not yet upstreamed to the mainline Linux kernel.
  • Changes in the AMDGPU kernel driver ("amdgpu") that may not yet be upstreamed to the mainline Linux kernel.
Note regarding libhsakmt compatibility

Please note that the libhsakmt library in this repository is NOT compatible with amdkfd that is distributed as part of the mainline Linux kernel from 3.19 and onward.

Target Platform

This release is intended for use with any hardware configuration that contains only Carrizo APU, or configurations which contain an Intel Haswell or newer CPU plus Fiji dGPUs.

APU motherboards must support run latest BIOS version and have the IOMMU enabled in the BIOS.

The following is a reference hardware configuration that was used for testing purposes:

dGPU Config:

  • CPU: Intel i7-4790
  • Motherboard: ASUS Z97-PRO
  • Memory: G.Skill Ripjaws 4 32GB RAM (4 x 8GB)
  • OS: Ubuntu 14.04.03 64-bit edition
  • dGPU: ASUS R9 Nano

Installing and configuring the kernel

NOTE: Binary packages are no longer part of this git repository. Please refer to the ROCm project for instructions on configuring the AMD apt/yum package server

Config files for building the kernel

The configuration used to build our kernel can be re-created by running: make rock-rel_defconfig

This config is based on the Ubuntu 14.04 build patches by Canonical.

Obtaining kernel and libhsakmt source code
  • Source code used to build the kernel is in this repo. Source code to build libhsakmt is in the ROCT-Thunk-Interface repository


The following lists the different licenses that apply to the different components in this repository:

  • the Linux kernel images are covered by the modified GPL license in COPYING
  • the firmware image is covered by the license in LICENSE.ucode