drm/amdgpu: Only create mes event log debugfs when mes is enabled
authorshaoyunl <shaoyun.liu@amd.com>
Wed, 31 Jan 2024 14:20:07 +0000 (09:20 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Feb 2024 15:00:56 +0000 (10:00 -0500)
commit3fad1565720ffd8fc944849ebf21e53b5947c9ed
tree7cd7e920e67bb62505ca20e0a4e6ff6177b3a926
parentfb5a3d037082b52a5c52be647c3936ca7651d7d5
drm/amdgpu: Only create mes event log debugfs when mes is enabled

Skip the debugfs file creation for mes event log if the GPU
doesn't use MES. This to prevent potential kernel oops when
user try to read the event log in debugfs on a GPU without MES

Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c