drm/amdgpu: fix bug when amdkfd destroys hqd
authorOded Gabbay <oded.gabbay@gmail.com>
Wed, 29 Jul 2015 07:33:06 +0000 (10:33 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 30 Jul 2015 06:26:00 +0000 (09:26 +0300)
The wrong define was used to check if the hqd is still active

v2: Don't use SHIFT as the MASK is already shifted

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c

index 2daad335b8095a1de57f4befb10794db6c0643e4..dd2037bc0b4afa265435cdc3c27b4ddc2af0071b 100644 (file)
@@ -450,7 +450,7 @@ static int kgd_hqd_destroy(struct kgd_dev *kgd, uint32_t reset_type,
 
        while (true) {
                temp = RREG32(mmCP_HQD_ACTIVE);
-               if (temp & CP_HQD_ACTIVE__ACTIVE__SHIFT)
+               if (temp & CP_HQD_ACTIVE__ACTIVE_MASK)
                        break;
                if (timeout == 0) {
                        pr_err("kfd: cp queue preemption time out (%dms)\n",