summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-11-20 06:14:14 +1000
committerDave Airlie <airlied@redhat.com>2017-11-20 06:14:14 +1000
commit1220a3e5698238c9d5f75dbaacd3938b60048496 (patch)
treed181b9e52e314fbe5c0c7caf78241b03aada8a2f /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
parentf150891fd9878ef0d9197c4e8451ce67c3bdd014 (diff)
parent451cc55dd17fa5130f05629ac8d90e32facf27f6 (diff)
Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next
Misc fixes for 4.15. * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/amd/pp: fix dpm randomly failed on Vega10 drm/amdgpu: set f_mapping on exported DMA-bufs drm/amdgpu: Properly allocate VM invalidate eng v2 drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again drm/amd/amdgpu: Fix wave mask in amdgpu_debugfs_wave_read() (v2) drm/amdgpu: make AMDGPU_VA_RESERVED_SIZE 64bit drm/amdgpu/gfx9: implement wave VGPR reading drm/amdgpu: Add common golden settings for GFX9 drm/amd/powerplay: fix copy-n-paste error on vddci_buf index drm/amdgpu: Fix null pointer issue in amdgpu_cs_wait_any_fence drm/amdgpu: Remove check which is not valid for certain VBIOS
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 621699331e09..c8f1aebeac7a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -392,7 +392,16 @@ static int gmc_v9_0_early_init(void *handle)
static int gmc_v9_0_late_init(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS] = { 3, 3 };
+ /*
+ * The latest engine allocation on gfx9 is:
+ * Engine 0, 1: idle
+ * Engine 2, 3: firmware
+ * Engine 4~13: amdgpu ring, subject to change when ring number changes
+ * Engine 14~15: idle
+ * Engine 16: kfd tlb invalidation
+ * Engine 17: Gart flushes
+ */
+ unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS] = { 4, 4 };
unsigned i;
for(i = 0; i < adev->num_rings; ++i) {
@@ -405,9 +414,9 @@ static int gmc_v9_0_late_init(void *handle)
ring->funcs->vmhub);
}
- /* Engine 17 is used for GART flushes */
+ /* Engine 16 is used for KFD and 17 for GART flushes */
for(i = 0; i < AMDGPU_MAX_VMHUBS; ++i)
- BUG_ON(vm_inv_eng[i] > 17);
+ BUG_ON(vm_inv_eng[i] > 16);
return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0);
}