openwrt/staging/blogic.git
6 years agodrm/amdgpu: kmap PDs/PTs in amdgpu_vm_update_directories
Christian König [Thu, 19 Apr 2018 11:58:42 +0000 (13:58 +0200)]
drm/amdgpu: kmap PDs/PTs in amdgpu_vm_update_directories

In theory it is possible that PDs/PTs can move without eviction.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: further optimize amdgpu_vm_handle_moved
Christian König [Thu, 19 Apr 2018 09:08:24 +0000 (11:08 +0200)]
drm/amdgpu: further optimize amdgpu_vm_handle_moved

Splice the moved list to a local one to avoid taking the lock over and
over again.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: cleanup amdgpu_vm_validate_pt_bos v2
Christian König [Thu, 19 Apr 2018 09:02:54 +0000 (11:02 +0200)]
drm/amdgpu: cleanup amdgpu_vm_validate_pt_bos v2

Use list_for_each_entry_safe here.

v2: Drop the optimization, it doesn't work as expected.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: rework VM state machine lock handling v2
Christian König [Thu, 19 Apr 2018 08:56:02 +0000 (10:56 +0200)]
drm/amdgpu: rework VM state machine lock handling v2

Only the moved state needs a separate spin lock protection. All other
states are protected by reserving the VM anyway.

v2: fix some more incorrect cases

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Add runtime VCN PG support
Rex Zhu [Wed, 16 May 2018 12:18:22 +0000 (20:18 +0800)]
drm/amdgpu: Add runtime VCN PG support

Enable support for dynamically powering up/down VCN on demand.

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>
6 years agodrm/amdgpu: Enable VCN static PG by default on RV
Rex Zhu [Thu, 17 May 2018 08:03:47 +0000 (16:03 +0800)]
drm/amdgpu: Enable VCN static PG by default on RV

Enable static VCN powergating by default on Raven.

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>
6 years agodrm/amdgpu: Add VCN static PG support on RV
Rex Zhu [Thu, 17 May 2018 08:07:02 +0000 (16:07 +0800)]
drm/amdgpu: Add VCN static PG support on RV

Implement static powergating suport on VCN.

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>
6 years agodrm/amdgpu: Enable VCN CG by default on RV
Rex Zhu [Thu, 17 May 2018 03:13:51 +0000 (11:13 +0800)]
drm/amdgpu: Enable VCN CG by default on RV

Enable VCN clockgating by default on Raven.

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>
6 years agodrm/amdgpu: Add static CG control for VCN on RV
Rex Zhu [Thu, 17 May 2018 03:11:22 +0000 (11:11 +0800)]
drm/amdgpu: Add static CG control for VCN on RV

Implement proper static clockgating support for VCN.

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>
6 years agodrm/amdgpu: Add SOC15_WAIT_ON_RREG macro define
Rex Zhu [Thu, 17 May 2018 07:58:53 +0000 (15:58 +0800)]
drm/amdgpu: Add SOC15_WAIT_ON_RREG macro define

Add new macro to wait on a register field to be a specific
value.

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>
6 years agodrm/amdgpu: Add CG/PG flags for VCN
Rex Zhu [Wed, 16 May 2018 12:10:25 +0000 (20:10 +0800)]
drm/amdgpu: Add CG/PG flags for VCN

Define new clock and powergating flags for VCN block.

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>
6 years agodrm/amd/pp: Add smu support for VCN powergating on RV
Rex Zhu [Wed, 16 May 2018 12:09:09 +0000 (20:09 +0800)]
drm/amd/pp: Add smu support for VCN powergating on RV

Add the powerplay callback for powergating VCN (same
as UVD and VCE).

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>
6 years agodrm/amdgpu: skip CG for VCN when late_init/fini
Rex Zhu [Wed, 16 May 2018 12:06:53 +0000 (20:06 +0800)]
drm/amdgpu: skip CG for VCN when late_init/fini

VCN clockgating is handled manually like VCE and UVD.

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>
6 years agodrm/amd/pp: fix a couple locking issues
Rex Zhu [Fri, 18 May 2018 06:59:46 +0000 (14:59 +0800)]
drm/amd/pp: fix a couple locking issues

