[PATCH 1/2] drm/amdgpu: reverse PDBs order

2017-12-08 Thread Chunming Zhou
The hiberachy of page table is as below, which aligns hw names. PDB2->PDB1->PDB0->PTB, accordingly: level3 --- PDB2 level2 --- PDB1 level1 --- PDB0 level0 --- PTB Change-Id: I2d748e5e96cffe18294c104c4b192d910b2f8e6b Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 37 +++

[PATCH 2/2] drm/amdgpu: fix pte index calculation

2017-12-08 Thread Chunming Zhou
Change-Id: I40ecf31ad4b51022a2c0c076ae45188b6e9d63de Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 8904ccf78fc

[PATCH umr] fix specifying device by ASIC name

2017-12-08 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/discover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/discover.c b/src/lib/discover.c index e1ccea1d20e4..94d1c676718a 100644 --- a/src/lib/discover.c +++ b/src/lib/discover.c @@ -152,7 +152,7 @@ struct umr_asic *umr_discove

Re: [PATCH 2/2] drm/amdgpu: fix pte index calculation

2017-12-08 Thread Christian König
What is wrong with the old approach? I would rather say that the address should be limited by the level shift instead. This way we avoid the modulo altogether. Christian. Am 08.12.2017 um 11:56 schrieb Chunming Zhou: Change-Id: I40ecf31ad4b51022a2c0c076ae45188b6e9d63de Signed-off-by: Chunmin

Re: [PATCH 1/2] drm/amdgpu: reverse PDBs order

2017-12-08 Thread Christian König
Am 08.12.2017 um 11:56 schrieb Chunming Zhou: The hiberachy of page table is as below, which aligns hw names. PDB2->PDB1->PDB0->PTB, accordingly: level3 --- PDB2 level2 --- PDB1 level1 --- PDB0 level0 --- PTB Change-Id: I2d748e5e96cffe18294c104c4b192d910b2f8e6b Signed-off-by: Chunming Zhou Ye

Re: [PATCH 1/2] drm/amdgpu: reverse PDBs order

2017-12-08 Thread Alex Deucher
On Fri, Dec 8, 2017 at 5:56 AM, Chunming Zhou wrote: > The hiberachy of page table is as below, which aligns hw names. > PDB2->PDB1->PDB0->PTB, accordingly: > level3 --- PDB2 > level2 --- PDB1 > level1 --- PDB0 > level0 --- PTB What's the advantage of this change? It's not clear from the commit

Re: [PATCH 1/2] drm/amdgpu: reverse PDBs order

2017-12-08 Thread Christian König
Am 08.12.2017 um 15:58 schrieb Alex Deucher: On Fri, Dec 8, 2017 at 5:56 AM, Chunming Zhou wrote: The hiberachy of page table is as below, which aligns hw names. PDB2->PDB1->PDB0->PTB, accordingly: level3 --- PDB2 level2 --- PDB1 level1 --- PDB0 level0 --- PTB What's the advantage of this chan

[PATCH 1/8] drm/amdgpu: stop joining PDEs

2017-12-08 Thread Christian König
That doesn't hit any more most of the time anyway. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 41 ++ 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgp

[PATCH 3/8] drm/amdgpu: avoid the modulo in amdgpu_vm_get_entry

2017-12-08 Thread Christian König
We can do this with a simple mask as well. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 796375484f6f..400a

[PATCH 4/8] drm/amdgpu: remove last_entry_used from the VM code

2017-12-08 Thread Christian König
Not needed any more. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 52 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 - 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/driver

[PATCH 2/8] drm/amdgpu: update one PDE at a time

2017-12-08 Thread Christian König
Horrible inefficient, but avoids problems when the root PD size becomes to big. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 81 +++--- 1 file changed, 36 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.

[PATCH 7/8] drm/amdgpu: allow get_vm_pde to change flags as well

2017-12-08 Thread Christian König
And also provide the level for which we need a PDE. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 +--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c |

[PATCH 5/8] drm/amdgpu: remove keeping the addr of the VM PDs

2017-12-08 Thread Christian König
No more double house keeping. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/am

[PATCH 8/8] drm/amdgpu: implement 2+1 PD support for Raven

2017-12-08 Thread Christian König
Instead of falling back to 2 level and very limited address space use 2+1 PD support and 128TB + 512GB of virtual address space. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 ++ drivers/gpu/drm/amd/amdgpu/gfxhub

[PATCH 6/8] drm/amdgpu: batch PDE updates again

