• Ben Goz's avatar
    drm/amdkfd: Fix for-loop when allocating HQD (non-HWS) · f0ec5b99
    Ben Goz authored
    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: default avatarBen Goz <ben.goz@amd.com>
    Signed-off-by: default avatarOded Gabbay <oded.gabbay@amd.com>
    Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    f0ec5b99
kfd_device_queue_manager.c 25.9 KB