We should return unlock on the error path

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>
6 years agodrm/amd/pp: Fix static checker warning
Rex Zhu [Fri, 18 May 2018 06:24:44 +0000 (14:24 +0800)]
drm/amd/pp: Fix static checker warning

error: uninitialized symbol 'xxxx'

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>
6 years agodrm/amdgpu/gmc9: disable partial wr rmw if ECC is not enabled
Alex Deucher [Thu, 10 May 2018 20:15:12 +0000 (15:15 -0500)]
drm/amdgpu/gmc9: disable partial wr rmw if ECC is not enabled

The vbios mistakenly sets this bit on some boards without ECC.
This can lead to reduced performance in some workloads.  Disable
the bit if the board does not have ECC.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: add a df 1.7 implementation of enable_ecc_force_par_wr_rmw
Alex Deucher [Thu, 10 May 2018 20:06:55 +0000 (15:06 -0500)]
drm/amdgpu: add a df 1.7 implementation of enable_ecc_force_par_wr_rmw

Needed for proper memory setup depending on whether ECC is
enabled on a particular board.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: add new DF callback for ECC setup
Alex Deucher [Thu, 10 May 2018 19:59:31 +0000 (14:59 -0500)]
drm/amdgpu: add new DF callback for ECC setup

The ForceParWrRMW setting needs to be enabled for ECC, but disabled
when ECC is not enabled.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: add new DF 1.7 register defs
Alex Deucher [Thu, 10 May 2018 19:45:12 +0000 (14:45 -0500)]
drm/amdgpu: add new DF 1.7 register defs

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoRemove calls to suspend/resume atomic helpers from amdgpu_device_gpu_recover. (v2)
Andrey Grodzovsky [Thu, 17 May 2018 15:18:34 +0000 (11:18 -0400)]
Remove calls to suspend/resume atomic helpers from amdgpu_device_gpu_recover. (v2)

First of all it's already being called from the display code from amd_ip_funcs.suspend/resume hooks.
Second of all, the place in amdgpu_device_gpu_recover it's being called is wrong for GPU stalls since
it is called BEFORE we cancel and force completion of all in flight jobs which were not yet processed.
So, as Bas pointed in the ticket we will try to wait for fence  in amdgpu_pm_compute_clocks but the pipe
is hanged so we end up in deadlock.

v2: remove unused variable

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106500
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: fix insert nop for UVD4.2 ring
Leo Liu [Thu, 17 May 2018 17:54:21 +0000 (13:54 -0400)]
drm/amdgpu: fix insert nop for UVD4.2 ring

NO_OP register should be writen to 0

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: fix insert nop for UVD5 ring
Leo Liu [Thu, 17 May 2018 17:52:00 +0000 (13:52 -0400)]
drm/amdgpu: fix insert nop for UVD5 ring

NO_OP register should be writen to 0

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: fix insert nop for UVD6 ring
Leo Liu [Thu, 17 May 2018 17:44:28 +0000 (13:44 -0400)]
drm/amdgpu: fix insert nop for UVD6 ring

NO_OP register should be writen to 0

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: fix insert nop for UVD7 ring
Leo Liu [Thu, 17 May 2018 17:37:50 +0000 (13:37 -0400)]
drm/amdgpu: fix insert nop for UVD7 ring

NO_OP register should be writen to 0

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: fix insert nop for VCN decode ring
Leo Liu [Thu, 17 May 2018 17:31:49 +0000 (13:31 -0400)]
drm/amdgpu: fix insert nop for VCN decode ring

NO_OP register should be writen to 0

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: Fix build warning in vegam
Rex Zhu [Thu, 17 May 2018 12:21:42 +0000 (20:21 +0800)]
drm/amd/pp: Fix build warning in vegam

warning: missing braces around initializer [-Wmissing-braces]

Acked-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>
6 years agodrm/amd/display: Clear connector's edid pointer
Mikita Lipski [Fri, 27 Apr 2018 13:09:52 +0000 (09:09 -0400)]
drm/amd/display: Clear connector's edid pointer

Clear connector's edid pointer on coonnector update, when unplugging
the display.

Fix poison EDID when hotplugging on previously used connector.

Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix memory leaks
Anthony Koo [Sat, 28 Apr 2018 00:50:07 +0000 (20:50 -0400)]
drm/amd/display: fix memory leaks

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: DCN1 link encoder
Eric Bernstein [Thu, 26 Apr 2018 18:06:00 +0000 (14:06 -0400)]
drm/amd/display: DCN1 link encoder

