diff options
author | Eric Huang <JinHuiEric.Huang@amd.com> | 2016-05-24 15:11:17 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 14:50:55 -0400 |
commit | f2bdc05f773ea68d31e2d50b9e791b7c7dcd1dfa (patch) | |
tree | c96bdf08a1ad3d8c22a8475779996aa8cb869ff7 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 6bb6b2972d0affe1f86881d64c787627b916c17e (diff) |
drm/amdgpu: add the common code to support mclk OD
This implements mclk OverDrive(OD) through sysfs.
The new entry pp_mclk_od is read/write. The value of input/output
is an integer of the overclocking percentage.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index bf398a421de6..33bc79e378e1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -1563,6 +1563,8 @@ struct amdgpu_dpm_funcs { | |||
1563 | int (*print_clock_levels)(struct amdgpu_device *adev, enum pp_clock_type type, char *buf); | 1563 | int (*print_clock_levels)(struct amdgpu_device *adev, enum pp_clock_type type, char *buf); |
1564 | int (*get_sclk_od)(struct amdgpu_device *adev); | 1564 | int (*get_sclk_od)(struct amdgpu_device *adev); |
1565 | int (*set_sclk_od)(struct amdgpu_device *adev, uint32_t value); | 1565 | int (*set_sclk_od)(struct amdgpu_device *adev, uint32_t value); |
1566 | int (*get_mclk_od)(struct amdgpu_device *adev); | ||
1567 | int (*set_mclk_od)(struct amdgpu_device *adev, uint32_t value); | ||
1566 | }; | 1568 | }; |
1567 | 1569 | ||
1568 | struct amdgpu_dpm { | 1570 | struct amdgpu_dpm { |
@@ -2351,6 +2353,12 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
2351 | #define amdgpu_dpm_set_sclk_od(adev, value) \ | 2353 | #define amdgpu_dpm_set_sclk_od(adev, value) \ |
2352 | (adev)->powerplay.pp_funcs->set_sclk_od((adev)->powerplay.pp_handle, value) | 2354 | (adev)->powerplay.pp_funcs->set_sclk_od((adev)->powerplay.pp_handle, value) |
2353 | 2355 | ||
2356 | #define amdgpu_dpm_get_mclk_od(adev) \ | ||
2357 | ((adev)->powerplay.pp_funcs->get_mclk_od((adev)->powerplay.pp_handle)) | ||
2358 | |||
2359 | #define amdgpu_dpm_set_mclk_od(adev, value) \ | ||
2360 | ((adev)->powerplay.pp_funcs->set_mclk_od((adev)->powerplay.pp_handle, value)) | ||
2361 | |||
2354 | #define amdgpu_dpm_dispatch_task(adev, event_id, input, output) \ | 2362 | #define amdgpu_dpm_dispatch_task(adev, event_id, input, output) \ |
2355 | (adev)->powerplay.pp_funcs->dispatch_tasks((adev)->powerplay.pp_handle, (event_id), (input), (output)) | 2363 | (adev)->powerplay.pp_funcs->dispatch_tasks((adev)->powerplay.pp_handle, (event_id), (input), (output)) |
2356 | 2364 | ||