diff options
author | Huang Rui <ray.huang@amd.com> | 2017-05-31 11:35:44 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-06-06 16:58:56 -0400 |
commit | 13052be59a301ab4cf10f614f0abdbce6b384c49 (patch) | |
tree | 0c15ce44f243f099c16e4a93d95c11f47b460ef0 | |
parent | d5583d4f69c4db863d4d56ba2a3ec2333220f864 (diff) |
drm/amdgpu: export mmhub get clockgating into gmc
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index e86c1803396f..4ab8338befd5 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |||
@@ -814,6 +814,13 @@ static int gmc_v9_0_set_clockgating_state(void *handle, | |||
814 | return mmhub_v1_0_set_clockgating(adev, state); | 814 | return mmhub_v1_0_set_clockgating(adev, state); |
815 | } | 815 | } |
816 | 816 | ||
817 | static void gmc_v9_0_get_clockgating_state(void *handle, u32 *flags) | ||
818 | { | ||
819 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | ||
820 | |||
821 | mmhub_v1_0_get_clockgating(adev, flags); | ||
822 | } | ||
823 | |||
817 | static int gmc_v9_0_set_powergating_state(void *handle, | 824 | static int gmc_v9_0_set_powergating_state(void *handle, |
818 | enum amd_powergating_state state) | 825 | enum amd_powergating_state state) |
819 | { | 826 | { |
@@ -835,6 +842,7 @@ const struct amd_ip_funcs gmc_v9_0_ip_funcs = { | |||
835 | .soft_reset = gmc_v9_0_soft_reset, | 842 | .soft_reset = gmc_v9_0_soft_reset, |
836 | .set_clockgating_state = gmc_v9_0_set_clockgating_state, | 843 | .set_clockgating_state = gmc_v9_0_set_clockgating_state, |
837 | .set_powergating_state = gmc_v9_0_set_powergating_state, | 844 | .set_powergating_state = gmc_v9_0_set_powergating_state, |
845 | .get_clockgating_state = gmc_v9_0_get_clockgating_state, | ||
838 | }; | 846 | }; |
839 | 847 | ||
840 | const struct amdgpu_ip_block_version gmc_v9_0_ip_block = | 848 | const struct amdgpu_ip_block_version gmc_v9_0_ip_block = |
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c index 7a7177b423e8..d95380efcf8c 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | |||
@@ -569,9 +569,8 @@ static int mmhub_v1_0_set_clockgating_state(void *handle, | |||
569 | return 0; | 569 | return 0; |
570 | } | 570 | } |
571 | 571 | ||
572 | static void mmhub_v1_0_get_clockgating_state(void *handle, u32 *flags) | 572 | void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags) |
573 | { | 573 | { |
574 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | ||
575 | int data; | 574 | int data; |
576 | 575 | ||
577 | if (amdgpu_sriov_vf(adev)) | 576 | if (amdgpu_sriov_vf(adev)) |
@@ -609,7 +608,6 @@ const struct amd_ip_funcs mmhub_v1_0_ip_funcs = { | |||
609 | .soft_reset = mmhub_v1_0_soft_reset, | 608 | .soft_reset = mmhub_v1_0_soft_reset, |
610 | .set_clockgating_state = mmhub_v1_0_set_clockgating_state, | 609 | .set_clockgating_state = mmhub_v1_0_set_clockgating_state, |
611 | .set_powergating_state = mmhub_v1_0_set_powergating_state, | 610 | .set_powergating_state = mmhub_v1_0_set_powergating_state, |
612 | .get_clockgating_state = mmhub_v1_0_get_clockgating_state, | ||
613 | }; | 611 | }; |
614 | 612 | ||
615 | const struct amdgpu_ip_block_version mmhub_v1_0_ip_block = | 613 | const struct amdgpu_ip_block_version mmhub_v1_0_ip_block = |
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h index d9ca98545810..bbfacbcdc4a2 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | |||
@@ -31,6 +31,7 @@ void mmhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev, | |||
31 | void mmhub_v1_0_init(struct amdgpu_device *adev); | 31 | void mmhub_v1_0_init(struct amdgpu_device *adev); |
32 | int mmhub_v1_0_set_clockgating(struct amdgpu_device *adev, | 32 | int mmhub_v1_0_set_clockgating(struct amdgpu_device *adev, |
33 | enum amd_clockgating_state state); | 33 | enum amd_clockgating_state state); |
34 | void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags); | ||
34 | 35 | ||
35 | extern const struct amd_ip_funcs mmhub_v1_0_ip_funcs; | 36 | extern const struct amd_ip_funcs mmhub_v1_0_ip_funcs; |
36 | extern const struct amdgpu_ip_block_version mmhub_v1_0_ip_block; | 37 | extern const struct amdgpu_ip_block_version mmhub_v1_0_ip_block; |