2017-12-08 Thread Christian König
Now instead of one submission for each PDE batch them together over all PDs who need an update. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 206 +++-- 1 file changed, 94 insertions(+), 112 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH 3/4] drm/amdgpu: drop the bios scratch reg callbacks from nbio

2017-12-08 Thread Alex Deucher
They are not used any longer. We get the scratch register locations from the vbios directly now. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 --- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 14 -- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 14 -

[PATCH 4/4] drm/amdgpu: drop soc15_init_golden_registers

2017-12-08 Thread Alex Deucher
The golden register arrays were empty so the function was effectively useless. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 31 --- 1 file changed, 31 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/s

[PATCH 2/4] drm/amdgpu: convert nbio to use callbacks

2017-12-08 Thread Alex Deucher
Cleans up and consolidates all of the per-asic logic. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 50 -- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 + drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c

[PATCH 1/4] drm/amdgpu: make function names consistent in nbio files

2017-12-08 Thread Alex Deucher
All functions should have nbio_v* prefix. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 16 drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 16 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v

[PATCH] drm/amdgpu: setup the shared and private apertures on gfx9

2017-12-08 Thread Alex Deucher
Same as previous asics. This was not yet set for gfx9. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 17 - drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gf

[PATCH v2 2/2] drm/amdgpu: Move to gtt before cpu accesses dma buf.

2017-12-08 Thread Samuel Li
To improve cpu read performance. This is implemented for APUs currently. v2: Adapt to change https://lists.freedesktop.org/archives/amd-gfx/2017-October/015174.html Change-Id: I7a583e23a9ee706e0edd2a46f4e4186a609368e3 --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/am

[PATCH v2 1/2] drm/amdgpu: allow framebuffer in GART memory as well

2017-12-08 Thread Samuel Li
From: Christian König On CZ and newer APUs we can pin the fb into GART as well as VRAM. v2: Don't enable gpu_vm_support for Raven yet since it leads to a black screen. Need to debug this further before enabling. Change-Id: Id0f8af3110e54a3aabf7a258871867bc121cc1a2 Signed-off-by: Christian K

[PATCH 01/37] drm/amd: add new interface to query cu info

2017-12-08 Thread Felix Kuehling
From: Flora Cui Signed-off-by: Flora Cui Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/

[PATCH 04/37] drm/amdgpu: Implement get_local_mem_info

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Implement new kgd-kfd interface function get_local_mem_info. Signed-off-by: Harish Kasiviswanathan Signed-off-by: Ben Goz Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 30 +++ drivers/gpu/drm/amd/amdgpu/

[PATCH 05/37] drm/amdkfd: Stop using get_vmem_size KGD-KFD interface

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan get_vmem_size() is deprecated. Instead use get_local_mem_info(). Signed-off-by: Harish Kasiviswanathan Signed-off-by: Ben Goz Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) d

[PATCH 12/37] drm/amdkfd: Coding style cleanup

2017-12-08 Thread Felix Kuehling
From: Kent Russell Minor cleanup that was missed previously because code moved around. Signed-off-by: Kent Russell Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 12 ++-- drivers/gpu/drm/amd/amdkfd/kfd_crat.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_t

[PATCH 10/37] drm/amdkfd: Fix memory leaks in kfd topology

2017-12-08 Thread Felix Kuehling
From: Yong Zhao Kobject created using kobject_create_and_add() can be freed using kobject_put() when there is no referenece any more. However, kobject memory allocated with kzalloc() has to set up a release callback in order to free it when the counter decreases to 0. Otherwise it causes memory l

[PATCH 17/37] drm/amdkfd: Turn verbose topology messages into pr_debug

2017-12-08 Thread Felix Kuehling
Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 17 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/dr

[PATCH 14/37] drm/amdkfd: Decouple CRAT parsing from device list update

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Currently, CRAT parsing is intertwined with topology_device_list and hence repeated calls to kfd_parse_crat_table() will fail. Decouple kfd_parse_crat_table() and topology_device_list. kfd_parse_crat_table() will parse CRAT and add topology devices to a temporary lis

[PATCH 11/37] drm/amdkfd: Group up CRAT related functions

2017-12-08 Thread Felix Kuehling
Take CRAT related functions out of kfd_topology.c and place them in kfd_crat.c. This is the initial step of supporting more CRAT features, i.e. creating virtual CRAT table for KFD devices without CRAT. Signed-off-by: Amber Lin Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/Makefil

