]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm/vc4: Allow using more than 256MB of CMA memory.
authorEric Anholt <eric@anholt.net>
Mon, 27 Mar 2017 23:10:25 +0000 (16:10 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 18 Apr 2017 21:32:20 +0000 (14:32 -0700)
commit553c942f8b2cbc7394b4d4fa2f848b23a8f07451
treee09718186d7a56a1d4fa08f5769b20f3e0a204bd
parent925d05e1f825db9490da33afe35bd5383d301e97
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 the tile
binner and 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>
Link: http://patchwork.freedesktop.org/patch/msgid/20170327231025.19391-1-eric@anholt.net
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
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