Commit 13052be5 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

drm/amdgpu: export mmhub get clockgating into gmc

Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d5583d4f
...@@ -814,6 +814,13 @@ static int gmc_v9_0_set_clockgating_state(void *handle, ...@@ -814,6 +814,13 @@ static int gmc_v9_0_set_clockgating_state(void *handle,
return mmhub_v1_0_set_clockgating(adev, state); return mmhub_v1_0_set_clockgating(adev, state);
} }
static void gmc_v9_0_get_clockgating_state(void *handle, u32 *flags)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
mmhub_v1_0_get_clockgating(adev, flags);
}
static int gmc_v9_0_set_powergating_state(void *handle, static int gmc_v9_0_set_powergating_state(void *handle,
enum amd_powergating_state state) enum amd_powergating_state state)
{ {
...@@ -835,6 +842,7 @@ const struct amd_ip_funcs gmc_v9_0_ip_funcs = { ...@@ -835,6 +842,7 @@ const struct amd_ip_funcs gmc_v9_0_ip_funcs = {
.soft_reset = gmc_v9_0_soft_reset, .soft_reset = gmc_v9_0_soft_reset,
.set_clockgating_state = gmc_v9_0_set_clockgating_state, .set_clockgating_state = gmc_v9_0_set_clockgating_state,
.set_powergating_state = gmc_v9_0_set_powergating_state, .set_powergating_state = gmc_v9_0_set_powergating_state,
.get_clockgating_state = gmc_v9_0_get_clockgating_state,
}; };
const struct amdgpu_ip_block_version gmc_v9_0_ip_block = const struct amdgpu_ip_block_version gmc_v9_0_ip_block =
......
...@@ -569,9 +569,8 @@ static int mmhub_v1_0_set_clockgating_state(void *handle, ...@@ -569,9 +569,8 @@ static int mmhub_v1_0_set_clockgating_state(void *handle,
return 0; return 0;
} }
static void mmhub_v1_0_get_clockgating_state(void *handle, u32 *flags) void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags)
{ {
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
int data; int data;
if (amdgpu_sriov_vf(adev)) if (amdgpu_sriov_vf(adev))
...@@ -609,7 +608,6 @@ const struct amd_ip_funcs mmhub_v1_0_ip_funcs = { ...@@ -609,7 +608,6 @@ const struct amd_ip_funcs mmhub_v1_0_ip_funcs = {
.soft_reset = mmhub_v1_0_soft_reset, .soft_reset = mmhub_v1_0_soft_reset,
.set_clockgating_state = mmhub_v1_0_set_clockgating_state, .set_clockgating_state = mmhub_v1_0_set_clockgating_state,
.set_powergating_state = mmhub_v1_0_set_powergating_state, .set_powergating_state = mmhub_v1_0_set_powergating_state,
.get_clockgating_state = mmhub_v1_0_get_clockgating_state,
}; };
const struct amdgpu_ip_block_version mmhub_v1_0_ip_block = const struct amdgpu_ip_block_version mmhub_v1_0_ip_block =
......
...@@ -31,6 +31,7 @@ void mmhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev, ...@@ -31,6 +31,7 @@ void mmhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
void mmhub_v1_0_init(struct amdgpu_device *adev); void mmhub_v1_0_init(struct amdgpu_device *adev);
int mmhub_v1_0_set_clockgating(struct amdgpu_device *adev, int mmhub_v1_0_set_clockgating(struct amdgpu_device *adev,
enum amd_clockgating_state state); enum amd_clockgating_state state);
void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags);
extern const struct amd_ip_funcs mmhub_v1_0_ip_funcs; extern const struct amd_ip_funcs mmhub_v1_0_ip_funcs;
extern const struct amdgpu_ip_block_version mmhub_v1_0_ip_block; extern const struct amdgpu_ip_block_version mmhub_v1_0_ip_block;
......
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