aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-07drm/amdgpu: Poll for both connect/disconnect on analog connectorsLyude1-3/+4
DRM_CONNECTOR_POLL_CONNECT only enables polling for connections, not disconnections. Because of this, we end up losing hotplug polling for analog connectors once they get connected. Easy way to reproduce: - Grab a machine with an AMD GPU and a VGA port - Plug a monitor into the VGA port, wait for it to update the connector from disconnected to connected - Disconnect the monitor on VGA, a hotplug event is never sent for the removal of the connector. Originally, only using DRM_CONNECTOR_POLL_CONNECT might have been a good idea since doing VGA polling can sometimes result in having to mess with the DAC voltages to figure out whether or not there's actually something there since VGA doesn't have HPD. Doing this would have the potential of showing visible artifacts on the screen every time we ran a poll while a VGA display was connected. Luckily, amdgpu_vga_detect() only resorts to this sort of polling if the poll is forced, and DRM's polling helper doesn't force it's polls. Additionally, this removes some assignments to connector->polled that weren't actually doing anything. Cc: [email protected] Signed-off-by: Lyude <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/radeon: Poll for both connect/disconnect on analog connectorsLyude1-6/+9
DRM_CONNECTOR_POLL_CONNECT only enables polling for connections, not disconnections. Because of this, we end up losing hotplug polling for analog connectors once they get connected. Easy way to reproduce: - Grab a machine with a radeon GPU and a VGA port - Plug a monitor into the VGA port, wait for it to update the connector from disconnected to connected - Disconnect the monitor on VGA, a hotplug event is never sent for the removal of the connector. Originally, only using DRM_CONNECTOR_POLL_CONNECT might have been a good idea since doing VGA polling can sometimes result in having to mess with the DAC voltages to figure out whether or not there's actually something there since VGA doesn't have HPD. Doing this would have the potential of showing visible artifacts on the screen every time we ran a poll while a VGA display was connected. Luckily, radeon_vga_detect() only resorts to this sort of polling if the poll is forced, and DRM's polling helper doesn't force it's polls. Additionally, this removes some assignments to connector->polled that weren't actually doing anything. Cc: [email protected] Signed-off-by: Lyude <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: stop/resume fb access when gpu reset V3Chunming Zhou1-0/+7
V2: Add wait_for_mc_idle after stopping fb access V3: 1. Remove resume fb access since there is no need to do that for gpu reset. 2. Move stop fb access to amdgpu_gpu_reset function, since it's the same for all asics. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> (V1) Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amd/powerplay: change condition judgment as function's return value changed.Rex Zhu1-7/+6
Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amd/powerplay: functions's return state was reversedRex Zhu1-2/+2
In commit 195567e99bdf6491a370b71a1dcf6b4c891495d7, use true/false instead of 1/0 to fix build warning. But the original logic: '0' means true and '1' means false. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: stop disabling irqs when it isn't neccessaryChristian König1-8/+6
A regular spin_lock/unlock should do here as well. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: must update page table after gpu resetChunming Zhou1-0/+1
Record the gpu reset count in vmid to identify if gpu reset happened. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: save/restore bios scratch when gpu resetChunming Zhou1-1/+4
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: must update page table after gpu resetChunming Zhou2-0/+5
Record the gpu reset count in vmid to identify if gpu reset happened. Reviewed-by: Christian König <[email protected]> Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/ttm: fix stupid parameter inversion in the pipeline codeChristian König1-1/+1
We want to keep the newest fence, not the oldest one. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amd/powerplay: fix typos in comment in polaris' hwmgrAlexandre Demers1-2/+2
Signed-off-by: Alexandre Demers <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amd/powerplay: fix trivial typo and tidy commentAlexandre Demers1-1/+1
Signed-off-by: Alexandre Demers <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amd/amdgpu: Set DRIVER_MODESET feature flag at build timeFrank Binns1-2/+1
This flag was being set unconditionally at runtime so just set it at compile time instead. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Frank Binns <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: Unpin BO if we can't get fences in amdgpu_crtc_page_flipMichel Dänzer1-4/+4
If reservation_object_get_fences_rcu failed, we'd previously go directly to the cleanup label, so we'd leave the BO pinned. While we're at it, remove two amdgpu_bo_unreserve calls in favour of two new labels. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/gmc7: remove duplicate wait_for_idle functionsAlex Deucher1-28/+5
Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/gmc8: remove duplicate wait_for_idle functionsAlex Deucher1-33/+5
Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/dce8: fix flash with white screen on monitorJunwei Zhang1-60/+7
Fixed mc stop and resume hardware programming sequence. Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: skip invalid ip blocks in ip helpersAlex Deucher1-0/+8
Skip IP blocks that are not enabled. Reviewed-by: Chunming zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: add missing breaksAlex Deucher1-0/+2
Saves a few CPU cycles. Reviewed-by: Chunming zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: add IP helpers for wait_for_idle and is_idleAlex Deucher2-0/+34
Helpers to to call the IP functions for the selected IP. Reviewed-by: Chunming zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/powerplay/cz: add missing call to powergate VCEAlex Deucher1-1/+1
Not enabled yet, but missing the call. Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/dce11: update async flip update timeAlex Deucher1-3/+2
Use UPDATE_IMMEDIATE (update on next data request boundary) rather than UPDATE_H_RETRACE (update on next line boundary). The data request boundary is less than a scanline, so it update will happen sooner. Cc: Vitaly Prosyak <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/ttm: wait for eviction in ttm_bo_force_list_cleanChristian König1-0/+18
Now that we can pipeline evictions we need to wait for them to finish when we cleanup a memory domain. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: don't update page tables for VM emulationChristian König1-7/+8
It's just overhead to do so and allocating a VMID when we don't need one is actually a bit dangerous. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: implement HDP functions for UVD v2Christian König3-0/+88
Flush and invalidate the HDP caches. v2: fix typo in comment Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: change pcie_gen_cap magic code to macroHuang Rui5-9/+20
This patch changes pcie_gen_cap magic code to macro to make it more readable. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Rex Zhu <[email protected]> Signed-off-by: Huang Rui <[email protected]> Cc: Eric Huang <[email protected]> Cc: Ken Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/gfx7: make gfx_v7_0_rlc_stop staticAlex Deucher2-4/+1
Not used outside of gfx7. Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/gfx7: switch to using the existing rlc callbacksAlex Deucher4-10/+14
gfx8 already uses them. Remove the direct exports and use the callbacks fpr gfx7. Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: move select_se_sh into the gfx structAlex Deucher6-7/+12
It's gfx IP specific, not asic specific, so move to a gfx callback. Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: move get_gpu_clock_counter into the gfx structAlex Deucher9-14/+22
It's gfx IP specific, not asic specific, so move to a gfx callback. Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: drop wait_for_mc_idle asic callbackAlex Deucher7-19/+8
Only used in the gmc IP modules so just call the local function directly. Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/gmc: make some functions staticAlex Deucher4-16/+8
These are not used outside of the respective gmc ip modules. Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: validate VM PTs only on evictionChristian König4-4/+20
We don't need to validate them again if the eviction counter didn't changed. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: add eviction counterChristian König2-0/+6
Keep track of the number of evictions since boot. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: add amdgpu_irq_gpu_reset_resume_helperChunming Zhou3-0/+14
irq need to update when gpu reset happens. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König [email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amd/powerplay: make sure VCE is disabled by defaultArindam Nath1-0/+1
This patch is a port of similar patch for amdgpu when PP is disabled. Since the code flow is little different when PP is enabled, we need to make sure the patch is applied for PP enabled path as well. With the current code, when we boot with the amdgpu driver enabled and loaded, the VCE also automatically remains enabled since bootup. This can be verified from the output of amdgpu_pm_info. It does not matter whether we boot into command line directly or into X, the VCE stays enabled the entire time. This patch addresses the issue and makes sure that VCE is turned on only during playback, and remains disabled otherwise. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Arindam Nath <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amd/amdgpu: make sure VCE is disabled by defaultArindam Nath1-0/+1
With the current code, when we boot with the amdgpu driver enabled and loaded, the VCE also automatically remains enabled since bootup. This can be verified from the output of amdgpu_pm_info. It does not matter whether we boot into command line directly or into X, the VCE stays enabled the entire time. This patch addresses the issue and makes sure that VCE is turned on only during playback, and remains disaled otherwise. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Arindam Nath <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: disable compute pipeline sync workaround when using fixed fwAlex Deucher1-1/+27
No need to stall the pipe when we are using firmware with the fix. Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/gfx8: set USER_SHADER_ARRAY_CONFIG based on disable_cu parameterNicolai Hähnle1-0/+20
v2: do not overwrite register when bitmap is zero Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu/gfx7: set USER_SHADER_ARRAY_CONFIG based on disable_cu parameterNicolai Hähnle1-0/+20
v2: do not overwrite register when bitmap is zero Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: add disable_cu parameterNicolai Hähnle4-0/+51
This parameter will allow disabling individual CUs on module load, e.g. amdgpu.disable_cu=2.0.3,2.0.4 to disable CUs 3 and 4 of SE2. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: evict vram when gpu resetChunming Zhou1-0/+4
On workstation cards with ECC vram, the entirety of vram is cleared to 0 on asic init to set the ECC status correctly. On non ECC boards, I don't think they do any explicit clearing, but the vram controller is reset which may cause issues with the data there. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: block scheduler when gpu resetChunming Zhou2-5/+27
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07amdgpu: use NULL instead of 0 for pointerArnd Bergmann1-1/+1
In the AMD powerplay driver, a pointer is checked for validity by comparing against an integer '0', which causes a harmless warning when building with "make W=1": drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/processpptables.c:1502:16: error: ordered comparison of pointer with integer zero [-Werror=extra] This changes the code to the more conventional "if (pointer)" check. Reviewed-by: Christian König <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: pipeline evictions as wellChristian König1-2/+4
This boosts Xonotic from 38fps to 47fps when artificially limiting VRAM to 256MB for testing. It should improve all CPU bound rendering situations where we have a lot of swapping to/from VRAM. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/amdgpu: save the PD addr before scheduling the jobChristian König2-4/+4
When we pipeline evictions the page directory could already be moving somewhere else when grab_id is called. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/ttm: add the infrastructure for pipelined evictionsChristian König3-5/+160
Free up the memory immediately, remember the last eviction for each domain and make new allocations depend on the last eviction to be completed. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/ttm: simplify ttm_bo_waitChristian König1-33/+4
As far as I can see no need for a custom implementation any more. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/ttm: remove TTM_BO_PRIV_FLAG_MOVINGChristian König5-15/+19
Instead of using the flag just remember the fence of the last move operation. This avoids waiting for command submissions pipelined after the move, but before accessing the BO with the CPU again. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-07-07drm/ttm: remove no_gpu_wait param from ttm_bo_move_accel_cleanupChristian König5-9/+3
It isn't used and not waiting for the GPU after scheduling a move is actually quite dangerous. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>