linux-stable/drivers/gpu/drm/amd/amdgpu
Marek Olšák 95844d20ae drm/amdgpu: throttle buffer migrations at CS using a fixed MBps limit (v2)
The old mechanism used a per-submission limit that didn't take previous
submissions within the same time frame into account. It also filled VRAM
slowly when VRAM usage dropped due to a big eviction or buffer deallocation.

This new method establishes a configurable MBps limit that is obeyed when
VRAM usage is very high. When VRAM usage is not very high, it gives
the driver the freedom to fill it quickly. The result is more consistent
performance.

It can't keep the BO move rate low if lots of evictions are happening due
to VRAM fragmentation, or if a big buffer is being migrated.

The amdgpu.moverate parameter can be used to set a non-default limit.
Measurements can be done to find out which amdgpu.moverate setting gives
the best results.

Mainly APUs and cards with small VRAM will benefit from this. For F1 2015,
anything with 2 GB VRAM or less will benefit.

Some benchmark results - F1 2015 (Tonga 2GB):

Limit      MinFPS AvgFPS
Old code:  14     32.6
128 MB/s:  28     41
64 MB/s:   15.5   43
32 MB/s:   28.7   43.4
8 MB/s:    27.8   44.4
8 MB/s:    21.9   42.8 (different run)

Random drops in Min FPS can still occur (due to fragmented VRAM?), but
the average FPS is much better. 8 MB/s is probably a good limit for this
game & the current VRAM management. The random FPS drops are still to be
tackled.

v2: use a spinlock

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-30 17:54:30 -04:00
..
amdgpu.h drm/amdgpu: throttle buffer migrations at CS using a fixed MBps limit (v2) 2016-08-30 17:54:30 -04:00
amdgpu_acp.c PM / Domains: Allow genpd to power on during system PM phases 2016-06-16 15:01:43 +02:00
amdgpu_acp.h drm/amd: make a type-safe cgs_device struct. (v2) 2016-05-04 20:20:28 -04:00
amdgpu_acpi.c
amdgpu_afmt.c
amdgpu_amdkfd.c drm/amdgpu: move get_gpu_clock_counter into the gfx struct 2016-07-07 15:01:42 -04:00
amdgpu_amdkfd.h drm/amdgpu: Return -EPROBE_DEFER when amdkfd not loaded 2016-02-27 22:52:40 +02:00
amdgpu_amdkfd_gfx_v7.c drm/amdgpu: fix non-ANSI declaration of amdgpu_amdkfd_gfx_*_get_functions() 2016-01-28 14:39:34 +02:00
amdgpu_amdkfd_gfx_v8.c drm/amdgpu: fix non-ANSI declaration of amdgpu_amdkfd_gfx_*_get_functions() 2016-01-28 14:39:34 +02:00
amdgpu_atombios.c drm/amdgpu: To define whether the GPU has DCE engine. 2016-08-08 14:04:36 -04:00
amdgpu_atombios.h drm/amdgpu: To define whether the GPU has DCE engine. 2016-08-08 14:04:36 -04:00
amdgpu_atpx_handler.c drm/amdgpu: init atpx at switcheroo register time (v2) 2016-07-29 14:36:32 -04:00
amdgpu_benchmark.c drm/amdgpu: add direct submision option for copy_buffer 2016-08-22 13:47:18 -04:00
amdgpu_bios.c drivers/amdgpu: Use canonical form in branch predicates 2016-07-29 14:36:48 -04:00
amdgpu_bo_list.c drm/amd/amdgpu : adding new tracepoints to track memory information. 2016-07-07 14:51:29 -04:00
amdgpu_cgs.c drm/amdgpu: add support for getting sub_device id and 2016-08-25 12:23:00 -04:00
amdgpu_connectors.c drm/amdgpu: Add DRM_MODE_CONNECTOR_VIRTUAL connector in amdgpu_connector_add. 2016-08-08 14:12:56 -04:00
amdgpu_connectors.h
amdgpu_cs.c drm/amdgpu: throttle buffer migrations at CS using a fixed MBps limit (v2) 2016-08-30 17:54:30 -04:00
amdgpu_ctx.c drm/amdgpu: fix coding style in amdgpu_ctx.c 2016-02-12 15:42:54 -05:00
amdgpu_device.c drm/amdgpu: throttle buffer migrations at CS using a fixed MBps limit (v2) 2016-08-30 17:54:30 -04:00
amdgpu_display.c drm/amdgpu: Provide page_flip_target hook 2016-08-10 14:28:06 -04:00
amdgpu_dpm.c drm/amdgpu: use drm_mode_vrefresh() rather than mode->vrefresh 2016-05-04 20:31:02 -04:00
amdgpu_dpm.h
amdgpu_drv.c drm/amdgpu: throttle buffer migrations at CS using a fixed MBps limit (v2) 2016-08-30 17:54:30 -04:00
amdgpu_drv.h
amdgpu_encoders.c
amdgpu_fb.c drm/amdgpu: don't init fbdev if we don't have any connectors 2016-01-26 00:35:56 -05:00
amdgpu_fence.c drm/amdgpu: always signal all fences 2016-07-14 16:46:07 -04:00
amdgpu_gart.c drm/amdgpu: optionally enable GART debugfs file 2016-05-02 15:26:57 -04:00
amdgpu_gds.h amdgpu: move ttm stuff to amdgpu_ttm.h 2016-08-19 12:30:58 -04:00
amdgpu_gem.c drm/amdgpu: validate VM PTs only on eviction 2016-07-07 14:54:49 -04:00
amdgpu_gfx.c drm/amdgpu: add disable_cu parameter 2016-07-07 14:54:44 -04:00
amdgpu_gfx.h drm/amdgpu: add disable_cu parameter 2016-07-07 14:54:44 -04:00
amdgpu_i2c.c gpu: drm: amd: amdgpu: amdgpu_i2c: don't print error when adding adapter fails 2016-08-10 14:08:53 -04:00
amdgpu_i2c.h
amdgpu_ib.c drm/amd/amdgpu: Print ring name in amdgpu_ib_schedule() 2016-08-23 13:48:07 -04:00
amdgpu_ih.c drm/amdgpu: use amdgpu_bo_create_kernel in amdgpu_ih.c 2016-08-08 11:32:20 -04:00
amdgpu_ih.h
amdgpu_ioc32.c
amdgpu_irq.c drm/amdgpu: add amdgpu_irq_gpu_reset_resume_helper 2016-07-07 14:54:48 -04:00
amdgpu_irq.h drm/amdgpu: implement vi ih check/pre/post_soft_reset 2016-08-08 11:32:10 -04:00
amdgpu_job.c drm/amdgpu: cleanup hw reference handling in the IB tests 2016-07-14 16:46:05 -04:00
amdgpu_kms.c drm/amdgpu: track the number of vce rings 2016-08-25 11:21:43 -04:00
amdgpu_mn.c drm/amdgpu: make amdgpu_mn_get wait for mmap_sem killable 2016-05-23 17:04:14 -07:00
amdgpu_mode.h drm/amdgpu: Provide page_flip_target hook 2016-08-10 14:28:06 -04:00
amdgpu_object.c drm/amdgpu: stop adding dummy entry in amdgpu_ttm_placement_init 2016-08-22 13:47:24 -04:00
amdgpu_object.h drm/amdgpu: sync bo and shadow V3 2016-08-22 13:47:18 -04:00
amdgpu_pll.c
amdgpu_pll.h
amdgpu_pm.c drm/amd/amdgpu: change pptable output format from ASCII to binary 2016-08-08 11:32:57 -04:00
amdgpu_pm.h
amdgpu_powerplay.c drm/amd/powerplay: simplify struct amd_pp_init. 2016-08-25 12:23:41 -04:00
amdgpu_powerplay.h
amdgpu_prime.c drm/amdgpu: two minor 80 char fixes 2016-05-11 12:31:18 -04:00
amdgpu_ring.c drm/amdgpu: use amdgpu_bo_create_kernel in amdgpu_ring.c 2016-08-08 11:32:21 -04:00
amdgpu_sa.c Linux 4.7-rc5 2016-07-02 15:56:01 +10:00
amdgpu_sync.c drm/amdgpu: use a fence array for VMID management 2016-07-07 14:51:23 -04:00
amdgpu_test.c drm/amdgpu: add direct submision option for copy_buffer 2016-08-22 13:47:18 -04:00
amdgpu_trace.h drm/amdgpu: trace need_flush in grab_vm as well 2016-07-14 16:46:08 -04:00
amdgpu_trace_points.c
amdgpu_ttm.c drm/amdgpu: fix lru size grouping v2 2016-08-22 13:47:23 -04:00
amdgpu_ttm.h drm/amdgpu: fix lru size grouping v2 2016-08-22 13:47:23 -04:00
amdgpu_ucode.c
amdgpu_ucode.h
amdgpu_uvd.c drm/amdgpu: use memcpy_to/fromio for UVD fw upload 2016-08-24 16:25:06 -04:00
amdgpu_uvd.h drm/amdgpu: add a fence timeout for the IB tests v2 2016-07-29 14:37:04 -04:00
amdgpu_vce.c drm/amdgpu/vce3: add support for third vce ring 2016-08-25 11:21:51 -04:00
amdgpu_vce.h drm/amdgpu: add a fence timeout for the IB tests v2 2016-07-29 14:37:04 -04:00
amdgpu_vm.c drm/amdgpu: cleanup amdgpu_vm_bo_update params 2016-08-22 13:47:24 -04:00
atom.c
atom.h drm/amd: cleanup remaining spaces and tabs v2 2016-05-11 12:31:20 -04:00
atombios_crtc.c drm/amdgpu/atom: add support for new SetPixelClock table 2016-05-04 20:23:58 -04:00
atombios_crtc.h drm/amdgpu/atom: add SetDCEClock helper 2016-05-04 20:23:53 -04:00
atombios_dp.c drm/amdgpu: Don't retry 7 times in amdgpu_atombios_dp_get_dpcd() 2016-08-08 13:28:39 -04:00
atombios_dp.h
atombios_encoders.c drm/amdgpu: support backlight control for UNIPHY3 2016-07-14 16:46:06 -04:00
atombios_encoders.h
atombios_i2c.c drm/amdgpu: fix power distribution issue for Polaris10 XT 2016-07-14 16:39:35 -04:00
atombios_i2c.h drm/amdgpu: fix power distribution issue for Polaris10 XT 2016-07-14 16:39:35 -04:00
ci_dpm.c drm/amdgpu: refine uvd gate logic for CI. 2016-08-25 12:24:15 -04:00
ci_dpm.h drm/amdgpu: add the CI code to enable sclk OD(OverDrive) 2016-07-07 14:50:49 -04:00
ci_smc.c
cik.c drm/amdgpu: Change the virtual_display type from int to char*. 2016-08-10 14:04:17 -04:00
cik.h
cik_dpm.h
cik_ih.c drm/amd/amdgpu : Remove unused variable 2016-05-18 09:21:52 -04:00
cik_ih.h
cik_sdma.c drm/amdgpu: stop splitting PTE commands into smaller ones 2016-08-16 10:44:34 -04:00
cik_sdma.h
cikd.h drm/amd: cleanup remaining spaces and tabs v2 2016-05-11 12:31:20 -04:00
clearstate_ci.h
clearstate_defs.h
clearstate_vi.h
cz_dpm.c drm/amd/amdgpu: Tidy up cz_dpm.c 2016-08-25 14:02:55 -04:00
cz_dpm.h
cz_ih.c drm/amd/amdgpu : Remove unused variable 2016-05-18 09:22:12 -04:00
cz_ih.h
cz_smc.c
cz_smumgr.h drm/amd: cleanup remaining spaces and tabs v2 2016-05-11 12:31:20 -04:00
dce_v8_0.c drm/amdgpu: Fix indentation in dce_v8_0_audio_write_sad_regs() 2016-08-23 13:47:56 -04:00
dce_v8_0.h drm/amdgpu: Disable VGA render and crtc when init GMC. 2016-08-08 14:04:37 -04:00
dce_v10_0.c drm/amdgpu: Set MASTER_UPDATE_MODE to 0 again 2016-08-10 14:28:07 -04:00
dce_v10_0.h drm/amdgpu: Disable VGA render and crtc when init GMC. 2016-08-08 14:04:37 -04:00
dce_v11_0.c drm/amdgpu: Set MASTER_UPDATE_MODE to 0 again 2016-08-10 14:28:07 -04:00
dce_v11_0.h drm/amdgpu: Disable VGA render and crtc when init GMC. 2016-08-08 14:04:37 -04:00
dce_virtual.c drm/amdgpu: Hardcode virtual DCE vblank / scanout position return values 2016-08-17 15:42:50 -04:00
dce_virtual.h drm/amdgpu: Use software timer to generate vsync interrupt. 2016-08-08 14:07:18 -04:00
fiji_dpm.c drm/amdgpu: fix fw leak in non-powerplay dpm code 2016-06-09 10:48:56 -04:00
fiji_smc.c drivers/amdgpu: Remove spurious semicolons 2016-07-29 14:36:47 -04:00
fiji_smum.h
gfx_v7_0.c drm/amdgpu: pin shared GWS, GDS and OA resources 2016-08-08 11:32:16 -04:00
gfx_v7_0.h drm/amdgpu/gfx7: make gfx_v7_0_rlc_stop static 2016-07-07 15:01:58 -04:00
gfx_v8_0.c drm/amd/amdgpu: Simplify bitfield operations in gfx v8 2016-08-10 14:05:08 -04:00
gfx_v8_0.h drm/amdgpu/gfx8: remove stale function declaration 2016-08-08 11:32:58 -04:00
gmc_v7_0.c drm/amdgpu/gmc7: remove dead code (v2) 2016-08-23 13:48:04 -04:00
gmc_v7_0.h drm/amdgpu: drop wait_for_mc_idle asic callback 2016-07-07 14:54:50 -04:00
gmc_v8_0.c drm/amdgpu/gmc8: remove dead code (v2) 2016-08-23 13:48:04 -04:00
gmc_v8_0.h drm/amdgpu: drop wait_for_mc_idle asic callback 2016-07-07 14:54:50 -04:00
iceland_dpm.c drm/amdgpu: rename smumgr to smum for dpm 2016-07-15 12:32:50 -04:00
iceland_ih.c drm/amd/amdgpu : Remove unused variable 2016-05-18 09:22:17 -04:00
iceland_ih.h
iceland_sdma_pkt_open.h
iceland_smc.c drivers/amdgpu: Remove spurious semicolons 2016-07-29 14:36:47 -04:00
iceland_smum.h drm/amd/powerplay: rename smum header guards 2016-07-29 14:37:11 -04:00
Kconfig drm/amdgpu: move all Kconfig options to amdgpu/Kconfig 2016-08-08 11:33:29 -04:00
kv_dpm.c drm/amdgpu: use modules parameter to ctrl deep sleep feature in dpm 2016-08-08 11:32:53 -04:00
kv_dpm.h
kv_smc.c
Makefile drm/amdgpu: Initialize dce_virtual_ip_funcs 2016-08-08 13:44:20 -04:00
ObjectID.h drm/amdgpu: Add virtual connector and encoder macros. 2016-08-08 13:44:11 -04:00
ppsmc.h drm/amdgpu: add new definitions into ppsmc.h for iceland 2016-07-15 12:33:31 -04:00
sdma_v2_4.c drm/amdgpu: stop splitting PTE commands into smaller ones 2016-08-16 10:44:34 -04:00
sdma_v2_4.h
sdma_v3_0.c drm/amdgpu: stop splitting PTE commands into smaller ones 2016-08-16 10:44:34 -04:00
sdma_v3_0.h
smu_ucode_xfer_vi.h drm/amd/powerplay: Add smc_sk firmware to baffin & ellesmere. 2016-05-04 20:26:26 -04:00
tonga_dpm.c drm/amdgpu: fix fw leak in non-powerplay dpm code 2016-06-09 10:48:56 -04:00
tonga_ih.c drm/amdgpu: implement vi ih check/pre/post_soft_reset 2016-08-08 11:32:10 -04:00
tonga_ih.h
tonga_sdma_pkt_open.h
tonga_smc.c drivers/amdgpu: Remove spurious semicolons 2016-07-29 14:36:47 -04:00
tonga_smum.h
uvd_v4_2.c drm/amdgpu: switch UVD code to use UVD_NO_OP for padding 2016-08-24 16:25:05 -04:00
uvd_v4_2.h
uvd_v5_0.c drm/amdgpu: switch UVD code to use UVD_NO_OP for padding 2016-08-24 16:25:05 -04:00
uvd_v5_0.h
uvd_v6_0.c drm/amdgpu: switch UVD code to use UVD_NO_OP for padding 2016-08-24 16:25:05 -04:00
uvd_v6_0.h
vce_v2_0.c drm/amd/powerplay: add bypass mode for vce 2.0. 2016-08-25 12:22:24 -04:00
vce_v2_0.h
vce_v3_0.c drm/amdgpu: add vce bypass mode for tonga. 2016-08-25 12:22:40 -04:00
vce_v3_0.h
vi.c drm/amdgpu: Change the virtual_display type from int to char*. 2016-08-10 14:04:17 -04:00
vi.h
vi_dpm.h
vid.h drm/amdgpu/dce11: fix audio offset for asics with >7 audio pins 2016-05-11 13:30:33 -04:00