~ubuntu-branches/ubuntu/raring/xserver-xorg-video-intel/raring

« back to all changes in this revision

Viewing changes to debian/patches/uxa-flush-batch-immediately.diff

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-09-12 07:43:59 UTC
  • mfrom: (1.4.22)
  • Revision ID: package-import@ubuntu.com-20120912074359-i3h8ol6hoghbemoq
Tags: 2:2.20.7-0ubuntu1
Merge from unreleased debian git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
commit 6211d0914e2ed1cdd4cc2e170ee16129fc9f0d73
2
 
Author: Chris Wilson <chris@chris-wilson.co.uk>
3
 
Date:   Wed Sep 5 12:33:08 2012 +0100
4
 
 
5
 
    uxa: Flush batch immediately after queuing a WAIT_FOR_EVENT
6
 
    
7
 
    We still encounter hangs with kernel-3.5 with the culprit being a wait
8
 
    on a disabled pipe. As we thoroughly check before that the pipe is still
9
 
    disabled and flush before a modeset, the only possibility that remains
10
 
    is that DPMS is disabling the pipe before we submit. Close that race by
11
 
    always submitting the batch immediately after a WAIT_FOR_EVENT.
12
 
    
13
 
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
14
 
 
15
 
diff --git a/src/intel_dri.c b/src/intel_dri.c
16
 
index fa1660c..a1bac9a 100644
17
 
--- a/src/intel_dri.c
18
 
+++ b/src/intel_dri.c
19
 
@@ -540,6 +540,11 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
20
 
                          0, 0);
21
 
 
22
 
        FreeScratchGC(gc);
23
 
+
24
 
+       /* And make sure the WAIT_FOR_EVENT is queued before any
25
 
+        * modesetting/dpms operations on the pipe.
26
 
+        */
27
 
+       intel_batch_submit(scrn);
28
 
 }
29
 
 
30
 
 #if DRI2INFOREC_VERSION >= 4
31
 
diff --git a/src/intel_video.c b/src/intel_video.c
32
 
index 0be72e2..09782aa 100644
33
 
--- a/src/intel_video.c
34
 
+++ b/src/intel_video.c
35
 
@@ -1585,6 +1585,11 @@ I830PutImageTextured(ScrnInfoPtr scrn,
36
 
        intel_get_screen_private(scrn)->needs_flush = TRUE;
37
 
        DamageDamageRegion(drawable, clipBoxes);
38
 
 
39
 
+       /* And make sure the WAIT_FOR_EVENT is queued before any
40
 
+        * modesetting/dpms operations on the pipe.
41
 
+        */
42
 
+       intel_batch_submit(scrn);
43
 
+
44
 
        return Success;
45
 
 }
46