提交 f40fc191 编写于 作者: H Hawking Zhang 提交者: Alex Deucher

drm/amdgpu: split mmhub v3_0_2 callbacks from mmhub v3_0

So we don't need to add ip version check in every callback
when there is atc related programming that is only
available in mmhub v3_0
Signed-off-by: NHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: NLikun Gao <Likun.Gao@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 9fa57397
......@@ -37,6 +37,7 @@
#include "nbio_v4_3.h"
#include "gfxhub_v3_0.h"
#include "mmhub_v3_0.h"
#include "mmhub_v3_0_2.h"
#include "athub_v3_0.h"
......@@ -550,7 +551,14 @@ static void gmc_v11_0_set_umc_funcs(struct amdgpu_device *adev)
static void gmc_v11_0_set_mmhub_funcs(struct amdgpu_device *adev)
{
adev->mmhub.funcs = &mmhub_v3_0_funcs;
switch (adev->ip_versions[MMHUB_HWIP][0]) {
case IP_VERSION(3, 0, 2):
adev->mmhub.funcs = &mmhub_v3_0_2_funcs;
break;
default:
adev->mmhub.funcs = &mmhub_v3_0_funcs;
break;
}
}
static void gmc_v11_0_set_gfxhub_funcs(struct amdgpu_device *adev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册