[PATCH 09/37] drm/amdkfd: Topology: Fix location_id

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Fix location_id format to match Thunk specification. Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkf

[PATCH 13/37] drm/amdkfd: Reorganize CRAT fetching from ACPI

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Reorganize and rename kfd_topology_get_crat_acpi function. In this way acpi_get_table(..) needs to be called only once. This will also aid in dGPU topology implementation. Signed-off-by: Harish Kasiviswanathan Signed-off-by: Kent Russell Signed-off-by: Felix Kuehli

[PATCH 08/37] drm/amdkfd: Update number of compute unit from KGD

2017-12-08 Thread Felix Kuehling
From: Flora Cui Overwrite the active simd_count from KGD at driver loading time. This is based on assumption that register GC_USER_SHADER_ARRAY_CONFIG won’t get changed. V2: remove the incorrect simd_count reported at loading module. Signed-off-by: Flora Cui Reviewed by: Yair Shachar< yair.sha

[PATCH 02/37] drm/amdgpu: add amdgpu interface to query cu info

2017-12-08 Thread Felix Kuehling
From: Flora Cui Signed-off-by: Flora Cui Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 23 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h

[PATCH 06/37] drm/amdkfd: Remove deprecated get_vmem_size

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 10 -- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 1 - drivers/gp

[PATCH 03/37] drm/amd: Add get_local_mem_info to KGD-KFD interface

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Add get_local_mem_info which provides more information about local memory than get_vmem_size: * public and private framebuffer size * memory clock Signed-off-by: Harish Kasiviswanathan Signed-off-by: Ben Goz Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/i

[PATCH 21/37] drm/amdkfd: Add topology support for dGPUs

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Generate and parse VCRAT tables for dGPUs in kfd_topology_add_device. Some information that isn't available in the CRAT table is patched into the topology after parsing. HSA_CAP_DOORBELL_TYPE_1_0 is dependent on the ASIC feature CP_HQD_PQ_CONTROL.SLOT_BASED_WPTR, wh

[PATCH 15/37] drm/amdkfd: Support enumerating non-GPU devices

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Modify kfd_topology_enum_kfd_devices(..) function to support non-GPU nodes. The function returned NULL when it encountered non-GPU (say CPU) nodes. This caused kfd_ioctl_create_event and kfd_init_apertures to fail for Intel + Tonga. kfd_topology_enum_kfd_devices will

[PATCH 28/37] drm/amdkfd: Add support for displaying VRAM usage

2017-12-08 Thread Felix Kuehling
From: Kent Russell Add a sysfs file in topology (node/x/memory_banks/X/used_memory) that reports the current VRAM usage for that node. Only works for GPU nodes at this time. Signed-off-by: Kent Russell Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 49 ++

[PATCH 29/37] PCI: Add pci_enable_atomic_ops_to_root

2017-12-08 Thread Felix Kuehling
From: Jay Cornwall The PCIe 3.0 AtomicOp (6.15) feature allows atomic transctions to be requested by, routed through and completed by PCIe components. Routing and completion do not require software support. Component support for each is detectable via the DEVCAP2 register. AtomicOp requests are

[PATCH 07/37] drm/amd: Remove get_vmem_size from KGD-KFD interface

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_inte

[PATCH 00/37] KFD dGPU topology and initialization

2017-12-08 Thread Felix Kuehling
This patch series adds support for dGPU topology to KFD and implements everything needed to initialize KFD on dGPUs. This is still missing dGPU memory management APIs, so it's not going to be able to run any user mode tests yet. But device information about CPUs and supported dGPUs should be repor

[PATCH 27/37] drm/amdgpu: Add support for reporting VRAM usage

2017-12-08 Thread Felix Kuehling
From: Kent Russell Add functions to report the vram_usage from the amdgpu_device Signed-off-by: Kent Russell Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 1 + drivers/gpu/drm/amd/amdgpu/amd

[PATCH 24/37] drm/amdkfd: Add AQL Queue Memory flag on topology

2017-12-08 Thread Felix Kuehling
From: Ben Goz This is needed for enabling a user-mode workaround for an AQL queue wrapping HW bug on Tonga. Signed-off-by: Ben Goz Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 1 + 2 files changed, 5 insertio

[PATCH 20/37] drm/amdkfd: Add topology support for CPUs

2017-12-08 Thread Felix Kuehling
Currently, the KFD topology information is generated by parsing the CRAT (ACPI) table. However, at present CRAT table is available only for AMD APUs. To support CPUs on systems without a CRAT table, the KFD driver will create a Virtual CRAT (VCRAT) table and then the existing code will parse this t

[PATCH 16/37] drm/amdkfd: sync IOLINK defines to thunk spec

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Current thunk spec v1.07 dated Feb 1, 2016 Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_crat.h | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH 18/37] drm/amdkfd: Simplify counting of memory banks

2017-12-08 Thread Felix Kuehling
Only count memory banks in one place. Ignore redundant num_banks entry in crat_subtype_computeunit. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 14 ++ drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 1

[PATCH 25/37] drm/amdkfd: Module option to disable CRAT table

2017-12-08 Thread Felix Kuehling
Some systems have broken CRAT tables. Add a module option to ignore a CRAT table. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 5 + drivers/gpu/drm/amd/amdkfd/kfd_module.c | 5 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 ++ 3 files changed, 16 insert

[PATCH 22/37] drm/amdkfd: Add perf counters to topology

2017-12-08 Thread Felix Kuehling
From: Amber Lin For hardware blocks whose performance counters are accessed via MMIO registers, KFD provides the support for those privileged blocks. IOMMU is one of those privileged blocks. Most performance counter properties required by Thunk are available at /sys/bus/event_source/devices/amd_i

[PATCH 19/37] drm/amdkfd: Fix sibling_map[] size

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Change kfd_cache_properties.sibling_map[256] to kfd_cache_properties.sibling_map[32]. Since, CRAT uses bitmap for sibling_map, it is more efficient to use bitmap in the kfd structure also. Signed-off-by: Harish Kasiviswanathan Signed-off-by: Felix Kuehling --- dri

[PATCH 26/37] drm/amdkfd: Ignore ACPI CRAT for non-APU systems

2017-12-08 Thread Felix Kuehling
From: Harish Kasiviswanathan Some AMD motherboards without an APU have a broken CRAT table which causes KFD initialization failures or incorrect information about NUMA nodes, CPU cores or system memory. Ignore CRAT tables without GPUs and rely on KFD's code to create a CRAT table for the CPU. Si

[PATCH 23/37] drm/amdkfd: Fixup incorrect info in the CZ CRAT table

2017-12-08 Thread Felix Kuehling
From: Philip Cox * Wrong value for max_waves_per_simd * Missing ATC capability bit Signed-off-by: Philip Cox Signed-off-by: Kent Russell Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dr

[PATCH 30/37] drm/amdkfd: Conditionally enable PCIe atomics

2017-12-08 Thread Felix Kuehling
This will be needed for most dGPUs. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 13 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/

[PATCH 32/37] drm/amdkfd: Make sched_policy a per-device setting

2017-12-08 Thread Felix Kuehling
Some dGPUs don't support HWS. Allow them to use a per-device sched_policy that may be different from the global default. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c| 3 ++- drivers/gpu/drm/amd

[PATCH 31/37] drm/amdkfd: Make IOMMUv2 code conditional

2017-12-08 Thread Felix Kuehling
dGPUs work without IOMMUv2. Make IOMMUv2 initialization dependent on ASIC information. Also allow building KFD without IOMMUv2 support. This is still useful for dGPUs and prepares for enabling KFD on architectures that don't support AMD IOMMUv2. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/

[PATCH 33/37] drm/amdkfd: Add dGPU support to the device queue manager

2017-12-08 Thread Felix Kuehling
GFXv7 and v8 dGPUs use a different addressing mode for KFD compared to APUs (GPUVM64 vs HSA64). And dGPUs don't support MTYPE_CC. They use MTYPE_UC instead for memory that requires coherency. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 11 +++ .../gpu/d

[PATCH 35/37] drm/amdkfd: Add dGPU support to kernel_queue_init

2017-12-08 Thread Felix Kuehling
Recognize dGPU ASIC families. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c index 5dc6567..69f4964 100644 ---

[PATCH 37/37] drm/amdgpu: Enable KFD initialization on dGPUs

2017-12-08 Thread Felix Kuehling
Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index 51284bf..27878cc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdk

[PATCH 36/37] drm/amdkfd: Add dGPU device IDs and device info

2017-12-08 Thread Felix Kuehling
Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 153 +++- 1 file changed, 151 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index b133fba..df9972b 100644 --- a/

[PATCH 34/37] drm/amdkfd: Add dGPU support to the MQD manager

2017-12-08 Thread Felix Kuehling
On dGPUs don't set ATC addressing bits and use MTYPE_UC for coherent memory. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 7 + drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 35 ++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v