aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_drv.c
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2014-07-29 00:21:44 -0400
committerAlex Deucher <alexander.deucher@amd.com>2014-08-05 08:54:00 -0400
commit39dc5454e33b9e76d437bef1bdc1a453a81a2fc2 (patch)
tree8c19ec5d4cea956bf13d494a1e33d53be2e36eaf /drivers/gpu/drm/radeon/radeon_drv.c
parent9eb401af05f298ba1e85e3f1e980dc8c826fb31d (diff)
drm/radeon: Use pflip irqs for pageflip completion if possible. (v2)
Skip the "manual" pageflip completion checks via polling and guessing in the vblank handler radeon_crtc_handle_vblank() on asics which are known to reliably support hw pageflip completion irqs. Those pflip irqs are a more reliable and race-free method of handling pageflip completion detection, whereas the "classic" polling method has some small races in combination with dpm on, and with the reworked pageflip implementation since Linux 3.16. On old asics without pflip irqs, the classic method is used. On asics with known good pflip irqs, only pflip irqs are used by default, but a new module parameter "use_pflipirqs" allows to override this in case we encounter asics in the wild with unreliable or faulty pflip irqs. A module parameter of 0 allows to use the classic method only in such a case. A parameter of 1 allows to use both classic method and pflip irqs as additional band-aid to avoid some small races which could happen with the classic method alone. The setting 1 gives Linux 3.16 behaviour. Hw pflip irqs are available since R600. Tested on DCE-4, AMD Cedar - FirePro 2270. v2: agd5f: only enable pflip interrupts on DCE4+ as they are not reliable on older asics. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_drv.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 8688e860e6a0..a773830c6c40 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -178,6 +178,7 @@ int radeon_hard_reset = 0;
178int radeon_vm_size = 8; 178int radeon_vm_size = 8;
179int radeon_vm_block_size = -1; 179int radeon_vm_block_size = -1;
180int radeon_deep_color = 0; 180int radeon_deep_color = 0;
181int radeon_use_pflipirq = 2;
181 182
182MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); 183MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers");
183module_param_named(no_wb, radeon_no_wb, int, 0444); 184module_param_named(no_wb, radeon_no_wb, int, 0444);
@@ -254,6 +255,9 @@ module_param_named(vm_block_size, radeon_vm_block_size, int, 0444);
254MODULE_PARM_DESC(deep_color, "Deep Color support (1 = enable, 0 = disable (default))"); 255MODULE_PARM_DESC(deep_color, "Deep Color support (1 = enable, 0 = disable (default))");
255module_param_named(deep_color, radeon_deep_color, int, 0444); 256module_param_named(deep_color, radeon_deep_color, int, 0444);
256 257
258MODULE_PARM_DESC(use_pflipirq, "Pflip irqs for pageflip completion (0 = disable, 1 = as fallback, 2 = exclusive (default))");
259module_param_named(use_pflipirq, radeon_use_pflipirq, int, 0444);
260
257static struct pci_device_id pciidlist[] = { 261static struct pci_device_id pciidlist[] = {
258 radeon_PCI_IDS 262 radeon_PCI_IDS
259}; 263};