Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Remove hard-coded assumptions about compute pipes

Remove hard-coded assumption that the first compute pipe is
reserved for amdgpu. Pipe 0 actually means pipe 0 now.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

authored by

Felix Kuehling and committed by
Oded Gabbay
438e29a2 86194cf8

+3 -3
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
··· 186 186 { 187 187 struct amdgpu_device *adev = get_amdgpu_device(kgd); 188 188 189 - uint32_t mec = (++pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1; 189 + uint32_t mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1; 190 190 uint32_t pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec); 191 191 192 192 lock_srbm(kgd, mec, pipe, queue_id, 0);
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
··· 147 147 { 148 148 struct amdgpu_device *adev = get_amdgpu_device(kgd); 149 149 150 - uint32_t mec = (++pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1; 150 + uint32_t mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1; 151 151 uint32_t pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec); 152 152 153 153 lock_srbm(kgd, mec, pipe, queue_id, 0); ··· 216 216 uint32_t mec; 217 217 uint32_t pipe; 218 218 219 - mec = (++pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1; 219 + mec = (pipe_id / adev->gfx.mec.num_pipe_per_mec) + 1; 220 220 pipe = (pipe_id % adev->gfx.mec.num_pipe_per_mec); 221 221 222 222 lock_srbm(kgd, mec, pipe, 0, 0);