aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-21 17:16:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-21 17:16:42 -0400
commit24a1635a41bccb5cc426eaef8b88c7e0961ef6bb (patch)
treeeefc2f6d4a2bacd056d119d9331447e227bf5652 /drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
parentf79ec886f994918de057dd224fa2dfdc162bb3c3 (diff)
parent5896ec77d70d33dd38a455b0aa5f3154aeecea09 (diff)
Merge tag 'drm-fixes-for-v4.13-rc2' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "A bunch of fixes for rc2: two imx regressions, vc4 fix, dma-buf fix, some displayport mst fixes, and an amdkfd fix. Nothing too crazy, I assume we just haven't see much rc1 testing yet" * tag 'drm-fixes-for-v4.13-rc2' of git://people.freedesktop.org/~airlied/linux: drm/mst: Avoid processing partially received up/down message transactions drm/mst: Avoid dereferencing a NULL mstb in drm_dp_mst_handle_up_req() drm/mst: Fix error handling during MST sideband message reception drm/imx: parallel-display: Accept drm_of_find_panel_or_bridge failure drm/imx: fix typo in ipu_plane_formats[] drm/vc4: Fix VBLANK handling in crtc->enable() path dma-buf/fence: Avoid use of uninitialised timestamp drm/amdgpu: Remove unused field kgd2kfd_shared_resources.num_mec drm/radeon: Remove initialization of shared_resources.num_mec drm/amdkfd: Remove unused references to shared_resources.num_mec drm/amdgpu: Fix KFD oversubscription by tracking queues correctly
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index 5f8ada1d872b..37971d9402e3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -101,7 +101,6 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev)
101 if (adev->kfd) { 101 if (adev->kfd) {
102 struct kgd2kfd_shared_resources gpu_resources = { 102 struct kgd2kfd_shared_resources gpu_resources = {
103 .compute_vmid_bitmap = 0xFF00, 103 .compute_vmid_bitmap = 0xFF00,
104 .num_mec = adev->gfx.mec.num_mec,
105 .num_pipe_per_mec = adev->gfx.mec.num_pipe_per_mec, 104 .num_pipe_per_mec = adev->gfx.mec.num_pipe_per_mec,
106 .num_queue_per_pipe = adev->gfx.mec.num_queue_per_pipe 105 .num_queue_per_pipe = adev->gfx.mec.num_queue_per_pipe
107 }; 106 };
@@ -122,7 +121,7 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev)
122 121
123 /* According to linux/bitmap.h we shouldn't use bitmap_clear if 122 /* According to linux/bitmap.h we shouldn't use bitmap_clear if
124 * nbits is not compile time constant */ 123 * nbits is not compile time constant */
125 last_valid_bit = adev->gfx.mec.num_mec 124 last_valid_bit = 1 /* only first MEC can have compute queues */
126 * adev->gfx.mec.num_pipe_per_mec 125 * adev->gfx.mec.num_pipe_per_mec
127 * adev->gfx.mec.num_queue_per_pipe; 126 * adev->gfx.mec.num_queue_per_pipe;
128 for (i = last_valid_bit; i < KGD_MAX_QUEUES; ++i) 127 for (i = last_valid_bit; i < KGD_MAX_QUEUES; ++i)