]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdkfd: debugfs hang_hws skip GPU with MES
authorPhilip Yang <Philip.Yang@amd.com>
Mon, 10 Feb 2025 14:42:31 +0000 (09:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:19 +0000 (10:45 +0200)
[ Upstream commit fe9d0061c413f8fb8c529b18b592b04170850ded ]

debugfs hang_hws is used by GPU reset test with HWS, for MES this crash
the kernel with NULL pointer access because dqm->packet_mgr is not setup
for MES path.

Skip GPU with MES for now, MES hang_hws debugfs interface will be
supported later.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_device.c

index 9d0b0bf70ad1eaafa98ac2055a26726ce7259127..2786d47961e075e835606c901a60d5c78312682e 100644 (file)
@@ -1388,6 +1388,11 @@ int kfd_debugfs_hang_hws(struct kfd_node *dev)
                return -EINVAL;
        }
 
+       if (dev->kfd->shared_resources.enable_mes) {
+               dev_err(dev->adev->dev, "Inducing MES hang is not supported\n");
+               return -EINVAL;
+       }
+
        return dqm_debugfs_hang_hws(dev->dqm);
 }