diff options
author | Tao Zhou <tao.zhou1@amd.com> | 2019-09-19 11:46:11 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-10-03 09:11:02 -0500 |
commit | 41190cd73341060f2e7494a77131bb1f56e68fa1 (patch) | |
tree | fe702915c764b8305fc82d531c84fbee6d98050a /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | |
parent | 56c54b25c3b60a64d4ffd7b6b2a309b3febcfdd4 (diff) | |
download | linux-41190cd73341060f2e7494a77131bb1f56e68fa1.tar.gz linux-41190cd73341060f2e7494a77131bb1f56e68fa1.tar.bz2 linux-41190cd73341060f2e7494a77131bb1f56e68fa1.zip |
drm/amdgpu: remove ih_info parameter of gfx_ras_late_init
gfx_ras_late_init can get the info by itself
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index aaa86a8fb6b6..1b7a022996f6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -571,18 +571,16 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable) mutex_unlock(&adev->gfx.gfx_off_mutex); } -int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, - void *ras_ih_info) +int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev) { int r; - struct ras_ih_if *ih_info = (struct ras_ih_if *)ras_ih_info; struct ras_fs_if fs_info = { .sysfs_name = "gfx_err_count", .debugfs_name = "gfx_err_inject", }; - - if (!ih_info) - return -EINVAL; + struct ras_ih_if ih_info = { + .cb = amdgpu_gfx_process_ras_data_cb, + }; if (!adev->gfx.ras_if) { adev->gfx.ras_if = kmalloc(sizeof(struct ras_common_if), GFP_KERNEL); @@ -593,10 +591,10 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, adev->gfx.ras_if->sub_block_index = 0; strcpy(adev->gfx.ras_if->name, "gfx"); } - fs_info.head = ih_info->head = *adev->gfx.ras_if; + fs_info.head = ih_info.head = *adev->gfx.ras_if; r = amdgpu_ras_late_init(adev, adev->gfx.ras_if, - &fs_info, ih_info); + &fs_info, &ih_info); if (r) goto free; @@ -612,7 +610,7 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, return 0; late_fini: - amdgpu_ras_late_fini(adev, adev->gfx.ras_if, ih_info); + amdgpu_ras_late_fini(adev, adev->gfx.ras_if, &ih_info); free: kfree(adev->gfx.ras_if); adev->gfx.ras_if = NULL; |