Create DCN1 link encoder files and update AUX and HPD register access.

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Clear underflow status for debug purposes
Nikola Cornij [Fri, 27 Apr 2018 21:26:25 +0000 (17:26 -0400)]
drm/amd/display: Clear underflow status for debug purposes

We want to keep underflow sticky bit on for the longevity tests outside
of test environment. For debug purposes it is, however, useful to clear
underflow status after the test that caused it so that the following
tests are not affected. This change fullfils both requirements by clearing
the underflow only from within Windows or Diags test environment.

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Nikola Cornij <Nikola.Cornij@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix bug with index check
Anthony Koo [Fri, 27 Apr 2018 19:23:23 +0000 (15:23 -0400)]
drm/amd/display: fix bug with index check

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Add fullscreen transitions to log
Anthony Koo [Thu, 26 Apr 2018 14:03:44 +0000 (10:03 -0400)]
drm/amd/display: Add fullscreen transitions to log

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: constify a few dc_surface_update fields
Jun Lei [Thu, 26 Apr 2018 14:24:25 +0000 (10:24 -0400)]
drm/amd/display: constify a few dc_surface_update fields

Signed-off-by: Jun Lei <Jun.Lei@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Only limit VSR downscaling when actually downscaling
Xingyue Tao [Thu, 19 Apr 2018 20:23:12 +0000 (16:23 -0400)]
drm/amd/display: Only limit VSR downscaling when actually downscaling

Signed-off-by: Xingyue Tao <xingyue.tao@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: don't create new dc_sink if nothing changed at detection
Samson Tam [Fri, 13 Apr 2018 22:38:56 +0000 (18:38 -0400)]
drm/amd/display: don't create new dc_sink if nothing changed at detection

Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: use macro for logs
Anthony Koo [Tue, 24 Apr 2018 19:36:27 +0000 (15:36 -0400)]
drm/amd/display: use macro for logs

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Fix up dm logging functionality
Anthony Koo [Tue, 24 Apr 2018 19:21:33 +0000 (15:21 -0400)]
drm/amd/display: Fix up dm logging functionality

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: update dml to allow sync with DV
Dmytro Laktyushkin [Tue, 20 Mar 2018 12:25:16 +0000 (08:25 -0400)]
drm/amd/display: update dml to allow sync with DV

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Log DTN only after the atomic commit in Diag
Nikola Cornij [Mon, 23 Apr 2018 19:55:36 +0000 (15:55 -0400)]
drm/amd/display: Log DTN only after the atomic commit in Diag

Also print HUBP info only if pipe enabled. This fixes having different
DTN logs for different test sequences.

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: disable mpo if brightness adjusted
Yue Hin Lau [Wed, 18 Apr 2018 20:07:04 +0000 (16:07 -0400)]
drm/amd/display: disable mpo if brightness adjusted

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Add dc cap to restrict VSR downscaling src size
Xingyue Tao [Thu, 19 Apr 2018 20:23:12 +0000 (16:23 -0400)]
drm/amd/display: Add dc cap to restrict VSR downscaling src size

- Adds int max_downscale_src_width in dc struct
- Checks and does not support if downscale size is more than 4k (width > 3840)

Signed-off-by: Xingyue Tao <xingyue.tao@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix a 32 bit shift meant to be 64 warning
Dmytro Laktyushkin [Mon, 23 Apr 2018 18:39:23 +0000 (14:39 -0400)]
drm/amd/display: fix a 32 bit shift meant to be 64 warning

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix 31_32_fixpt shift functions
Dmytro Laktyushkin [Mon, 23 Apr 2018 16:41:34 +0000 (12:41 -0400)]
drm/amd/display: fix 31_32_fixpt shift functions

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Update HW sequencer initialization
Eric Bernstein [Tue, 17 Apr 2018 20:50:28 +0000 (16:50 -0400)]
drm/amd/display: Update HW sequencer initialization

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: underflow/blankscreen recovery
Charlene Liu [Wed, 18 Apr 2018 18:31:41 +0000 (14:31 -0400)]
drm/amd/display: underflow/blankscreen recovery

