snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes%s.bin",
                ucode_prefix,
                pipe == AMDGPU_MES_SCHED_PIPE ? "" : "1");
-       r = request_firmware(&adev->mes.fw[pipe], fw_name, adev->dev);
-       if (r)
-               goto out;
-
-       r = amdgpu_ucode_validate(adev->mes.fw[pipe]);
+       r = amdgpu_ucode_request(adev, &adev->mes.fw[pipe], fw_name);
        if (r)
                goto out;
 
        }
 
        return 0;
-
 out:
-       release_firmware(adev->mes.fw[pipe]);
-       adev->mes.fw[pipe] = NULL;
+       amdgpu_ucode_release(&adev->mes.fw[pipe]);
        return r;
 }
 
        .resume_gang = mes_v10_1_resume_gang,
 };
 
-static void mes_v10_1_free_microcode(struct amdgpu_device *adev,
-                                    enum admgpu_mes_pipe pipe)
-{
-       release_firmware(adev->mes.fw[pipe]);
-       adev->mes.fw[pipe] = NULL;
-}
-
 static int mes_v10_1_allocate_ucode_buffer(struct amdgpu_device *adev,
                                           enum admgpu_mes_pipe pipe)
 {
                amdgpu_bo_free_kernel(&adev->mes.eop_gpu_obj[pipe],
                                      &adev->mes.eop_gpu_addr[pipe],
                                      NULL);
-
-               mes_v10_1_free_microcode(adev, pipe);
+               amdgpu_ucode_release(&adev->mes.fw[pipe]);
        }
 
        amdgpu_bo_free_kernel(&adev->gfx.kiq.ring.mqd_obj,
 
        .misc_op = mes_v11_0_misc_op,
 };
 
-static void mes_v11_0_free_microcode(struct amdgpu_device *adev,
-                                    enum admgpu_mes_pipe pipe)
-{
-       release_firmware(adev->mes.fw[pipe]);
-       adev->mes.fw[pipe] = NULL;
-}
-
 static int mes_v11_0_allocate_ucode_buffer(struct amdgpu_device *adev,
                                           enum admgpu_mes_pipe pipe)
 {
                amdgpu_bo_free_kernel(&adev->mes.eop_gpu_obj[pipe],
                                      &adev->mes.eop_gpu_addr[pipe],
                                      NULL);
-
-               mes_v11_0_free_microcode(adev, pipe);
+               amdgpu_ucode_release(&adev->mes.fw[pipe]);
        }
 
        amdgpu_bo_free_kernel(&adev->gfx.kiq.ring.mqd_obj,