summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2022-02-06 19:55:03 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-05-05 23:51:51 +0300
commitf40fc1916ce8243c48cdfcdb97ba51a012c78af9 (patch)
tree934b20f9c07f30cdc90f7294c917a5f4cc70cbac /drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
parent9fa57397d933a83f5fafc2e3bd4ab3626bf9aed9 (diff)
downloadlinux-f40fc1916ce8243c48cdfcdb97ba51a012c78af9.tar.xz
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: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Likun Gao <Likun.Gao@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index 61db2a378008..f1c73c5a0507 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -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)