[Description]
for any reason, if driver detects HUBP underflow,
if a debug option enabled to enable recovery.
it will kick in a sequence of recovery.

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: truncate scaling ratios and inits to 19 bit precision
Dmytro Laktyushkin [Wed, 18 Apr 2018 18:19:23 +0000 (14:19 -0400)]
drm/amd/display: truncate scaling ratios and inits to 19 bit precision

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: add fixed point fractional bit truncation function
Dmytro Laktyushkin [Wed, 18 Apr 2018 18:11:43 +0000 (14:11 -0400)]
drm/amd/display: add fixed point fractional bit truncation function

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Make DisplayStats work with just DC DisplayStats minor
Anthony Koo [Thu, 19 Apr 2018 14:05:22 +0000 (10:05 -0400)]
drm/amd/display: Make DisplayStats work with just DC DisplayStats minor

Remove dependency on the old FREESYNC_SW_STATS log mask used by DAL2
Also rename from profiling to displaystats

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: inline more of fixed point code
Dmytro Laktyushkin [Wed, 18 Apr 2018 17:54:24 +0000 (13:54 -0400)]
drm/amd/display: inline more of fixed point code

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: get rid of 32.32 unsigned fixed point
Dmytro Laktyushkin [Wed, 18 Apr 2018 15:37:53 +0000 (11:37 -0400)]
drm/amd/display: get rid of 32.32 unsigned fixed point

32.32 is redundant, 31.32 does everything we use 32.32 for

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Cleanup unused SetPlaneConfig
Anthony Koo [Fri, 13 Apr 2018 02:40:02 +0000 (22:40 -0400)]
drm/amd/display: Cleanup unused SetPlaneConfig

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Take vcn encode rings into account in idle work
Alex Deucher [Thu, 17 May 2018 18:03:05 +0000 (13:03 -0500)]
drm/amdgpu: Take vcn encode rings into account in idle work

Take the encode rings into account in the idle work handler.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Take uvd encode rings into account in idle work (v2)
Alex Deucher [Thu, 17 May 2018 17:45:52 +0000 (12:45 -0500)]
drm/amdgpu: Take uvd encode rings into account in idle work (v2)

Take the encode rings into account in the idle work handler.

v2: fix typo: s/num_uvd_inst/num_enc_rings/

Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: count fences from all uvd instances in idle handler
Alex Deucher [Thu, 17 May 2018 17:33:34 +0000 (12:33 -0500)]
drm/amdgpu: count fences from all uvd instances in idle handler

Current multi-UVD hardware uses a single clock and power source
so handle all instances in the idle handler.

Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/scheduler: fix function name prefix in comments
Nayan Deshmukh [Wed, 16 May 2018 13:24:18 +0000 (18:54 +0530)]
drm/scheduler: fix function name prefix in comments

That got missed while moving the files outside of amdgpu.

Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/amdgpu: Code comments for the amdgpu_ttm.c driver. (v2)
Tom St Denis [Wed, 9 May 2018 18:22:29 +0000 (14:22 -0400)]
drm/amd/amdgpu:  Code comments for the amdgpu_ttm.c driver. (v2)

NFC just comments.

(v2):  Updated based on feedback from Alex Deucher.

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>
6 years agodrm/amd/pp: missing curly braces in smu7_enable_sclk_mclk_dpm()
Dan Carpenter [Thu, 17 May 2018 12:56:05 +0000 (15:56 +0300)]
drm/amd/pp: missing curly braces in smu7_enable_sclk_mclk_dpm()

We added some more lines of code to this if statement but forgot to add
curly braces.

Fixes: 0c24e7ef233b ("drm/amd/powerplay: add specific changes for VEGAM in smu7_hwmgr.c")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/display: fix vega12/20 handling in dal_asic_id.h
Alex Deucher [Wed, 16 May 2018 20:34:19 +0000 (15:34 -0500)]
drm/amdgpu/display: fix vega12/20 handling in dal_asic_id.h

- Remove unused ASICREV_IS_VEGA12_p() macro
- Fix ASICREV_IS_VEGA12_P() macro to properly check against vega20

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/display: remove VEGA20 config option
Alex Deucher [Wed, 16 May 2018 20:28:59 +0000 (15:28 -0500)]
drm/amdgpu/display: remove VEGA20 config option

