]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix koops when accessing RAS EEPROM
authorLuben Tuikov <luben.tuikov@amd.com>
Fri, 30 Apr 2021 00:15:42 +0000 (20:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 1 Jul 2021 04:25:33 +0000 (00:25 -0400)
commitaac107208537ca62f6d0193b1312566dc70b88c0
treea8c19dff506f3d0434b3ac9b18c4653e40d483b5
parent6c65615d6226a2d5e30367a69d3cc295aee2016e
drm/amdgpu: Fix koops when accessing RAS EEPROM

Debugfs RAS EEPROM files are available when
the ASIC supports RAS, and when the debugfs is
enabled, an also when "ras_enable" module
parameter is set to 0. However in this case,
we get a kernel oops when accessing some of
the "ras_..." controls in debugfs. The reason
for this is that struct amdgpu_ras::adev is
unset. This commit sets it, thus enabling access
to those facilities. Note that this facilitates
EEPROM access and not necessarily RAS features or
functionality.

Cc: Alexander Deucher <Alexander.Deucher@amd.com>
Cc: John Clements <john.clements@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Acked-by: Alexander Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c