Hawking Zhang
acdf249f31
drm/amdgpu: split soc15ip header into ip and ip_offset header
...
ip base could be different per ASIC since from soc15. split soc15
header into common ip/hw_id header and asic specific ip offset header
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:12 -05:00
Andrey Grodzovsky
7cce958431
drm/amdgpu: Use new TTM flag to avoid OOM triggering.
...
Avoid OOM on syatem pages allocations.
v2:
Remove modeprobe parameter, make this behaviour the only option.
v3:
Move setting no_retry flag into amdgpu_ttm_init.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-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:18:12 -05:00
Christian König
250b422833
drm/amdgpu: add PASID mapping for GMC v9
...
This way we can see the PASID in VM faults.
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:18:11 -05:00
Christian König
86ea2ff698
drm/amdgpu: add PASID mapping for GMC v8
...
This way we can see the PASID in VM faults.
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:18:11 -05:00
Christian König
0da63bbb5b
drm/amdgpu: add PASID mapping for GMC v7
...
This way we can see the PASID in VM faults.
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:18:10 -05:00
Christian König
9096d6e51a
drm/amdgpu: implement gmc_v9_0_emit_flush_gpu_tlb
...
Unify tlb flushing for gmc v9.
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:09 -05:00
Christian König
5518625d6a
drm/amdgpu: implement gmc_v8_0_emit_flush_gpu_tlb
...
Unify tlb flushing for gmc v8.
v2: handle UVD v6 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:09 -05:00
Christian König
d9a701ccd6
drm/amdgpu: implement gmc_v7_0_emit_flush_gpu_tlb
...
Unify tlb flushing for gmc v7.
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
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