xf86-video-intel: src/sna/sna_io.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Nov 17 15:12:47 UTC 2019
src/sna/sna_io.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit e628d22673dfa494230e6f79ceff7d178137c71a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Nov 17 15:10:56 2019 +0000
sna: Fix overflow calculation for number of boxes that fit
We detect when the number of boxes we wished to emit into the batch
would overflow, but then miscalculated the number that would actually fit.
References: https://bugs.freedesktop.org/show_bug.cgi?id=112296
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index 03509f03..de5ac5e6 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -491,7 +491,7 @@ fallback:
nbox_this_time = tmp_nbox;
rem = kgem_batch_space(kgem);
if (10*nbox_this_time > rem)
- nbox_this_time = rem / 8;
+ nbox_this_time = rem / 10;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc) / 2;
assert(nbox_this_time);
@@ -1061,7 +1061,7 @@ tile:
nbox_this_time = nbox;
rem = kgem_batch_space(kgem);
if (10*nbox_this_time > rem)
- nbox_this_time = rem / 8;
+ nbox_this_time = rem / 10;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc) / 2;
assert(nbox_this_time);
@@ -1563,7 +1563,7 @@ tile:
nbox_this_time = nbox;
rem = kgem_batch_space(kgem);
if (10*nbox_this_time > rem)
- nbox_this_time = rem / 8;
+ nbox_this_time = rem / 10;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc) / 2;
assert(nbox_this_time);
More information about the xorg-commit
mailing list