diff options
author | Eric Anholt <[email protected]> | 2018-04-12 15:19:42 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-04-24 10:37:29 -0700 |
commit | 482f2e24b59086bcc1515663167744c707d1c82c (patch) | |
tree | 044dd624e133c97278efe32ad1a3c8215f0fde53 /src | |
parent | 82cdb801fda294465aadcdd5dde426a1fa02ffd2 (diff) |
broadcom/vc5: Don't allocate simulator BOs at offset 0.
The kernel won't return us BOs at offset 0 (because things like OQs
wouldn't work there), so we shouldn't in the simulator either.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_simulator.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc5/vc5_simulator.c b/src/gallium/drivers/vc5/vc5_simulator.c index ee4ffb28c04..5fbcad346ad 100644 --- a/src/gallium/drivers/vc5/vc5_simulator.c +++ b/src/gallium/drivers/vc5/vc5_simulator.c @@ -594,7 +594,11 @@ vc5_simulator_init_global(const struct v3d_device_info *devinfo) v3d_hw_get_mem(sim_state.v3d, &sim_state.mem_size, &sim_state.mem); - sim_state.heap = u_mmInit(0, sim_state.mem_size); + /* Allocate from anywhere from 4096 up. We don't allocate at 0, + * because for OQs and some other addresses in the HW, 0 means + * disabled. + */ + sim_state.heap = u_mmInit(4096, sim_state.mem_size - 4096); /* Make a block of 0xd0 at address 0 to make sure we don't screw up * and land there. |