Rex Zhu
48fad3aff6
drm/amd/powerplay: original power state table should not be changed.
...
power state table was set based on vbios and should not be changed.
when client need to change power state, just make a copy and send to
smu.
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 >
2016-09-02 11:32:09 -04:00
Rex Zhu
cfcc283cee
drm/amd/powerplay: refine struct name for coding style reason.
...
delete useless member.
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 >
2016-09-02 11:31:43 -04:00
Rex Zhu
48d7b759a8
drm/amd/powerplay: add vce state tables initialize for ppt v1.
...
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 >
2016-09-02 11:31:39 -04:00
Rex Zhu
791a57db3e
drm/amd/powerplay: refine struct name for code style reason.
...
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 >
2016-09-02 11:31:34 -04:00
Jordan Lazare
738d98c994
drm/amd/powerplay: Remove unused variable causing compile warning
...
If treating warnings as errors this causes a build error
Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com >
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-30 17:55:20 -04:00
Tom St Denis
83667ed698
drm/amd/powerplay: Only load SDMA0/MEC firmware once on Stoney (v2)
...
Only load the SDMA0/MEC1 firmware once in the Carrizo SMU manager
driver.
(v2) Avoid loading SDMA0 twice too.
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 >
2016-08-30 17:55:08 -04:00
Tom St Denis
610ecfd6b4
drm/amd/powerplay: Fix up return codes in cz SMU manager
...
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 >
2016-08-30 17:54:58 -04:00
Tom St Denis
a3477255b7
drm/amd/powerplay: Tidy up cz SMU manager
...
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 >
2016-08-30 17:54:50 -04:00
Tom St Denis
b80b13f0cd
drm/amd/powerplay: Fix CZ SMU firmware load check (v4)
...
Remove an errant return in the middle of the check
function as well as check for success in the start
function.
(v2) Add return check to smu_load_fw()
(v3) Don't return early if SMU load check fails
(v4) No returns! :-)
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 >
2016-08-30 17:54:42 -04:00
Rex Zhu
075f101cee
drm/amd/powerplay: simplify struct amd_pp_init.
...
delete the members not needed when amd_powerplay_init.
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 >
2016-08-25 12:23:41 -04:00
Rex Zhu
38109efacd
drm/amd/powerplay: get system info by cgs interface.
...
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 >
2016-08-25 12:23:21 -04:00
Dave Airlie
e9c3ddee6a
Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next
...
First drm-next pull for radeon and amdgpu for 4.9. Highlights:
- powerplay support for iceland asics
- improved GPU reset (both full asic and per block)
- UVD and VCE powergating for CZ and ST
- VCE clockgating for CZ and ST
- Support for pre-initialized (e.g., zeroed) vram buffers
- ttm cleanups
- virtual display support
- core and radeon/amdgpu support for page_flip_target
- lots of bug fixes and clean ups
* 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (171 commits)
drm/amdgpu: use memcpy_toio for VCE firmware upload
drm/amdgpu: use memcpy_to/fromio for UVD fw upload
drm/amd/powerplay: delete useless code in iceland_hwmgr.c.
drm/radeon: switch UVD code to use UVD_NO_OP for padding
drm/amdgpu: switch UVD code to use UVD_NO_OP for padding
drm/radeon: add support for UVD_NO_OP register
drm/amdgpu: add support for UVD_NO_OP register
drm/amdgpu: fix VCE ib alignment value
drm/amdgpu: fix IB alignment for UVD
drm/amd/amdgpu: Print ring name in amdgpu_ib_schedule()
drm/radeon: remove dead code, si_mc_load_microcode (v2)
drm/radeon/cik: remove dead code (v2)
drm/amd/powerplay: avoid NULL dereference, cz_hwmgr.c
drm/amd/powerplay: avoid NULL pointer dereference
drm/amdgpu/gmc8: remove dead code (v2)
drm/amdgpu/gmc7: remove dead code (v2)
drm/amdgpu: Fix indentation in dce_v8_0_audio_write_sad_regs()
drm/amdgpu: Use correct mask in dce_v8_0_afmt_setmode() and fix comment typos.
drm/amdgpu: cleanup amdgpu_vm_bo_update params
drm/amdgpu: stop adding dummy entry in amdgpu_ttm_placement_init
...
2016-08-25 12:59:50 +10:00
Rex Zhu
39a5830a05
drm/amd/powerplay: delete useless code in iceland_hwmgr.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 >
2016-08-24 16:25:06 -04:00
Heinrich Schuchardt
bb1800caf7
drm/amd/powerplay: avoid NULL dereference, cz_hwmgr.c
...
if (a == NULL || a->b == NULL)
leads to a NULL pointer dereference if a == NULL.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-23 13:48:05 -04:00
Heinrich Schuchardt
d36f3e048e
drm/amd/powerplay: avoid NULL pointer dereference
...
if (a == NULL || a->b == NULL)
leads to a NULL pointer dereference if a == NULL.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-23 13:48:05 -04:00
Tom St Denis
8cc5e80641
drm/amd/powerplay: Tidy up cz_hwmgr.c
...
Clean up whitespace and formatting.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-22 13:47:22 -04:00
Rex Zhu
2a702ccd9a
drm/amd/powerplay: enable power containment features for tonga.
...
v2: fix build error introduced when fix code style problems.
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 >
2016-08-19 12:28:38 -04:00
Daniel Vetter
b1116f645c
drm: Remove superflous linux/fb.h includes
...
Everyone who uses the fbdev emulation helpers doesn't need to include
fb.h directly. Remove it.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1470847958-28465-3-git-send-email-daniel.vetter@ffwll.ch
2016-08-12 10:41:39 +02:00
Rex Zhu
173247569a
drm/amd/powerplay: change structure variable 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 >
2016-08-08 11:33:27 -04:00
Rex Zhu
29425288ba
drm/amd/powerplay: delete code set/unset deep_sleep/power_containment.
...
they were controled by module parameter.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:33:26 -04:00
Rex Zhu
8e9fc800ec
drm/amd/powrplay: delete code no longer in use on Polaris.
...
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 >
2016-08-08 11:33:07 -04:00
Rex Zhu
6391b6ab32
drm/amd/powrplay: workaround Memory EDC Error for certain partner boards.
...
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 >
2016-08-08 11:33:06 -04:00
Rex Zhu
93bdacd1bd
drm/amd/powerplay: pass sub_device_id and sub_vendor_id to powerplay.
...
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 >
2016-08-08 11:33:03 -04:00
Rex Zhu
08bd8b9f6f
drm/amd/powerplay: delete useless code in hwmgr.
...
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 >
2016-08-08 11:33:02 -04:00
Rex Zhu
af223dfaf0
drm/amdgpu: add module parameters to ctrl powerplay feature
...
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 >
2016-08-08 11:32:52 -04:00
Rex Zhu
a94cbfc377
drm/amd/powerplay: fix typos of volt/millivolt symbols in comment.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:51 -04:00
Huang Rui
3c18266cff
drm/amd/powerplay: add DPM running checking back
...
This patch adds DPM running checking back, because the DPM issue is
fixed.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:34 -04:00
Huang Rui
db7992d820
drm/amd/powerplay: add enabling voltage controller back
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:32 -04:00
Huang Rui
f6bf6dcaab
drm/amd/powerplay: set the platform capability flags for iceland
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:31 -04:00
Huang Rui
e4e2c8f29a
drm/amd/powerplay: add deep sleep initialization
...
This patch adds the deep sleep initialization at DPM, it needs send a
message to SMC to enable this feature before enable voltage controller.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:30 -04:00
Huang Rui
9f7aab6fd3
drm/amd/powerplay: fix the incorrect checking condition
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:28 -04:00
Huang Rui
025f8bfb84
drm/amd/powerplay: add iceland HW manager
...
This patch introduces the iceland HW manager of powerplay which
includes HW manager, clockpowergating, thermal, and powertune.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:26 -04:00
Huang Rui
d550df0b60
drm/amd/powerplay: add iceland_dyn_defaults header
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:25 -04:00
Huang Rui
2435b0547c
drm/amd/powerplay: add iceland SMU mananger
...
The system management unit (SMU) is a subcomponent of the northbridge
that is responsible for a variety of system and power management tasks
during boot and runtime for GPU. In powerplay, it will be used on
firmware loading and power task management. This patch adds SMU
mananger for iceland.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:24 -04:00
Huang Rui
d31d3c28c7
drm/amd/powerplay: add SMU71 header files for iceland (v2)
...
v2: cleanup headers, add copyright
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-08 11:32:22 -04:00
Tom St Denis
d4ccb71d7a
drm/amd/powerplay: remove enable_clock_power_gatings_tasks from initialize and resume events
...
Setting PG state this early would cause lock ups in the IP block
initialized functions.
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 >
2016-07-29 14:37:13 -04:00
Tom St Denis
1ddeb625ce
drm/amd/powerplay: move clockgating to after ungating power in pp for uvd/vce
...
Cannot set clockgating state before ungating power.
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 >
2016-07-29 14:37:12 -04:00
Rex Zhu
990c70ad75
drm/amd/powerplay: fix issue can't enable vce dpm.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Eric Huang <JinhuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:37:00 -04:00
Rex Zhu
0a6abefe9e
drm/amd/powerplay: fix typo error when set clock gate state.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Christian König<christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:59 -04:00
Nils Wallménius
f8a2fdbae7
drm/amd/powerplay: Delete unused functions in ppevvmath.h
...
Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:56 -04:00
Nils Wallménius
21039ac388
drm/amd/powerplay: Mark functions of ppevvmath.h static
...
This introduces some warnings due to unused functions, that are
deleted in the following commit.
Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:56 -04:00
SF Markus Elfring
63edf1b469
drm/amd/powerplay: Delete an unnecessary variable initialisation in phm_dispatch_table()
...
The variable "result" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:55 -04:00
Markus Elfring
eb923ea6fa
drm/amd/powerplay: Change assignment for a buffer variable in phm_dispatch_table() v2
...
The variable "temp_storage" was eventually reassigned with a pointer.
Thus omit the explicit initialisation at the beginning.
v2: agd: fix coding style
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:54 -04:00
Edward O'Callaghan
538f1ef34c
drivers/amdgpu: Remove redundant itermediate return val
...
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:51 -04:00
Edward O'Callaghan
4ba27f9ba9
drivers/amdgpu: Use canonical boolean form in various predicates
...
V.2: Fixup by hand to remove a few instances of redundant '()'
left over.
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:50 -04:00
Edward O'Callaghan
5969a8c76b
drivers/amdgpu: Remove redundant casts on kzalloc() calls
...
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:50 -04:00
Edward O'Callaghan
a698e41782
drivers/amdgpu: Remove redundant NULL check before kfree()
...
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:49 -04:00
Edward O'Callaghan
ed5121a3d8
drivers/amdgpu: Use 'true/false' for bool typed variables
...
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Reviewed-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-07-29 14:36:48 -04:00
Rex Zhu
36e6b9129b
drm/amd/powerplay: enable DiDt feature for polaris10/11.
...
DIDT is a power saving feature which helps limit power
consumption in order to hit a target power allocation.
v1: delete temp file added accidentally.
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 >
2016-07-29 14:36:47 -04:00
Rex Zhu
c0bcc4ec07
drm/amd/powerplay: populate SMC ACPI minimum voltage using VBIOS boot SCLK and MCLK
...
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 >
2016-07-29 14:36:46 -04:00