{
        struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
        struct msm_gpu *gpu = &adreno_gpu->base;
+       const char *sqe_name = adreno_gpu->info->fw[ADRENO_FW_SQE];
        u32 *buf = msm_gem_get_vaddr(obj);
        bool ret = false;
 
         *
         * a660 targets have all the critical security fixes from the start
         */
-       if (adreno_is_a618(adreno_gpu) || adreno_is_a630(adreno_gpu) ||
-           adreno_is_a640_family(adreno_gpu)) {
+       if (!strcmp(sqe_name, "a630_sqe.fw")) {
                /*
                 * If the lowest nibble is 0xa that is an indication that this
                 * microcode has been patched. The actual version is in dword
                DRM_DEV_ERROR(&gpu->pdev->dev,
                        "a630 SQE ucode is too old. Have version %x need at least %x\n",
                        buf[0] & 0xfff, 0x190);
-       } else if (adreno_is_a650(adreno_gpu)) {
+       } else if (!strcmp(sqe_name, "a650_sqe.fw")) {
                if ((buf[0] & 0xfff) >= 0x095) {
                        ret = true;
                        goto out;
                DRM_DEV_ERROR(&gpu->pdev->dev,
                        "a650 SQE ucode is too old. Have version %x need at least %x\n",
                        buf[0] & 0xfff, 0x095);
-       } else if (adreno_is_a660_family(adreno_gpu)) {
+       } else if (!strcmp(sqe_name, "a660_sqe.fw")) {
                ret = true;
        } else {
                DRM_DEV_ERROR(&gpu->pdev->dev,