Leftover from bringup.  No need to keep it around for
upstream.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/display: remove VEGAM config option
Alex Deucher [Wed, 16 May 2018 13:39:58 +0000 (08:39 -0500)]
drm/amdgpu/display: remove VEGAM config option

Leftover from bringup.  No need to keep it around for
upstream.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/scheduler: Remove obsolete spinlock.
Andrey Grodzovsky [Tue, 15 May 2018 18:42:20 +0000 (14:42 -0400)]
drm/scheduler: Remove obsolete spinlock.

This spinlock is superfluous, any call to drm_sched_entity_push_job
should already be under a lock together with matching drm_sched_job_init
to match the order of insertion into queue with job's fence seqence
number.

v2:
Improve patch description.
Add functions documentation describing the locking considerations

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: remove unused member
Christian König [Thu, 19 Apr 2018 07:57:21 +0000 (09:57 +0200)]
drm/amdgpu: remove unused member

This lock isn't used any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: Workaround flickering issue on RV
Rex Zhu [Mon, 14 May 2018 08:03:01 +0000 (16:03 +0800)]
drm/amd/pp: Workaround flickering issue on RV

Screen flickering observed while running 1080p video using
MPV_VAAPI/VDPAU with 4x4K@60 monitors

Need to set higher mclk in this configuration.

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>
6 years agodrm/amdgpu: Skip drm_sched_entity related ops for KIQ ring.
Andrey Grodzovsky [Tue, 15 May 2018 18:12:21 +0000 (14:12 -0400)]
drm/amdgpu: Skip drm_sched_entity related ops for KIQ ring.

Following change 75fbed2 we never initialize or use the GPU
scheduler for KIQ and hence we need to skip KIQ ring when iterating
amdgpu_ctx's scheduler entites.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: flag Vega20 as experimental
Alex Deucher [Mon, 14 May 2018 16:28:04 +0000 (11:28 -0500)]
drm/amdgpu: flag Vega20 as experimental

Must set amdgpu.exp_hw_support=1 on the kernel command line in
grub to enable support.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Add vega20 pci ids
Feifei Xu [Mon, 22 Jan 2018 11:08:33 +0000 (19:08 +0800)]
drm/amdgpu: Add vega20 pci ids

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Switch to use df_v3_6_funcs for vega20 (v2)
Feifei Xu [Wed, 4 Apr 2018 06:32:10 +0000 (14:32 +0800)]
drm/amdgpu: Switch to use df_v3_6_funcs for vega20 (v2)

v2: fix whitespace (Alex)

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/df: implement df v3_6 callback functions (v2)
Feifei Xu [Wed, 4 Apr 2018 06:30:28 +0000 (14:30 +0800)]
drm/amdgpu/df: implement df v3_6 callback functions (v2)

New df helpers for 3.6.

v2: switch to using df 3.6 headers (Alex)

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: add df 3.6 headers
Alex Deucher [Mon, 14 May 2018 16:50:46 +0000 (11:50 -0500)]
drm/amdgpu: add df 3.6 headers

Needed for vega20.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Enable UVD/VCE for Vega20
James Zhu [Mon, 30 Apr 2018 12:43:12 +0000 (08:43 -0400)]
drm/amdgpu/vg20:Enable UVD/VCE for Vega20

Vega20 ucode load type is set to AMDGPU_FW_LOAD_DIRECT for default.
So UVD/VCE needn't PSP IP block up. UVD/VCE for Vega20 can be enabled
at this moment.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Enable 2nd instance queue maping for uvd 7.2
James Zhu [Tue, 24 Apr 2018 01:00:58 +0000 (21:00 -0400)]
drm/amdgpu/vg20:Enable 2nd instance queue maping for uvd 7.2

Enable 2nd instance uvd queue maping for uvd 7.2. For user, only one UVD
instance presents. there is two rings for uvd decode, and
4 rings for uvd encode.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Enable the 2nd instance IRQ for uvd 7.2
James Zhu [Tue, 24 Apr 2018 00:56:01 +0000 (20:56 -0400)]
drm/amdgpu/vg20:Enable the 2nd instance IRQ for uvd 7.2

