Alex Deucher
5ec36e2d70
drm/amdgpu/pm: handle fan properly when card is powered down
...
Return an error if the user tried to check or set the fan
parameters while the card is powered down (e.g., on a PX/HG
system for example). This makes the fan consistent with the
temperature stuff.
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:49 -05:00
Christian König
6f05c4e9d1
drm/amdgpu: move static CSA address to top of address space v2
...
Move the CSA area to the top of the VA space to avoid clashing with
HMM/ATC in the lower range on GFX9.
v2: wrong sign noticed by Roger, rebase on CSA_VADDR cleanup, handle VA
hole on GFX9 as well.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Monk Liu <monk.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:48 -05:00
Alex Deucher
f75a9a5d6c
drm/amdgpu/soc15: don't abuse IP soft reset for adapter reset
...
The IP soft reset interface is for per IP reset but it was
being abused for adapter reset on soc15 asics. Adjust the
interface to make it explicit.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:31 -05:00
Alex Deucher
e7f9ccb437
drm/amdgpu/psp: use a function pointer structure
...
This way we can make all of the IP specific functions static,
and we only need a single entry point into the PSP IP modules.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:31 -05:00
Christian König
97745f6852
drm/amdgpu: consistently use AMDGPU_CSA_VADDR
...
Instead of repeating this multiple times.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Monk Liu <monk.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:30 -05:00
Christian König
a3e9a15a25
drm/amdgpu: apply top reserved VA space to pre Vega10 as well
...
Reserve VA space at the top for older generations as well.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Monk Liu <monk.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:30 -05:00
Christian König
18d09e63e0
drm/amdgpu: reduce reserved VA size
...
1MB should be more than enough, currently we use about 8K.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Monk Liu <monk.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:29 -05:00
Samuel Li
734dd01d56
drm/amdgpu: rename amdgpu_crtc_idx_to_irq_type
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:29 -05:00
Samuel Li
aa8e286a8a
drm/amdgpu: rename amdgpu_get_crtc_scanoutpos
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:28 -05:00
Samuel Li
0c16443a1b
drm/amdgpu: rename amdgpu_crtc_scaling_mode_fixup
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:27 -05:00
Samuel Li
166140fb24
drm/amdgpu: rename amdgpu_update_display_priority
...
Rename as amdgpu_display_update_priority for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:27 -05:00
Samuel Li
3dc9b1ce80
drm/amdgpu: rename amdgpu_modeset_create_props
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:26 -05:00
Samuel Li
4d4772f6ab
drm/amdgpu: rename amdgpu_user_framebuffer_create
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:26 -05:00
Samuel Li
9da3f2d934
drm/amdgpu: rename amdgpu_framebuffer_init
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:25 -05:00
Samuel Li
e0b5b5ec0b
drm/amdgpu: rename amdgpu_ddc_probe
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:24 -05:00
Samuel Li
50af9193b3
drm/amdgpu: rename amdgpu_print_display_setup
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:24 -05:00
Samuel Li
775a836425
drm/amdgpu: rename amdgpu_crtc_set_config
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:23 -05:00
Samuel Li
0cd1193236
drm/amdgpu: rename amdgpu_crtc_page_flip_target
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:23 -05:00
Samuel Li
3a05dc000a
drm/amdgpu: rename static functions in amdgpu_display.c
...
Add display to the name for consistency.
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:22 -05:00
Christian König
2ee150cda7
drm/amdgpu: remove now superflous *_hdp operation
...
All HDP invalidation and most flush can now be replaced by the generic
ASIC function.
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:22 -05:00
Christian König
1b9d17db1c
drm/amdgpu: fallback to generic HDP operation
...
When ring special operations aren't available we can fallback to the
generic ASIC operations.
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:21 -05:00
Christian König
698825653f
drm/amdgpu: add optional ring to *_hdp callbacks
...
This adds an optional ring to the invalidate_hdp and flush_hdp
callbacks. If the ring isn't specified or the emit_wreg function not
available the HDP operation will be done with the CPU otherwise by
writing on the ring.
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:20 -05:00
Rex Zhu
e3933f26b6
drm/amd/pp: Add edit/commit/show OD clock/voltage support in sysfs
...
when cat pp_od_clk_voltage it show
OD_SCLK:
0: 300Mhz 800 mV
1: 466Mhz 818 mV
2: 751Mhz 824 mV
3: 1019Mhz 987 mV
4: 1074Mhz 1037 mV
5: 1126Mhz 1087 mV
6: 1169Mhz 1137 mV
7: 1206Mhz 1150 mV
OD_MCLK:
0: 300Mhz 800 mV
1: 1650Mhz 1000 mV
echo "s/m level clock voltage" to change
sclk/mclk's clock and voltage
echo "r" to restore default value.
echo "c" to commit the user setting.
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:18:17 -05:00
Alex Deucher
9950cda2a0
drm/amdgpu: drop the drm irq pre/post/un install callbacks
...
The preinstall callback didn't do anything because not all
of the IPs were initialized when it was called.
Move the postinstall setup into sequence in the driver.
The uninstall callback disabled all interrupt source, but
it got called too late in the driver sequence and caused problems
with IPs who already freed the relevant data structures. Move
the call into the right place in the driver sequence.
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Tested-By: Mikita Lipski <mikita.lipski@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:16 -05:00
Hawking Zhang
f797dd5184
drm/amdgpu: include new ip and ip offset headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:18:13 -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