summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr
Commit message (Collapse)AuthorAgeFilesLines
* drm/amdgpu/powerplay: include asm/div64.h for do_div()Stephen Rothwell2016-01-122-2/+2
| | | | | | Fixes: 1e4854e96c35 ("drm/amdgpu/powerplay: implement thermal control for tonga.") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/amd/powerplay: implement power down asic task for CZRex Zhu2016-01-081-0/+55
| | | | | | 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>
* drm/amd/powerplay: enable power down asic task. (v2)Rex Zhu2016-01-081-1/+16
| | | | | | | | v2: AGD: rebase on upstream 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>
* drm/amdgpu: fix hex/decimal bug when show gpu load.Rex Zhu2016-01-082-10/+10
| | | | | | 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>
* drm/amdgpu: Show gpu load when display gpu performance for Fiji of VI.Rex Zhu2016-01-081-1/+10
| | | | | | 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>
* drm/amd/powerplay: fix Smatch static checker warningsRex Zhu2016-01-086-30/+49
| | | | | | | | | | 1. return -1 instead of -ENOMEM 2. The struct type mismatch warnings. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: fix Smatch static checker warnings with indenting (v2)Rex Zhu2016-01-084-312/+307
| | | | | | | | | v2: AGD: rebase on upstream Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: fix bug that NULL checks are reversed.Rex Zhu2016-01-081-5/+5
| | | | | | | | | && was used instead of ||. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: precedence bug in init_non_clock_fields()Dan Carpenter2016-01-041-2/+2
| | | | | | | | | The cast to uint8_t happens before the right shift so this always sets .m3arb to zero. The cast is actually a no-op so we can remove it. Fixes: 3bace3591493 ('drm/amd/powerplay: add hardware manager sub-component') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm: powerplay: use div64_s64 instead of do_divArnd Bergmann2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | The newly added code for Fiji creates a correct compiler warning about invalid use of the do_div macro: In file included from powerplay/hwmgr/ppatomctrl.c:31:0: drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppevvmath.h: In function 'fDivide': drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppevvmath.h:382:89: warning: comparison of distinct pointer types lacks a cast do_div(longlongX, longlongY); /*Q(32,32) divided by Q(16,16) = Q(16,16) Back to original format */ do_div() divides an unsigned 64-bit number by an unsigned 32-bit number. The code instead wants to divide two signed 64-bit numbers, which is done using the div64_s64 function. Reviewed-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 770911a3cfbb ("drm/amd/powerplay: add/update headers for Fiji SMU and DPM") Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amd/powerplay: fix copy paste typo in hardwaremanager.cAlex Deucher2015-12-211-1/+1
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amd/powerplay: don't enable ucode fan control if vbios has no fan tableAlex Deucher2015-12-211-0/+3
| | | | | | | | Some systems have a single fan controlled by ACPI or some other method. Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: show gpu load when print gpu performance for Cz. (v2)Rex Zhu2015-12-211-1/+12
| | | | | | | | | Show GPU load in in the debugfs output. v2: integrate Tom's optimization Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
* drm/amd/powerplay: add point check to avoid NULL point hang.Rex Zhu2015-12-211-13/+47
| | | | | Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/powerplay: Program a calculated value as Deep Sleep clock.David Rokhvarg2015-12-211-2/+4
| | | | | | This replaces programming of a hardcoded value. Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com>
* drm/amd/powerplay: Don't return an error if fan table is missingAlex Deucher2015-12-211-1/+1
| | | | | | | It's a valid configuration on some laptops. Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/powerplay/hwmgr: log errors in tonga_hwmgr_backend_initAlex Deucher2015-12-211-0/+2
| | | | | | | Helpful in debugging init issues. Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/powerplay: add debugging output to processpptables.cAlex Deucher2015-12-211-13/+29
| | | | | | | To help track down init errors. Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/powerplay: add debugging output to tonga_processpptables.cAlex Deucher2015-12-211-13/+26
| | | | | | | To help track down init errors. Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amd/powerplay: Add structures required to report configuration changeEric Yang2015-12-213-39/+65
| | | | | | Add required structures for amd_powerplay_display_configuration_change Signed-off-by: Eric Yang <eric.yang2@amd.com>
* amd/powerplay: Fix get dal power levelVitaly Prosyak2015-12-212-4/+5
| | | | | | Simplify data struct for get dal power level Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
* amd\powerplay Implement get dal power levelVitaly Prosyak2015-12-212-2/+34
| | | | | | Implement get dal power level and simple clock info Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
* drm/amd/powerplay: display gpu load when print performance for tonga.Rex Zhu2015-12-211-1/+12
| | | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
* drm/amd/powerplay: move shared function of vi to hwmgr. (v2)Rex Zhu2015-12-213-16/+334
| | | | | | | v2: agd: rebase on upstream Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
* drm/amd/powerplay: fix boolreturn.cocci warningskbuild test robot2015-12-211-2/+2
| | | | | | | | | | | | drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomctrl.c:475:10-11: WARNING: return of 0/1 in function 'atomctrl_lookup_gpio_pin' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: yanyang1 <young.yang@amd.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add functions set/get_fan_control_mode in hwmgr for Fiji.Eric Huang2015-12-212-0/+27
| | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
* drm/amd/powerplay: add functions set/get_fan_control_mode in hwmgr for Tonga.Eric Huang2015-12-212-0/+27
| | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
* drm/amd/powerplay: Fix a bug in fan control setting default mode for Tonga ↵Eric Huang2015-12-212-2/+2
| | | | | | | and Fiji. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
* drm/amd/powerplay: Add thermal protection support for Fiji.Eric Huang2015-12-214-1/+892
| | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
* drm/amd/powerplay: add display configeration changed function in hwmgr for Fiji.Eric Huang2015-12-212-0/+68
| | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
* drm/amd/powerplay: add multimedia power gating support for Fiji.Eric Huang2015-12-215-3/+281
| | | | | | | Acked-by: Jammy Zhou <Jammy.Zhou@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
* drm/amd/powerplay: Add PPLib debug print macro.David Rokhvarg2015-12-211-3/+32
| | | | | | | - The macro is silent by default. - Use the macro to print Display Configuration - related changes. Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com>
* drm/amd/powerplay: enable/disable NB pstate feature for Carrizo.Rex Zhu2015-12-212-15/+87
| | | | | | | Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* drm/amd/powerplay: enable set_cpu_power_state task. (v2)Rex Zhu2015-12-211-2/+11
| | | | | | | | v2: integrate Jammy's crash fix Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* drm/amd/powerplay: export interface to DAL to init/change display configuration.Rex Zhu2015-12-211-0/+16
| | | | | | | Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* drm/amd/powerplay: fix warning of cast to pointer from integer of different ↵Rex Zhu2015-12-211-2/+2
| | | | | | | size. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: fix warning of cast to pointer from integer of different ↵rezhu2015-12-211-1/+1
| | | | | | | size. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: implement smc state upload for CZAlex Deucher2015-12-213-20/+138
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add atomctrl function to calculate CZ sclk dividersAlex Deucher2015-12-212-0/+25
| | | | | | Use atombios to calculate the values. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay/tonga: Add UVD DPM initAlex Deucher2015-12-211-0/+56
| | | | | | Load the UVD DPM state into the SMC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/powerplay/fiji: query supported pcie info from cgs (v2)Alex Deucher2015-12-211-2/+18
| | | | | | | | | Rather than hardcode it. v2: integrate spc fix from Rex Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/powerplay/tonga: query supported pcie info from cgs (v2)Alex Deucher2015-12-211-2/+18
| | | | | | | | | Rather than hardcode it. v2: integrate spc fix from Rex Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: extract pcie helpers to common headerAlex Deucher2015-12-214-137/+2
| | | | | | | | These will be used by multiple powerplay drivers and other IP modules. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay/fiji: enable pcie and mclk forcing for lowAlex Deucher2015-12-211-5/+25
| | | | | | When forcing the lowest state also force mclk and pcie. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay/tonga: enable pcie and mclk forcing for lowAlex Deucher2015-12-211-11/+37
| | | | | | When forcing the lowest state also force mclk and pcie. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: implement new funcs to check current states for tonga.Rex Zhu2015-12-211-0/+62
| | | | | | | | Implement the new callbacks for tonga. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* drm/amd/powerplay: add and export hwmgr interface to eventmgr to check hw ↵Rex Zhu2015-12-211-0/+21
| | | | | | | | | | states. Interface between hwmgr and eventmgr. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* drm/amdgpu/powerplay: implement thermal control for tonga.Rex Zhu2015-12-215-2/+798
| | | | | | | | Implement thermal and fan control for tonga. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/powerplay: add thermal control interface in hwmgr.Rex Zhu2015-12-211-0/+29
| | | | | | | | Thermal controller interface. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/powerplay: mv ppinterrupt.h to inc folder to share with other ↵Rex Zhu2015-12-212-49/+7
| | | | | | | | | | submodule. Redefine interrupt callback function in accordance with cgs. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
OpenPOWER on IntegriCloud