Rex Zhu
26f527810b
drm/amd/pp: implement function notify_cac_buffer_info on VI
...
Used for smu power logging.
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-10-19 15:26:52 -04:00
Rex Zhu
52afb85e66
drm/amd/pp: implement function notify_cac_buffer_info on Vega
...
Used for smu power logging.
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-10-19 15:26:51 -04:00
Satyajit Sahu
f7c5798c6d
drm/amd/powerplay: get the temperature on CZ
...
Setting the function pointer to the get the temperature on CZ.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-19 15:26:50 -04:00
Rex Zhu
4b6aca2f59
drm/amd/powerplay: fix mclk can't switch on Tonga
...
regression issue caused by
commit 47047263c5
("drm/amd/powerplay: delete eventmgr related files.")
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-10-06 17:43:51 -04:00
Tom St Denis
1756f1bbdd
drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display()
...
This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and fixes
the noise issues on Tonga.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 17:43:49 -04:00
Evan Quan
de19603691
drm/amd/powerplay: fix typo on avfs disable
...
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-06 17:43:47 -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
Evan Quan
64e66cffdb
drm/amd/powerplay: fixed wrong return value on error (v2)
...
v2: squash in typo fix (Tom)
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 16:50:36 -04:00
Dave Airlie
6cdb91e281
amdgpu/pp: constify soft_dummy_pp_table.
...
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-29 12:24:38 -04:00
Rex Zhu
ce440e3a0c
drm/amd/powerplay: change dmesg log level in powerplay
...
Use pr_debug to prevent spamming unimportant dmesg.
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-28 16:03:35 -04:00
Dave Airlie
7a88ef02c7
amdgpu/pp: reduce size of vega10_fuses_default
...
I've no idea why this is like this, why store 64-bit fields
as a string, and then parse the strings, this is just over
engineered.
Reduce the size of the amdgpu.o by 80k.
text data bss dec hex filename
1331332 17982 1008 1350322 149ab2 amdgpu.o
1244668 17982 1008 1263658 13482a amdgpu.o
Acked-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Alex Deucer <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:28 -04:00
Dave Airlie
2b6a81f437
drm/amdgpu: use designated initialiser for thermal_irq_src.
...
This fixes the 0-day build warning.
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:27 -04:00
Dave Airlie
819c4b949d
amdgpu/pp: move amdgpu_fuses_default into static const.
...
There is no reason that this gets passed back into the function
from outside the file, just reference the table directly.
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:26 -04:00
Dave Airlie
f87c379ee0
amdgpu/pp: move PhwVega10_Magic to static const.
...
This isn't used outside this file.
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:26 -04:00
Dave Airlie
30b58a248a
drm/amdgpu/vega10: static constify channel_number
...
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
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
Dave Airlie
ba3b6c4273
amdgpu/powerplay: constify large struct
...
This moves this from being global data to global rodata, I'm
sure it would be easy to move it to being local data.
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:23 -04:00
Rex Zhu
d92cb1629b
drm/amd/powerplay: add new helper functions in hwmgr.h
...
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:29 -04:00
Rex Zhu
b3b030520d
drm/amd/powerplay: refine powerplay code.
...
delete struct smumgr, put smu backend function table
in struct hwmgr
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:27 -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
6042e8560e
drm/amd/powerplay: refine phm_register_thermal_interrupt interface
...
currently, not all asics implement this callback function
so not return error to avoid powerplay initialize failed
in those asices
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:19 -04:00
Eric Huang
fafa359840
drm/amd/powerplay: change alert temperature range
...
Change to more meaningful range that triggers thermal
interrupts.
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 15:14:18 -04:00
Eric Huang
a1665a55c8
drm/amd/powerplay: implement register thermal interrupt for Vega10
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 15:14:17 -04:00
Eric Huang
2a5b64c9fc
drm/amd/powerplay: add register thermal interrupt in hwmgr_hw_init
...
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 15:14:16 -04:00
Rex Zhu
0596df6b09
drm/amd/powerplay: Simplify smu7_voting_clients()
...
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 13:07:01 -04:00
Rex Zhu
86457c3b21
drm/amd/powerplay: Add support for CI asics to hwmgr
...
Add support for CI asics (Bonaire, Hawaii) to
the powerplay hwmgr
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 13:06:59 -04:00
Rex Zhu
970d9804b0
drm/amd/powerplay: Add support functions for CI to ppatomctrl.c
...
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 13:06:59 -04:00
Rex Zhu
89c67699ad
drm/amd/powerplay: refine dmesg info under powerplay
...
Use pr_debug to prevent spamming unimportant dmesg.
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 13:06:58 -04:00
Rex Zhu
2a527680a1
drm/amd/powerplay: fix set target TDP error on tonga/iceland
...
ConfigurableTDP do not exist from Fiji.
so only use in previous ASIC.
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 13:06:58 -04:00
Rex Zhu
e71b7ae673
drm/amd/powerplay: fix spelling typo in function name
...
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-09-18 23:30:36 -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
Rex Zhu
06d31a69ca
drm/amd/powerplay: refine powerplay code for CZ/ST
...
1. add function points instand of creat function tables
2. implement stop dpm tasks for CZ/ST
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
Rex Zhu
1ab4720441
drm/amd/powerplay: refine code for thermal control in powerplay
...
add function point start_thermal_controller in hwmgr,
delete thermal function table and related functions
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:31 -04:00
Linus Torvalds
02cfe977e8
Merge tag 'drm-fixes-for-v4.14-rc1' of git://people.freedesktop.org/~airlied/linux
...
Pull drm AMD fixes from Dave Airlie:
"Just had a single AMD fixes pull from Alex for rc1"
* tag 'drm-fixes-for-v4.14-rc1' of git://people.freedesktop.org/~airlied/linux:
drm/amdgpu: revert "fix deadlock of reservation between cs and gpu reset v2"
drm/amdgpu: remove duplicate return statement
drm/amdgpu: check memory allocation failure
drm/amd/amdgpu: fix BANK_SELECT on Vega10 (v2)
drm/amdgpu: inline amdgpu_ttm_do_bind again
drm/amdgpu: fix amdgpu_ttm_bind
drm/amdgpu: remove the GART copy hack
drm/ttm:fix wrong decoding of bo_count
drm/ttm: fix missing inc bo_count
drm/amdgpu: set sched_hw_submission higher for KIQ (v3)
drm/amdgpu: move default gart size setting into gmc modules
drm/amdgpu: refine default gart size
drm/amd/powerplay: ACG frequency added in PPTable
drm/amdgpu: discard commands of killed processes
drm/amdgpu: fix and cleanup shadow handling
drm/amdgpu: add automatic per asic settings for gart_size
drm/amdgpu/gfx8: fix spelling typo in mqd allocation
drm/amd/powerplay: unhalt mec after loading
drm/amdgpu/virtual_dce: Virtual display doesn't support disable vblank immediately
drm/amdgpu: Fix huge page updates with CPU
2017-09-15 17:52:52 -07:00
Tom St Denis
c9232d9ee8
drm/amd/powerplay: lock grbm_gfx index when changing instance
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:11 -04:00
Tom St Denis
9f8ccae9d6
drm/amd/powerplay: Tidy up smu7_enable_didt()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:10 -04:00
Tom St Denis
0120ad13ac
drm/amd/powerplay: Make use of PP_CAP in smu7_powertune.c
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:09 -04:00
Tom St Denis
a10ad69c83
drm/amd/powerplay: Remove unneeded return from pp_smu7_thermal_fini()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:09 -04:00
Tom St Denis
30f111fca0
drm/amd/powerplay: Make use of PP_CAP in smu7_thermal.c
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:08 -04:00
Tom St Denis
3efabd5eda
drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_rpm()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:08 -04:00
Tom St Denis
8b39f031b7
drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_info()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:07 -04:00
Himanshu Jha
4a00f21db8
drm/amd/powerplay: remove unnecessary call to memset
...
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.
Semantic patch used to resolve this issue:
@@
expression e,e2; constant c;
statement S;
@@
e = kzalloc(e2, c);
if(e == NULL) S
- memset(e, 0, e2);
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:55 -04:00
Tom St Denis
298e87c95f
drm/amd/powerplay: Tidy up vega10_thermal_initialize()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:36 -04:00
Tom St Denis
23db59e48a
drm/amd/powerplay: Tidy up vega10_thermal_set_temperature_range()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:29 -04:00
Tom St Denis
657b1f4697
drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_fan_speed_rpm()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:22 -04:00
Tom St Denis
1f9ba3bec6
drm/amd/powerplay: Fix indentation in vega10_fan_ctrl_reset_fan_speed_to_default()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-12 14:32:14 -04:00