Christian König
4fef88bd00
drm/amdgpu: implement gmc_v6_0_emit_flush_gpu_tlb
...
Unify tlb flushing for gmc v6.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:08 -05:00
Christian König
7ef11047c1
drm/amdgpu: add new amdgpu_gmc_emit_flush_gpu_tlb callback
...
Add a new GMC function to unify vm flushing.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:07 -05:00
Christian König
0b5f83a375
drm/amdgpu: wire up emit_wreg for VCN v1
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:07 -05:00
Christian König
cf912c8fd8
drm/amdgpu: wire up emit_wreg for VCE v4
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:06 -05:00
Christian König
b6cb3b5c13
drm/amdgpu: wire up emit_wreg for UVD v7
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:05 -05:00
Christian König
252998986a
drm/amdgpu: wire up emit_wreg for UVD v6
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:05 -05:00
Christian König
4ca54b358b
drm/amdgpu: wire up emit_wreg for SDMA v4
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:04 -05:00
Christian König
3d31d4cb2c
drm/amdgpu: wire up emit_wreg for SDMA v3
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:04 -05:00
Christian König
a355d0f5e6
drm/amdgpu: wire up emit_wreg for SDMA v2.4
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:03 -05:00
Christian König
a37e69db4f
drm/amdgpu: wire up emit_wreg for CIK SDMA
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:03 -05:00
Christian König
5b9263d9f2
drm/amdgpu: wire up emit_wreg for SI DMA
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:02 -05:00
Christian König
254e825b37
drm/amdgpu: wire up emit_wreg for gfx v9
...
Needed for vm_flush unification.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:01 -05:00
Christian König
9ed88047d4
drm/amdgpu: wire up emit_wreg for gfx v8
...
Needed for vm_flush unification.
v2: handle compute rings as well
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:01 -05:00
Christian König
3f3e9de803
drm/amdgpu: wire up emit_wreg for gfx v7
...
Needed for vm_flush unification.
v2: handle compute rings as well
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:00 -05:00
Christian König
e18fb1fd34
drm/amdgpu: wire up emit_wreg for gfx v6
...
Needed for vm_flush unification.
v2: handle compute rings as well.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:00 -05:00
Rex Zhu
7b158d1691
drm/amdgpu: Bump driver version for sensor pstate clk
...
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 >
2018-02-19 14:17:58 -05:00
Rex Zhu
60bbade2a6
drm/amdgpu: Expose more GPU sensor queries
...
Add sub-queries for stable pstate shader/memory clock.
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 >
2018-02-19 14:17:57 -05:00
Chunming Zhou
156a81be3f
drm/amdgpu: all vram is visible for APU (v2)
...
missed in gmc9.
v2: squash in build fix (Rex)
Signed-off-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 >
2018-02-19 14:17:57 -05:00
Rex Zhu
6df21b7726
drm/amd/pp: Add OD driver clock/voltage display on smu7
...
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 >
2018-02-19 14:17:56 -05:00
Rex Zhu
5d97cf39ff
drm/amd/pp: Add and initialize OD_dpm_table for CI/VI.
...
Add initial infrastructure for manual dpm control.
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 >
2018-02-19 14:17:56 -05:00
Rex Zhu
11f64ff5f3
drm/amd/pp: Add a new pp feature mask bit for OD feature
...
when this bit was set on module load,
driver will allow the user over/under gpu
clock and voltage through sysfs.
by default, this bit was not set.
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 >
2018-02-19 14:17:55 -05:00
Rex Zhu
59fc8cde73
drm/amd/pp: Move DPMTABLE_* definitions to common header file
...
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 >
2018-02-19 14:17:54 -05:00
Rex Zhu
ee85c07abe
drm/amd/pp: Refine code abbreviate variable name
...
abbreviate variable name number_of_performance_levels
to num_of_pl in struct phm_odn_clock_levels
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 >
2018-02-19 14:17:54 -05:00
Rex Zhu
5ed8d656d6
drm/amd/pp: Add stable Pstate clk display support in debugfs
...
The additional output are: PSTATE_SCLK and PSTATE_MCLK value
in MHz as:
300 MHz (PSTATE_SCLK)
300 MHz (PSTATE_MCLK)
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 >
2018-02-19 14:17:53 -05:00
Rex Zhu
dd70949d90
drm/amd/pp: Store stable Pstate clocks
...
User can use to calculate profiling ratios when
set UMD Pstate.
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 >
2018-02-19 14:17:53 -05:00
Rex Zhu
6390258a2f
drm/amd/pp: Add custom power profile mode support on Vega10
...
v2: delete uncessary blank line.
Add static const modifiers to an array
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 >
2018-02-19 14:17:52 -05:00
Rex Zhu
37c5c4dbf0
drm/amdgpu: add custom power policy support in sysfs
...
when cat pp_power_profile_mode on Vega10
NUM MODE_NAME BUSY_SET_POINT FPS USE_RLC_BUSY MIN_ACTIVE_LEVEL
0 3D_FULL_SCREEN : 70 60 1 3
1 POWER_SAVING : 90 60 0 0
2 VIDEO*: 70 60 0 0
3 VR : 70 90 0 0
4 COMPUTER : 30 60 0 6
5 CUSTOM : 0 0 0 0
the result show all the profile mode we can support and custom mode.
user can echo the num(0-4) to pp_power_profile_mode to select the profile
mode or can echo "5 value value value value" to enter CUSTOM mode.
the four parameter is set_point/FPS/USER_RLC_BUSY/MIN_ACTIVE_LEVEL.
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 >
2018-02-19 14:17:52 -05:00
Rex Zhu
e8ea1b9aa0
drm/amd/pp: Fix SMIO implementation on CI
...
Setup smio table(smio registers's address and voltage ID)
for various voltage domain.
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 >
2018-02-19 14:17:51 -05:00
Rex Zhu
53241e01b9
drm/amd/pp: Implement voltage regulator config on CI
...
Store the voltage regulator configuration
so we can properly query the voltage
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 >
2018-02-19 14:17:50 -05:00
Rex Zhu
59655cb6ab
drm/amd/pp: Add querying current gfx voltage for Vega10
...
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 >
2018-02-19 14:17:50 -05:00
Rex Zhu
84877256f6
drm/amd/pp: Add querying current gfx voltage for CI/VI
...
Store the voltage regulator configuration,
so we can properly query the voltage.
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 >
2018-02-19 14:17:49 -05:00
Rex Zhu
680731ade5
drm/amd/pp: Export registers for read vddc on VI/Vega10
...
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 >
2018-02-19 14:17:49 -05:00
Rex Zhu
039fdc94c1
drm/amd/pp: Add memory clock info display on Cz/St
...
show mclk info as in MHz on Cz/St as
0: 333Mhz *
1: 800Mhz
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 >
2018-02-19 14:17:48 -05:00
Christian König
5a4633c4b8
drm/amdgpu: forward pasid to backend flush implementations
...
rd the pasid from the VM code to the emit_vm_flush function and update
all implementations with the new parameter.
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 >
2018-02-19 14:17:47 -05:00
Christian König
ba35222437
drm/amdgpu: trace the PASID instead of the VM pointer
...
Makes more sense than tracing the kernel pointer.
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 >
2018-02-19 14:17:47 -05:00
Christian König
c35ff18823
drm/amdgpu: trace allocated PASIDs
...
Trace all allocated PASIDs.
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 >
2018-02-19 14:17:46 -05:00
Christian König
5c2ff9a60d
drm/amdgpu: always allocate a PASIDs for each VM v2
...
Start to always allocate a pasid for each VM.
v2: use dev_warn when we run out of PASIDs
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 >
2018-02-19 14:17:46 -05:00
Christian König
4b5f755049
drm/amdgpu: add amdgpu_pasid_free_delayed v2
...
Free up a pasid after all fences signaled.
v2: also handle the case when we can't allocate a fence array.
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 >
2018-02-19 14:17:45 -05:00
Christian König
373ac645c9
drm/amdgpu: move PD/PT address calculation into backend function
...
This way we can better handle the differences for CPU based updates.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:45 -05:00
Christian König
132f34e4b5
drm/amdgpu: move struct gart_funcs into amdgpu_gmc.h
...
And rename it to struct gmc_funcs.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Samuel Li <Samuel.Li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:44 -05:00
Christian König
770d13b19f
drm/amdgpu: move struct amdgpu_mc into amdgpu_gmc.h
...
And rename it to amdgpu_gmc as well.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Samuel Li <Samuel.Li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:43 -05:00
Christian König
da320625de
drm/amdgpu: remove agp_base
...
No AGP support for in this driver.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Samuel Li <Samuel.Li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:43 -05:00
Christian König
904a3374a9
drm/amdgpu: print the PASID with VM faults on GMC v8
...
Print that extra information on GMC v8.
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 >
2018-02-19 14:17:42 -05:00
Christian König
a9f7cd1b0b
drm/amdgpu: print the PASID with VM faults on GMC v7
...
Print that extra information on GMC v7.
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 >
2018-02-19 14:17:42 -05:00
Christian König
3816e42f5f
drm/amdgpu: rename pas_id to pasid
...
sed -i "s/pas_id/pasid/g" drivers/gpu/drm/amd/amdgpu/*.c
sed -i "s/pas_id/pasid/g" drivers/gpu/drm/amd/amdgpu/*.h
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 >
2018-02-19 14:17:41 -05:00
Samuel Li
09052fc376
drm/amdgpu: Move to gtt before cpu accesses dma buf.
...
To improve cpu read performance. This is implemented for APUs currently.
v2: Adapt to change https://lists.freedesktop.org/archives/amd-gfx/2017-October/015174.html
v3: Adapt to change "forward begin_cpu_access callback to drivers"
v4: Instead of v3, reuse drm_gem dmabuf_ops here. Also some minor fixes as suggested.
v5: only set dma_buf ops when it is valid (Samuel)
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:41 -05:00
Harry Wentland
6e227308a9
drm/amd/display: Enable VM support only on APUs newer than CZ
...
VM support is only available for CZ and newer APUs. Trying to
enable it for dGPU will blow up in DC.
v2: Don't enable gpu_vm_support for Raven yet since it leads to
a black screen. Need to debug this further before enabling.
Change-Id: Ibe467c36affe2e7a7ee740c8d4f73027ca807178
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Suggested-by: Alex Deucher <alexander.deucher@amd.com >
CC: Christian Koenig <christian.koenig@amd.com >
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:40 -05:00
Alex Deucher
2c9c178b7d
drm/amdgpu: only allow scatter/gather display with DC
...
Check if DC is enabled before allowing scanout buffers
to be pinned in system memory.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:39 -05:00
Christian König
5d43be0ccb
drm/amdgpu: allow framebuffer in GART memory as well
...
On CZ and newer APUs we can pin the fb into GART as well as VRAM.
v2: Don't enable gpu_vm_support for Raven yet since it leads to
a black screen. Need to debug this further before enabling.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Samuel Li <samuel.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:39 -05:00
Yong Zhao
c8553f4bd2
drm/amdgpu: Update MMHUB power gating register settings
...
The new register settings are needed to fix a tlb invalidation issue
when MMHUB power gating is turned on for Raven.
Signed-off-by: Yong Zhao <yong.zhao@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Eric Huang <JinhuiEric.Huang@amd.com >
Reviewed-by: Eric Huang <JinhuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:38 -05:00