diff options
author | Eric Anholt <[email protected]> | 2017-01-04 11:24:31 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-01-05 16:23:32 -0800 |
commit | ebf33e577aee00cf888c79e11a3b62c181b46510 (patch) | |
tree | 142adc22f4a46af254f8a2a38101ef90f844b38c /src/gallium/drivers/vc4/vc4_context.h | |
parent | 076ab157ff2ed7a98b09363bce355247f4ed71e6 (diff) |
vc4: Flush the job early if we're referencing too many BOs.
If we get up toward 256MB (or whatever the CMA area size is),
VC4_GEM_CREATE will start throwing errors. Even if we don't trigger
that, when we flush the kernel's BO allocation for the CLs or bin
memory may end up throwing an error, at which point our job won't get
rendered at all.
Just flush early (half of maximum CMA size) so that hopefully we never
get to that point.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_context.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h index 2005ae0e4ea..6bd2424ec79 100644 --- a/src/gallium/drivers/vc4/vc4_context.h +++ b/src/gallium/drivers/vc4/vc4_context.h @@ -228,6 +228,13 @@ struct vc4_job { struct vc4_cl bo_handles; struct vc4_cl bo_pointers; uint32_t shader_rec_count; + /** + * Amount of memory used by the BOs in bo_pointers. + * + * Used for checking when we should flush the job early so we don't + * OOM. + */ + uint32_t bo_space; /** @{ Surfaces to submit rendering for. */ struct pipe_surface *color_read; |