For Vega20, the 2nd instance uvd IRQ using different client id.
Enable the 2nd instance IRQ for uvd 7.2

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Add IH client ID for the 2nd UVD
James Zhu [Tue, 24 Apr 2018 00:49:28 +0000 (20:49 -0400)]
drm/amdgpu/vg20:Add IH client ID for the 2nd UVD

For Vega20, there are two UVD hardware. Need add
the 2nd IH client ID for the 2nd UVD Hardware.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Enable the 2nd instance for uvd
James Zhu [Fri, 11 May 2018 18:56:44 +0000 (13:56 -0500)]
drm/amdgpu/vg20:Enable the 2nd instance for uvd

For Vega20, set num of uvd instance to 2, to enble 2nd instance.
The IB test build-in registers need update for vega20 2nd instance.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:increase 3 rings for AMDGPU_MAX_RINGS
James Zhu [Mon, 23 Apr 2018 23:11:46 +0000 (19:11 -0400)]
drm/amdgpu/vg20:increase 3 rings for AMDGPU_MAX_RINGS

For Vega20, there are two UVD Hardware. One more UVD hardware
adds one decode ring and two encode rings. So AMDGPU_MAX_RINGS
need increase by 3.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Restruct uvd.inst to support multiple instances
James Zhu [Tue, 15 May 2018 19:31:24 +0000 (14:31 -0500)]
drm/amdgpu/vg20:Restruct uvd.inst to support multiple instances

Vega20 has dual-UVD. Need add multiple instances support for uvd.
Restruct uvd.inst, using uvd.inst[0] to replace uvd.inst->.
Repurpose amdgpu_ring::me for instance index, and initialize to 0.
There are no any logical changes here.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Restruct uvd to support multiple uvds
James Zhu [Tue, 15 May 2018 19:25:46 +0000 (14:25 -0500)]
drm/amdgpu/vg20:Restruct uvd to support multiple uvds

Vega20 has dual-UVD. Need Restruct amdgpu_device::uvd to support
multiple uvds. There are no any logical changes here.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Disable ip modules that are not ready yet
Feifei Xu [Tue, 24 Apr 2018 03:20:16 +0000 (11:20 +0800)]
drm/amdgpu: Disable ip modules that are not ready yet

Please enable above ips on soc15.c when they're available.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/powerplay: update vega20 cg flags (v2)
Evan Quan [Mon, 26 Mar 2018 03:43:04 +0000 (11:43 +0800)]
drm/amd/powerplay: update vega20 cg flags (v2)

v2: remove duplicate flag.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Set vega20 load_type to AMDGPU_FW_LOAD_DIRECT.
Feifei Xu [Tue, 24 Apr 2018 03:11:16 +0000 (11:11 +0800)]
drm/amdgpu: Set vega20 load_type to AMDGPU_FW_LOAD_DIRECT.

Please revert this patch when psp load fw is enabled.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Use vbios table for gpu info on vega20
Alex Deucher [Fri, 20 Apr 2018 04:31:04 +0000 (12:31 +0800)]
drm/amdgpu: Use vbios table for gpu info on vega20

Use the vbios table rather than gpu info firmware.

Squash of the following patches:
drm/amdgpu/vg20: fallback to vbios table if gpu info fw is not available (v2)
drm/amdgpu: drop gpu_info firmware for vega20

Reviewed-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/atomfirmware: add parser for gfx_info table
Alex Deucher [Tue, 20 Mar 2018 17:24:03 +0000 (12:24 -0500)]
drm/amdgpu/atomfirmware: add parser for gfx_info table

Add support for the gfx_info table on boards that use atomfirmware.

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/atomfirmware: add new gfx_info data table v2.4 (v2)
Alex Deucher [Fri, 16 Mar 2018 02:32:27 +0000 (21:32 -0500)]
drm/amdgpu/atomfirmware: add new gfx_info data table v2.4 (v2)

Adds additional gfx configuration data.

v2: fix typo

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Add harvest IP support for Vega20
Jerry (Fangzhi) Zuo [Mon, 5 Mar 2018 21:12:23 +0000 (16:12 -0500)]
drm/amd/display: Add harvest IP support for Vega20

