Merge tag 'drm-fixes-2022-11-25' of git://anongit.freedesktop.org/drm/drm
[sfrench/cifs-2.6.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_gmc.c
index b06cb0bb166c514c8b16b003acb7cfc3ce7ece7e..28612e56d0d45007e9c36248a1db4d1013f0fd30 100644 (file)
@@ -479,6 +479,12 @@ int amdgpu_gmc_allocate_vm_inv_eng(struct amdgpu_device *adev)
        unsigned i;
        unsigned vmhub, inv_eng;
 
+       if (adev->enable_mes) {
+               /* reserve engine 5 for firmware */
+               for (vmhub = 0; vmhub < AMDGPU_MAX_VMHUBS; vmhub++)
+                       vm_inv_engs[vmhub] &= ~(1 << 5);
+       }
+
        for (i = 0; i < adev->num_rings; ++i) {
                ring = adev->rings[i];
                vmhub = ring->funcs->vmhub;