From: Ben Goz Date: Tue, 13 Jan 2015 09:18:06 +0000 (+0200) Subject: drm/amdkfd: Fix for-loop when allocating HQD (non-HWS) X-Git-Tag: fixes-v4.0-rc1~91^2~38^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0ec5b9905ca8dfc44c6419dc068a335208398a7;p=pandora-kernel.git drm/amdkfd: Fix for-loop when allocating HQD (non-HWS) This patch fixes a minor bug in allocate_hqd(), where the loop run from the next-to-allocate pipe until the number of pipes. This is wrong because we need to consider the possibility where next-to-allocate pipe is not 0, and thus, the for-loop only checks part of the pipes and doesn't wrap-around, as it supposed to do. Therefore, we add another counting variable to make sure we go over all the pipes, regardless of where we start to look at the first iteration of the loop. This bug only affected non-HWS mode. In HWS mode, the CP fw is responsible for allocating the HQD. Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay Acked-by: Alex Deucher --- Reading git-diff-tree failed