Retrieve fuses to determine the availability of pipes, and
eliminate pipes that cannot be used.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
6 years agodrm/amd/display: Add BIOS smu_info v3_3 support for Vega20
Jerry (Fangzhi) Zuo [Fri, 11 May 2018 18:51:43 +0000 (13:51 -0500)]
drm/amd/display: Add BIOS smu_info v3_3 support for Vega20

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
6 years agodrm/amd/display: Remove COMBO_DISPLAY_PLL0 from Vega20
Feifei Xu [Fri, 20 Apr 2018 13:03:10 +0000 (21:03 +0800)]
drm/amd/display: Remove COMBO_DISPLAY_PLL0 from Vega20

Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
6 years agodrm/amd/display: Add Vega20 config. support
Jerry (Fangzhi) Zuo [Fri, 11 May 2018 18:46:19 +0000 (13:46 -0500)]
drm/amd/display: Add Vega20 config. support

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd: Add dce-12.1 gpio aux registers (v2)
Roman Li [Wed, 14 Feb 2018 22:20:54 +0000 (17:20 -0500)]
drm/amd: Add dce-12.1 gpio aux registers (v2)

Updating dce12 register headers by adding dc registers
required for potential DP LTTPR support.

v2: fix mode change

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Add vega20 to dc support check (v2)
Feifei Xu [Sat, 3 Feb 2018 04:19:46 +0000 (12:19 +0800)]
drm/amdgpu: Add vega20 to dc support check (v2)

v2: fix whitespace

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display/dm: Add vega20 support
Feifei Xu [Fri, 20 Apr 2018 11:50:01 +0000 (19:50 +0800)]
drm/amd/display/dm: Add vega20 support

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Add nbio support for vega20 (v2)
Feifei Xu [Fri, 23 Mar 2018 19:44:28 +0000 (14:44 -0500)]
drm/amdgpu: Add nbio support for vega20 (v2)

Some register offset in nbio v7.4 are different with v7.0.

v2: Use nbio7.0 for now.

TODO: add a new nbio 7.4 module (Alex)

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/soc15: Add ip blocks for vega20 (v2)
Feifei Xu [Fri, 20 Apr 2018 10:35:42 +0000 (18:35 +0800)]
drm/amdgpu/soc15: Add ip blocks for vega20 (v2)

Same as vega10 now.

v2: squash in typo fix

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/soc15: dynamic initialize ip offset for vega20
Feifei Xu [Fri, 23 Mar 2018 19:42:28 +0000 (14:42 -0500)]
drm/amdgpu/soc15: dynamic initialize ip offset for vega20

Vega20 need a seperate vega20_reg_init.c due to ip base
offset difference.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/soc15: Set common clockgating for vega20.
Feifei Xu [Fri, 26 Jan 2018 07:10:55 +0000 (15:10 +0800)]
drm/amdgpu/soc15: Set common clockgating for vega20.

Same as vega10 for now.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/soc15:Add vega20 soc15_common_early_init support
Feifei Xu [Fri, 26 Jan 2018 07:06:22 +0000 (15:06 +0800)]
drm/amdgpu/soc15:Add vega20 soc15_common_early_init support

Set external_rev_id and disable cg,pg for now.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gfx9: Add clockgatting support for vega20
Feifei Xu [Tue, 23 Jan 2018 07:03:36 +0000 (15:03 +0800)]
drm/amdgpu/gfx9: Add clockgatting support for vega20

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gfx9: Add support for vega20
Feifei Xu [Fri, 20 Apr 2018 07:51:26 +0000 (15:51 +0800)]
drm/amdgpu/gfx9: Add support for vega20

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gfx9: Add gfx config for vega20. (v4)
Feifei Xu [Fri, 20 Apr 2018 06:40:11 +0000 (14:40 +0800)]
drm/amdgpu/gfx9: Add gfx config for vega20. (v4)

v2: clean up (Alex)
v3: additional cleanups (Alex)
v4: drop leftover TODO (Alex)

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gfx9: Add vega20 golden settings (v3)
Feifei Xu [Tue, 23 Jan 2018 06:47:26 +0000 (14:47 +0800)]
drm/amdgpu/gfx9: Add vega20 golden settings (v3)

v2: squash in updates (Alex)
v3: squash in more updates (Alex)

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gfx9: Add support for vega20 firmware
Feifei Xu [Fri, 20 Apr 2018 06:22:48 +0000 (14:22 +0800)]
drm/amdgpu/gfx9: Add support for vega20 firmware

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>