debian/changelog | 7 +++ debian/patches/baytrail-sna-vsync.patch | 70 ++++++++++++++++++++++++++++++++ debian/patches/haswell-sna-vsync.patch | 33 +++++++++++++++ debian/patches/series | 2 4 files changed, 112 insertions(+)
New commits: commit 63a2c517608379e61cd30a29ad4e88b031d59d37 Author: Robert Hooker <sarv...@ubuntu.com> Date: Fri Jan 10 11:28:39 2014 -0500 Backport 2 fixes to fix vsync on baytrail and haswell. diff --git a/debian/changelog b/debian/changelog index 2dc47d9..c064fda 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-video-intel (2:2.99.904-0ubuntu2.1) saucy-proposed; urgency=low + + * Add two patch series to fix vsync hangs on haswell and baytrail devices. + Thanks timo-jyrinki and timchen119! (LP: #1243261) + + -- Robert Hooker <sarv...@ubuntu.com> Fri, 10 Jan 2014 11:24:45 -0500 + xserver-xorg-video-intel (2:2.99.904-0ubuntu2) saucy-proposed; urgency=low * sna-sanitize-output-crtc.diff: Fix a crash when failing to probe the diff --git a/debian/patches/baytrail-sna-vsync.patch b/debian/patches/baytrail-sna-vsync.patch new file mode 100644 index 0000000..1147847 --- /dev/null +++ b/debian/patches/baytrail-sna-vsync.patch @@ -0,0 +1,70 @@ +This is a squash of bd22abee8f33b20ff6bc7297b0a9ae8708d18727 and +0e692800055827cf526c7539515c71aecb58bf30 from xf86-video-intel git backported +to 2.99.904. + +=== modified file 'src/sna/sna_display.c' +--- a/src/sna/sna_display.c 2014-01-10 04:13:58 +0000 ++++ b/src/sna/sna_display.c 2014-01-10 08:15:02 +0000 +@@ -3571,6 +3571,52 @@ + return true; + } + ++static bool sna_emit_wait_for_scanline_vlv(struct sna *sna, ++ xf86CrtcPtr crtc, ++ int pipe, int y1, int y2, ++ bool full_height) ++{ ++ uint32_t display_base = 0x180000; ++ uint32_t event; ++ uint32_t *b; ++ ++ return false; /* synchronisation? I've heard of that */ ++ ++ if (!sna->kgem.has_secure_batches) ++ return false; ++ ++ assert(y1 >= 0); ++ assert(y2 > y1); ++ assert(sna->kgem.mode); ++ ++ /* Always program one less than the desired value */ ++ if (--y1 < 0) ++ y1 = crtc->bounds.y2; ++ y2--; ++ ++ b = kgem_get_batch(&sna->kgem); ++ sna->kgem.nbatch += 4; ++ ++ if (pipe == 0) { ++ if (full_height) ++ event = MI_WAIT_FOR_PIPEA_SVBLANK; ++ else ++ event = MI_WAIT_FOR_PIPEA_SCAN_LINE_WINDOW; ++ } else { ++ if (full_height) ++ event = MI_WAIT_FOR_PIPEB_SVBLANK; ++ else ++ event = MI_WAIT_FOR_PIPEB_SCAN_LINE_WINDOW; ++ } ++ b[0] = MI_LOAD_REGISTER_IMM | 1; ++ b[1] = display_base + 0x70004 + 0x1000 * pipe; ++ b[2] = (1 << 31) | (y1 << 16) | y2; ++ b[3] = MI_WAIT_FOR_EVENT | event; ++ ++ sna->kgem.batch_flags |= I915_EXEC_SECURE; ++ return true; ++} ++ + static bool sna_emit_wait_for_scanline_ivb(struct sna *sna, + xf86CrtcPtr crtc, + int pipe, int y1, int y2, +@@ -3792,7 +3838,7 @@ + else if (sna->kgem.gen >= 075) + ret = sna_emit_wait_for_scanline_hsw(sna, crtc, pipe, y1, y2, full_height); + else if (sna->kgem.gen == 071) +- ret =sna_emit_wait_for_scanline_gen6(sna, crtc, pipe, y1, y2, full_height); ++ ret =sna_emit_wait_for_scanline_vlv(sna, crtc, pipe, y1, y2, full_height); + else if (sna->kgem.gen >= 070) + ret = sna_emit_wait_for_scanline_ivb(sna, crtc, pipe, y1, y2, full_height); + else if (sna->kgem.gen >= 060) + diff --git a/debian/patches/haswell-sna-vsync.patch b/debian/patches/haswell-sna-vsync.patch new file mode 100644 index 0000000..c0f33b6 --- /dev/null +++ b/debian/patches/haswell-sna-vsync.patch @@ -0,0 +1,33 @@ +From 68cef6cd281572fcfb76a341dc45b7c8e5baffe6 Mon Sep 17 00:00:00 2001 +From: Chris Wilson <ch...@chris-wilson.co.uk> +Date: Thu, 07 Nov 2013 13:09:25 +0000 +Subject: sna/gen7: Request secure batches for Haswell vsync + +Since commit 8ff8eb2b38dc705f5c86f524c1cd74a811a7b04c +Author: Chris Wilson <ch...@chris-wilson.co.uk> +Date: Mon Sep 9 16:23:04 2013 +0100 + + sna/hsw: Scanline waits require both DERRMR and forcewake + +we have been emitting LRI to enable vsync on the render ring. This +requires a privileged batch buffer, and whilst we were checking for +kernel support, we forgot to actually tell the kernel to submit the +batch with the right privileges. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71328 +Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> +--- +diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c +index eb30dfa..889019c 100644 +--- a/src/sna/sna_display.c ++++ b/src/sna/sna_display.c +@@ -3692,6 +3692,7 @@ static bool sna_emit_wait_for_scanline_hsw(struct sna *sna, + b[15] = 0x44050; /* DERRMR */ + b[16] = ~0; + ++ sna->kgem.batch_flags |= I915_EXEC_SECURE; + return true; + } + +-- +cgit v0.9.0.2-2-gbebe diff --git a/debian/patches/series b/debian/patches/series index 421fa2f..0077f49 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,5 @@ xmir.patch sna-sanitize-output-crtc.diff +baytrail-sna-vsync.patch +haswell-sna-vsync.patch -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1w1exc-0006jr...@moszumanska.debian.org