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
Christian König
88531913a8
drm/amd: remove min/max addr handling from cgs
...
Nobody is actually using this and it causes a bunch of unused and buggy code.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-13 12:10:13 -04: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
Tom St Denis
0dba3739a7
drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_fan_speed_percent()
...
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:07 -04:00
Tom St Denis
0c69dd0a55
drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_default_mode()
...
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:31:59 -04:00
Tom St Denis
893c3880e4
drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_static_mode()
...
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:31:53 -04:00
Tom St Denis
8c755d9abc
drm/amd/powerplay: Tidy up vega10_fan_ctrl_get_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:31:46 -04:00
Tom St Denis
f85a49bdb6
drm/amd/powerplay: Port vega10_thermal.c over to PP_CAP
...
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:31:39 -04:00
Tom St Denis
0f26b7b03c
drm/amd/powerplay: Port vega10_powertune.c over to PP_CAP
...
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:31:32 -04:00
Tom St Denis
dd5a6fe2af
drm/amd/powerplay: Port vega10_hwmgr.c over to PP_CAP
...
Replace and cleanup lengthy phm_cap_enabled() sequences
with PP_CAP.
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:31:25 -04:00
Tom St Denis
583a888a77
drm/amd/powerplay: Add PP_CAP() macro
...
To replace common lengthy sequence that would create
really long lines all over.
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:31:17 -04:00
Tom St Denis
7246187abf
drm/amd/powerplay: Port vega10_didt_set_mask() to new macros
...
Start using new CGS bitmask macros.
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:31:09 -04:00
Tom St Denis
06474d5665
drm/amd/powerplay: Simplify vega10_acg_disable()
...
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:30:56 -04:00
Tom St Denis
9a5487ef56
drm/amd/powerplay: Simplify vega10_patch_voltage_dependency_tables_with_lookup_table()
...
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:30:48 -04:00
Tom St Denis
64d03abe6e
drm/amd/powerplay: Fix psm_set_user_performance_state()
...
We now pass a pointer to a pointer which seems to be
what they meant in the first place. The previous version
was modifying a pointer passed by value.
Fixes bug that was introduced by
commit 332798d40c2e91:drm/amd/powerplay: delete eventmgr layer in poweprlay
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:23:18 -04:00
Rex Zhu
238e793f47
drm/amd/powerplay: set uvd/vce/nb/mclk level as UMD P-state required
...
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-12 14:22:33 -04:00
Rex Zhu
9947f7047f
drm/amd/powerplay: add UMD P-state in powerplay.
...
This feature is for UMD to run benchmark in a
power state that is as steady as possible. kmd
need to fix the power state as stable as possible.
now, kmd support four level:
profile_standard,peak,min_sclk,min_mclk
move common related code to amd_powerplay.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-12 14:22:23 -04:00
Rex Zhu
47047263c5
drm/amd/powerplay: delete eventmgr related files.
...
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-12 14:22:14 -04:00
Rex Zhu
df1e639420
drm/amd/powerplay: delete eventmgr layer in poweprlay
...
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-12 14:21:50 -04:00
Linus Torvalds
44ccba3f7b
Merge tag 'gcc-plugins-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
...
Pull gcc plugins update from Kees Cook:
"This finishes the porting work on randstruct, and introduces a new
option to structleak, both noted below:
- For the randstruct plugin, enable automatic randomization of
structures that are entirely function pointers (along with a couple
designated initializer fixes).
- For the structleak plugin, provide an option to perform zeroing
initialization of all otherwise uninitialized stack variables that
are passed by reference (Ard Biesheuvel)"
* tag 'gcc-plugins-v4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
gcc-plugins: structleak: add option to init all vars used as byref args
randstruct: Enable function pointer struct detection
drivers/net/wan/z85230.c: Use designated initializers
drm/amd/powerplay: rv: Use designated initializers
2017-09-07 20:30:19 -07:00
Alex Deucher
cd00a424d2
drm/amd/powerplay: fix sclk setting for profile mode for CZ/ST
...
Need to select dpm0 to avoid clock fluctuations.
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-01 15:01:21 -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
Himanshu Jha
c5927537dd
drm/amd: Remove null check before kfree
...
Kfree on NULL pointer is a no-op and therefore checking is redundant.
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:32 -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
3b4ca9e649
drm/amd/powerplay: add dummy pp table for raven. (v2)
...
As there is no PPTable in RV, it is difficult to
cleanly decouple PPTABLE functionality in existing
codes.
v2: agd: squash in clean build fix
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
Alex Deucher
ecf9d34485
drm/amdgpu/powerplay/vega10: fix typo in register base index
...
Probably a copy pasta. No functional difference, both have
the same value.
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reported-by: Michael von Khurja <mvonkhurja@techpowerup.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-29 15:27:57 -04:00
Evan Quan
84d43463a2
drm/amd/powerplay: ACG frequency added in PPTable
...
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-08-29 15:27:42 -04:00
Evan Quan
9dd73b1e89
drm/amd/powerplay: unhalt mec after loading
...
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-08-29 15:27:38 -04:00
Evan Quan
547f1091b9
drm/amd/powerplay: ACG frequency added in PPTable
...
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-08-24 11:48:43 -04:00
Evan Quan
86b03b3321
drm/amd/powerplay: unhalt mec after loading
...
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-08-23 17:18:45 -04:00
Rex Zhu
1266b7f7b3
drm/amd/powerplay: fix coding style in hwmgr.c
...
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-15 14:46:18 -04:00
Rex Zhu
5bbc5c6412
drm/amd/powerplay: refine dmesg info under powerplay.
...
Use pr_debug to prevent spamming unimportant dmesg.
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-15 14:46:18 -04:00
Rex Zhu
7804fd1c47
drm/amd/powerplay: fix coccinelle warnings in vega10_hwmgr.c
...
delete unneeded semicolon.
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-15 14:46:14 -04:00
Alex Deucher
d45aec0536
drm/amd/powerplay: add CZ profile support
...
Support the profiling modes for sclk.
v2: delete profileing mode for mclk.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Tested-and-Reviewed-by Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2017-08-15 14:46:11 -04:00
Rex Zhu
becdaf3f4a
drm/amd/powerplay: fix PSI not enabled by kmd
...
cherry-pick from windows driver.
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-15 14:46:10 -04:00
Rex Zhu
3d4d4fd095
drm/amd/powerplay: fix set highest mclk level failed on Vega10
...
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-15 14:46:09 -04:00
Rex Zhu
b2ce723cd1
drm/amd/powerplay: fix force dpm level failed on CZ
...
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-15 14:46:09 -04:00