Commit 2af81531 authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher

drm/amdgpu: fix sysfs interface pcie_replay_count error on navi asic

the asic callback function of get_pcie_replay_count is not implement on navi asic,
it will cause null pinter error when read this interface.
Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarKent Russell <kent.russell@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e31dcdcf
...@@ -539,6 +539,16 @@ static bool nv_need_reset_on_init(struct amdgpu_device *adev) ...@@ -539,6 +539,16 @@ static bool nv_need_reset_on_init(struct amdgpu_device *adev)
return false; return false;
} }
static uint64_t nv_get_pcie_replay_count(struct amdgpu_device *adev)
{
/* TODO
* dummy implement for pcie_replay_count sysfs interface
* */
return 0;
}
static void nv_init_doorbell_index(struct amdgpu_device *adev) static void nv_init_doorbell_index(struct amdgpu_device *adev)
{ {
adev->doorbell_index.kiq = AMDGPU_NAVI10_DOORBELL_KIQ; adev->doorbell_index.kiq = AMDGPU_NAVI10_DOORBELL_KIQ;
...@@ -586,6 +596,7 @@ static const struct amdgpu_asic_funcs nv_asic_funcs = ...@@ -586,6 +596,7 @@ static const struct amdgpu_asic_funcs nv_asic_funcs =
.need_full_reset = &nv_need_full_reset, .need_full_reset = &nv_need_full_reset,
.get_pcie_usage = &nv_get_pcie_usage, .get_pcie_usage = &nv_get_pcie_usage,
.need_reset_on_init = &nv_need_reset_on_init, .need_reset_on_init = &nv_need_reset_on_init,
.get_pcie_replay_count = &nv_get_pcie_replay_count,
}; };
static int nv_common_early_init(void *handle) static int nv_common_early_init(void *handle)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment