sna: Initialise remaining batch space

Another missed gcc warning resulting in a crash due to a missing
kgem_batch_space() initialisation.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-09-12 16:10:12 +01:00
parent 9fb399aee9
commit fc4bc3cde9
1 changed files with 1 additions and 0 deletions

View File

@ -547,6 +547,7 @@ fallback:
int nbox_this_time, rem;
nbox_this_time = tmp_nbox;
rem = kgem_batch_space(kgem);
if (8*nbox_this_time > rem)
nbox_this_time = rem / 8;
if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)