Rex Zhu
923a50a686
drm/amd/pp: Implement force_dpm_level on Rv
...
user can change dpm level on Rv through sysfs
v3: add smu version check
v2: fix no return statement
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-20 11:59:40 -05:00
Rex Zhu
29411f05c6
drm/amd/pp: delete dead code of arbiter overdriver clk
...
for sclk/mclk, can be adjusted through sysfs.
for uvd/vce clk, will be adjusted case by case when
requested.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-19 12:11:57 -05:00
Rex Zhu
7364d60882
drm/amd/pp: implement dpm_get_sclk/mclk for RV
...
RV implementation was missing these callbacks. Used
to fetch the clock values for other components.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-13 17:31:01 -05:00
Evan Quan
0722382dcc
drm/amd/powerplay: retrieve the real-time coreClock values
...
- Currently, the coreClock value for min/max performance level on raven
is hard-coded. Use the real-time value retrieved by GetGfxMinFreqLimit
and GetGfxMaxFreqLimit PPSMC messages
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-25 23:09:38 -04:00
Evan Quan
5f628d997d
drm/amd/powerplay: get raven sclk and mclk levels (v2)
...
v2: squash in rebase fix (Tom)
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 17:43:44 -04:00
Evan Quan
88ed3377d0
drm/amd/powerplay: get raven current sclk and mclk (v2)
...
v2: squash in rebase fix (Tom)
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 17:43:42 -04:00
Evan Quan
2b95315a58
drm/amd/powerplay: get raven max/min gfx clocks (v2)
...
v2: squash in rebase fix (Tom)
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 17:43:40 -04:00
Dave Airlie
706e25f241
drm/amdgpu/pp: constify some powerplay tables
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-28 16:03:24 -04:00
Rex Zhu
d3f8c0abf4
drm/amd/powerplay: refine interface in struct pp_smumgr_func
...
unify to use struct hwmgr as function parameter in
smumgr.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 15:14:26 -04:00
Rex Zhu
f93f0c3a7e
drm/amd/powerplay: use struct amd_pm_funcs in powerplay
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-18 23:30:34 -04:00
Rex Zhu
698f88e697
drm/amd/powerplay: delete dead code in powerplay
...
delete functiontable related codes
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-18 23:30:33 -04:00
Rex Zhu
cf2623d951
drm/amd/powerplay: refine powerplay code for RV
...
use function points instand of function table.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-18 23:30:32 -04:00
Himanshu Jha
ebe02de2c6
drm/amd/powerplay/hwmgr: Remove null check before kfree
...
kfree on NULL pointer is a no-op and therefore checking is redundant.
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:57:33 -04:00
Rex Zhu
841e3be124
drm/amd/powerplay: notify smu once display changed on Rv.
...
when User turn off display or screen idle timeout,
smu need this message to start S0i2 entry.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:01 -04:00
Rex Zhu
e154162ef7
drm/amd/powerplay: refine pp code for raven
...
delete useless code.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:28:00 -04:00
Junwei Zhang
b59eb8984f
drm/amd/powerplay: add vclk/dclkSoftMin support for raven
...
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:46:01 -04:00
Hawking Zhang
95ef1f53c5
drm/amd/powerplay: fix memory leak in rv_hwmgr backend
...
vddc_dep_on_dal_pwrl and vq_budgeting_table are allocated and initialized
in rv_hwmgr_backend_init. Thus free the memory in rv_hwmgr_backend_fini
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-06-06 17:01:05 -04:00
Hawking Zhang
5001793d37
drm/amd/powerplay: set powerplay support cap on raven
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-25 16:12:58 -04:00
Hawking Zhang
efb792c4b2
drm/amd/powerplay: add get_temperature interface for raven
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-25 16:12:27 -04:00
Hawking Zhang
5746f36dac
drm/amd/powerplay: update magic number for rv hw backend
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-25 16:12:12 -04:00
Hawking Zhang
f0846b24b6
drm/amd/powerplay: using MinFClock/MaxFclock to report Min/Max memory clock limits
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-25 16:11:58 -04:00
Rex Zhu
cd70f3d6e3
drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:31:55 -04:00
Rex Zhu
8f5508617b
drm/amd/powerplay: add function set_clock_limit for Rv.
...
Sets floors for various clocks depending on current
requirements.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:31:01 -04:00
kbuild test robot
c651fd7c11
drm/amd/powerplay: fix array_size.cocci warnings
...
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:75:42-43: WARNING: Use ARRAY_SIZE
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:466:22-23: WARNING: Use ARRAY_SIZE
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:468:22-23: WARNING: Use ARRAY_SIZE
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:470:20-21: WARNING: Use ARRAY_SIZE
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:473:22-23: WARNING: Use ARRAY_SIZE
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:475:21-22: WARNING: Use ARRAY_SIZE
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:477:21-22: WARNING: Use ARRAY_SIZE
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
Semantic patch information:
This makes an effort to find cases where ARRAY_SIZE can be used such as
where there is a division of sizeof the array by the sizeof its first
element or by any indexed element or the element type. It replaces the
division of the two sizeofs by ARRAY_SIZE.
Generated by: scripts/coccinelle/misc/array_size.cocci
CC: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:58 -04:00
Rex Zhu
a960d61cbd
drm/amd/powerplay: add raven support in hwmgr. (v2)
...
hwmgr handles the GPU power state management.
v2: squash in updates (Alex)
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:52 -04:00