drm/vc4: Allow using more than 256MB of CMA memory.
authorEric Anholt <eric@anholt.net>
Tue, 7 Mar 2017 22:51:03 +0000 (14:51 -0800)
committerpopcornmix <popcornmix@gmail.com>
Wed, 19 Apr 2017 12:03:48 +0000 (13:03 +0100)
commit2aefcd576195a739a7a256099571c9c4a401005f
tree7e861faf2da7f4a24c62b71cf9387186d7a6c6cd
parent72134397d72079a533c8fc742701fdc7f5ae7c5b
drm/vc4: Allow using more than 256MB of CMA memory.

Until now, we've had to limit Raspberry Pi to 256MB of CMA memory to
keep from triggering the hardware addressing bug between of the tile
binner of the tile alloc memory (where the top 4 bits come from the
tile state data array's address).

To work around that and allow more memory to be reserved for graphics,
allocate a single BO to store tile state data arrays and tile
alloc/overflow memory while the GPU is active, and make sure that that
one BO doesn't happen to cross a 256MB boundary.  With that in place,
we can allocate textures and shaders anywhere in system memory (still
contiguous, of course).

Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_gem.c
drivers/gpu/drm/vc4/vc4_irq.c
drivers/gpu/drm/vc4/vc4_render_cl.c
drivers/gpu/drm/vc4/vc4_v3d.c
drivers/gpu/drm/vc4/vc4_validate.c