drm/amdgpu: add helper function to do common ras_late_init/fini (v3)
authorHawking Zhang <Hawking.Zhang@amd.com>
Fri, 30 Aug 2019 05:29:18 +0000 (13:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Sep 2019 22:11:04 +0000 (17:11 -0500)
commitb293e891b05701fc89fa2b20bba377513ae92021
tree63a2d94fd43317b7405243b29502ebb40862fc0d
parenta344db8e5e3c312928fd02bfb768ae689107f19b
drm/amdgpu: add helper function to do common ras_late_init/fini (v3)

In late_init for ras, the helper function will be used to
1). disable ras feature if the IP block is masked as disabled
2). send enable feature command if the ip block was masked as enabled
3). create debugfs/sysfs node per IP block
4). register interrupt handler

v2: check ih_info.cb to decide add interrupt handler or not

v3: add ras_late_fini for cleanup all the ras fs node and remove
interrupt handler

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h