diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-25 15:18:46 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-25 16:13:18 +0000 |
commit | 56fd91fc830d7a210e3a0e70ab41261a1f5baa83 (patch) | |
tree | fdf5c2850fde13c69202bd58693c550c458dc70b /src | |
parent | b12f0da0bedb7faf0c96e44ca2d02baec807ad51 (diff) |
sna/gen3+: Restart vertex space checks after lock contention
If we end up contending for the vertex lock, we need to double check
there is sufficient vertex space left for us.
Bugzill: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1124576
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/gen3_render.c | 9 | ||||
-rw-r--r-- | src/sna/gen4_render.c | 9 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 9 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 9 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 9 |
5 files changed, 30 insertions, 15 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index ecf3e8aa..9cc13492 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -1990,9 +1990,12 @@ start: goto flush; } - if (unlikely(sna->render.vertex_offset == 0 && - !gen3_rectangle_begin(sna, op))) - goto flush; + if (unlikely(sna->render.vertex_offset == 0)) { + if (!gen3_rectangle_begin(sna, op)) + goto flush; + else + goto start; + } assert(op->floats_per_rect >= vertex_space(sna)); assert(rem <= vertex_space(sna)); diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 00518d4c..d08d762b 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -654,9 +654,12 @@ start: goto flush; } - if (unlikely(sna->render.vertex_offset == 0 && - !gen4_rectangle_begin(sna, op))) - goto flush; + if (unlikely(sna->render.vertex_offset == 0)) { + if (!gen4_rectangle_begin(sna, op)) + goto flush; + else + goto start; + } assert(op->floats_per_rect >= vertex_space(sna)); assert(rem <= vertex_space(sna)); diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 483ca4b1..f2368773 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -640,9 +640,12 @@ start: goto flush; } - if (unlikely(sna->render.vertex_offset == 0 && - !gen5_rectangle_begin(sna, op))) - goto flush; + if (unlikely(sna->render.vertex_offset == 0)) { + if (!gen5_rectangle_begin(sna, op)) + goto flush; + else + goto start; + } assert(op->floats_per_rect >= vertex_space(sna)); assert(rem <= vertex_space(sna)); diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 60958e16..fa4c47b1 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -1189,9 +1189,12 @@ start: goto flush; } - if (unlikely(sna->render.vertex_offset == 0 && - !gen6_rectangle_begin(sna, op))) - goto flush; + if (unlikely(sna->render.vertex_offset == 0)) { + if (!gen6_rectangle_begin(sna, op)) + goto flush; + else + goto start; + } assert(op->floats_per_rect >= vertex_space(sna)); assert(rem <= vertex_space(sna)); diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index d169388b..bd14d90f 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -1334,9 +1334,12 @@ start: goto flush; } - if (unlikely(sna->render.vertex_offset == 0 && - !gen7_rectangle_begin(sna, op))) - goto flush; + if (unlikely(sna->render.vertex_offset == 0)) { + if (!gen7_rectangle_begin(sna, op)) + goto flush; + else + goto start; + } assert(op->floats_per_rect >= vertex_space(sna)); assert(rem <= vertex_space(sna)); |