Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ed704a43e84cc536081423dcd3491acf2791aaeb) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Christian König [Mon, 11 Jan 2016 14:35:18 +0000 (15:35 +0100)]
drm/ttm: fix adding foreign BOs to the LRU during init v2
BugLink: http://bugs.launchpad.net/bugs/1546572
If we import a BO with an external reservation object we don't
reserve/unreserve it. So we never add it to the LRU causing a possible
denial of service.
v2: fix typo in commit message
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 33d48cf8256f2b72e4082a7996c04bf1e78fce81) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Alex Deucher [Fri, 18 Dec 2015 16:33:30 +0000 (11:33 -0500)]
drm/amdgpu/cz: force vce clocks when sclks are forced
BugLink: http://bugs.launchpad.net/bugs/1546572 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 403664bbf840e80a45c4b97115ac518b40487f91) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Alex Deucher [Fri, 18 Dec 2015 16:28:49 +0000 (11:28 -0500)]
drm/amdgpu/cz: force uvd clocks when sclks are forced
BugLink: http://bugs.launchpad.net/bugs/1546572 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5f57642672dd90e3183efcd9e6afbff1305a133a) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 044c0629b55d73235161557a48870d663d0072f5) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d83b1e8132f91ba9e038b5206dc81d32ecac1f75) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f3b5cb3e68952d4a721cc733e03eeb5151dcaa1e) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Stephen Rothwell [Thu, 31 Dec 2015 10:20:20 +0000 (21:20 +1100)]
drm/amdgpu/powerplay: include asm/div64.h for do_div()
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit 8a0d560f3e651808ae0a3d9ab9fe476e59de132b) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Alex Deucher [Fri, 6 Nov 2015 06:29:08 +0000 (01:29 -0500)]
drm/amdgpu: add irq domain support
BugLink: http://bugs.launchpad.net/bugs/1546572
Hardware blocks on the GPU like ACP generate interrupts in
the GPU interrupt controller, but are driven by a separate
driver. Add an irq domain to the GPU driver so that
blocks like ACP can register a Linux interrupt.
Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5f2323658e4829ffb893553297e64795a90cbcd9) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Alex Deucher [Wed, 23 Dec 2015 16:25:43 +0000 (11:25 -0500)]
drm/amdgpu/cgs: add an interface to access PCI resources
BugLink: http://bugs.launchpad.net/bugs/1546572
This provides an interface to get access to the base address
of PCI resources (MMIO, DOORBELL, etc.). Only MMIO and
DOORBELL are implemented right now. This is necessary to
properly utilize shared drivers on platform devices. IP
modules can use this interface to get the base address
of the resource and add any additional offset and set the
size when setting up the platform driver(s).
Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ba228ac8f512c9cd09cb4245c424ab1632da0c24) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 191caba6cc4c95ba282304a10a2a9cba85450317) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Tue, 29 Dec 2015 03:23:16 +0000 (11:23 +0800)]
drm/amd/powerplay: implement power down asic task for CZ
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit 4d42fa492eb80aed28d2237efaee004453579556) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit e1d32e607b5ce25a7852bef4ab4de2a80f30c546) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Tue, 29 Dec 2015 03:19:14 +0000 (11:19 +0800)]
drm/amd/powerplay: enable set boot state task
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit 018462d015c5672de0be8045b1acff19f5df6010) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Tue, 29 Dec 2015 03:23:57 +0000 (11:23 +0800)]
drm/amd/powerplay: add thermal control task when resume.
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit f556c2744a8e7508493cf409849d5a248ed3fb9d) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Wed, 6 Jan 2016 09:17:53 +0000 (17:17 +0800)]
drm/amdgpu: fix hex/decimal bug when show gpu load.
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit ab4f4b14c36f7ae6fa204ca304477e42f6696453) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Wed, 6 Jan 2016 09:15:59 +0000 (17:15 +0800)]
drm/amdgpu: Show gpu load when display gpu performance for Fiji of VI.
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit 0cfd9f26975be88e8d902f9bc7070f98dfdfeea2) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Wed, 6 Jan 2016 09:08:46 +0000 (17:08 +0800)]
drm/amdgpu: Show gpu load when display gpu performance for Ci.
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit 9354573d76f599e05a34e0b468ffce681769115f) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Tue, 29 Dec 2015 02:25:19 +0000 (10:25 +0800)]
drm/amd/powerplay: Reload and initialize the smc firmware on powerplay resume.
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit e0b71a7eff644ca256aee6478bf220ba0a835bed) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Tue, 29 Dec 2015 05:56:03 +0000 (13:56 +0800)]
drm/amd/powerplay: add powerplay valid check to avoid null point. (v2)
BugLink: http://bugs.launchpad.net/bugs/1546572
In case CONFIG_DRM_AMD_POWERPLAY is defined and amdgpu.powerplay=0.
some functions in powrplay can also be called by DAL. and the input parameter is *adev.
if just check point not NULL was not enough and will lead to NULL point error.
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>
(cherry picked from commit a969e163a4ac1b0cfa2dc7ab890aaa9ab092951c) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit c15c8d70207d467bb4312d6ac5536c101246fdc6) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 75ac63dbc3b0f4d3af67a5857790749e954e2ba6) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 53d3de140b668d37e1ebfe01c94ec36d369edcbf) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
(cherry picked from commit e1de741529412f31cb53899307bd63286918c49c) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Dan Carpenter [Mon, 4 Jan 2016 20:44:24 +0000 (23:44 +0300)]
drm/amd/powerplay: precedence bug in init_non_clock_fields()
BugLink: http://bugs.launchpad.net/bugs/1546572
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>
(cherry picked from commit 7c9574f262a25c7ca0779df31098ba4e0c382e86) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit b92c26d1808ccd2acac17b660dce750ba9b0a0db) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 6a53b31349e7fbe6f742b7f09d7c2118d4fe81e3) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
(cherry picked from commit 605ed21929fee2b39e8cb25301184c4ad9b468e5) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
(cherry picked from commit cae9b9c81bde812590cdac7df32ad5662741b3d5) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Fri, 11 Dec 2015 07:21:33 +0000 (15:21 +0800)]
drm/amd/powerplay: add point check to avoid NULL point hang.
BugLink: http://bugs.launchpad.net/bugs/1546572 Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 88b8dcbe21fda8024827a6559af596f9d0caaadb) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com>
(cherry picked from commit c90e5d20fc1bfefdeb99d5ec2cb0fb28f26d208d) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Eric Yang <eric.yang2@amd.com>
(cherry picked from commit 14f634110fa68120ec66e24f1e423e3cc2109c9f) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 283b1a8bfba47921df927bd71b9db40045f4de15) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit aa22ae4b1f23a52c7e92599ee47a9b9fbb129604) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a71e06d97293bca733e3a98006aa415a2f87a8c2) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1d5498c23e852f18d6c8d5c8ba2809fb7dfedb2f) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Alex Deucher [Tue, 8 Dec 2015 22:28:28 +0000 (17:28 -0500)]
drm/amdgpu/powerplay: enable sysfs and debugfs interfaces late
BugLink: http://bugs.launchpad.net/bugs/1546572
To avoid users accessing them before the module has finished
initializing them and make sure they are only created if
dpm has properly initialized.
Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 898b1dead9a99aeeb103febacf838c7c71d58292) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
(cherry picked from commit 17c00a2fed1bcc80949e0e68607bcea6af3c5358) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Change-Id: Ice4a73212d8e3106d05f04a27043820ffd32929e Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
(cherry picked from commit 7ad4e7f09372946d1bfd5359c45ccce024d0689e) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1546572
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>
(cherry picked from commit 195567e99bdf6491a370b71a1dcf6b4c891495d7) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Eric Huang [Fri, 4 Dec 2015 20:49:02 +0000 (15:49 -0500)]
drm/amd/powerplay: add functions set/get_fan_control_mode in hwmgr for Fiji.
BugLink: http://bugs.launchpad.net/bugs/1546572 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit db18ce397c0928bb420a511db52ce36c2003676e) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Eric Huang [Fri, 4 Dec 2015 15:57:22 +0000 (10:57 -0500)]
drm/amd/powerplay: add functions set/get_fan_control_mode in hwmgr for Tonga.
BugLink: http://bugs.launchpad.net/bugs/1546572 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit 9dcfc1936aa0f6a18fd2852e224d59610cd73e7a) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Eric Huang [Thu, 3 Dec 2015 20:13:46 +0000 (15:13 -0500)]
drm/amd/powerplay: Fix a bug in fan control setting default mode for Tonga and Fiji.
BugLink: http://bugs.launchpad.net/bugs/1546572 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit 7ae0a66134c7274cd889129f67a83ac004084b3b) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Eric Huang [Fri, 27 Nov 2015 19:09:53 +0000 (14:09 -0500)]
drm/amd/powerplay: Add thermal protection support for Fiji.
BugLink: http://bugs.launchpad.net/bugs/1546572 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit 601038142fdab3750f26c0f7bda8c7f4805cbe1d) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Eric Huang [Tue, 24 Nov 2015 22:00:56 +0000 (17:00 -0500)]
drm/amd/powerplay: add display configeration changed function in hwmgr for Fiji.
BugLink: http://bugs.launchpad.net/bugs/1546572 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit ea617bc9f9f2ad3469397a74129e62a490e56900) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Eric Huang [Tue, 24 Nov 2015 15:53:27 +0000 (10:53 -0500)]
drm/amd/amdgpu: enable uvd&vce clock gating for Fiji.
BugLink: http://bugs.launchpad.net/bugs/1546572 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit 0bbb81761864c63b5f323b61b48ee892d472c880) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit 0689a5701358656fe16e83df7c6c654185593208) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit 9b08a306476d25c9f5721eccbc43e90bb23c5f58) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Eric Huang [Fri, 20 Nov 2015 20:58:11 +0000 (15:58 -0500)]
drm/amd/powerplay: add multimedia power gating support for Fiji.
BugLink: http://bugs.launchpad.net/bugs/1546572 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>
(cherry picked from commit 91c4c98155a86b2b3afc2fc9dd63a4cb5344b71e) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
(cherry picked from commit b57fd5663e34f024406936283475f4c0eadbfc96) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
(cherry picked from commit dbd29f0d8513b0d660807beb13df94b00402ea57) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com>
(cherry picked from commit 6bd48d24045c3f93f3f57ca1d61388ea0b38c89c) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 73afe621016645ec9dbeacefd6a38cc7054ec8c4) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 73c9f222889986d6f0ba0708115337a0284a5b61) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Mon, 16 Nov 2015 03:24:35 +0000 (11:24 +0800)]
drm/amd/powerplay: fix warning of cast to pointer from integer of different size.
BugLink: http://bugs.launchpad.net/bugs/1546572 Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c9fe74e68b01d44716cf26615b979f0221aaa2ff) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
rezhu [Thu, 12 Nov 2015 08:40:50 +0000 (16:40 +0800)]
drm/amd/powerplay: fix warning of cast to pointer from integer of different size.
BugLink: http://bugs.launchpad.net/bugs/1546572 Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 09b7a9862222c44945c936f1c4f017b4cda1eaa1) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d39d5c2c9dcfb9e9aec2be154784a12f5b4a6c97) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
(cherry picked from commit 6cec2655fa988b4df605e46d4b5c7fbe50056dd5) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 0104aa21a936f6360c7c8aaf2e2b6e18b4ff5dab) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1546572
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:2653:9-10: WARNING: return of 0/1 in function 'is_pcie_gen2_supported' with return type bool
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:2645:9-10: WARNING: return of 0/1 in function 'is_pcie_gen3_supported' 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>
(cherry picked from commit 62a03f6d58dafd3d25f527e75589d45ba4b3a537) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 74c577b0313d4140ec8b61745c6ade3a4d735d33) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9fe1837d18c2b31f535ef18cd076b678d6a3e2d6) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit f4caf3e584120e20f8ecabefa8a0d62fe9b3ec89) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit e829ecdb15671d8c1a106f608aa419f7fd4d7366) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 09b4c872fe16d5e396de8636f5810078014dbd3f) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
v2: fold in Flora's module option change, protect adev reference in
macros
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
(cherry picked from commit e61710c59dd205b48413762b2aedd46e86df3c45) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 8804b8d5b05bbf5aea205e49fa4ed8240eb1728d) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 3af76f23a45b75441b8eac30aa5a7d957e699e73) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit cac9a1991922c12a9a24ae20d250221742aed692) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 1e4854e96c356288a80a0dcd35aa8240df1156c3) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 2dfea9cd1ffe3aacbf52a913257ab3adedfe1ac1) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit fba4eef5847a1c9c8b49c039bc8aa6c9070d058e) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 251bb34fa44ef92dce1903e92af68f12a7f6d594) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit c28eae26b54cb864310a4088ce4d999b66208b8c) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Rex Zhu [Thu, 15 Oct 2015 13:12:58 +0000 (21:12 +0800)]
drm/amd/powerplay: Add CG and PG support for tonga
BugLink: http://bugs.launchpad.net/bugs/1546572
Implement clock and power gating support for tonga. On Tonga
this is handles by the SMU rather than direct register settings
in the driver.
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>
(cherry picked from commit 0859ed3db96c302f5d1b459e963737301a4080b2) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit b1132013ce4c8263e1692841223ff022cf8bf18f) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
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>
(cherry picked from commit 3cec76f973af12c48edce1416193378532cc1bf3) Signed-off-by: Alberto Milone <alberto.milone@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>