nouveau: support for custom VRAM domains

Graphics / Mesa 3D Graphics Library / Mesa - Alexandre Courbot [nvidia.com] - 22 June 2015 00:00 UTC

Some GPUs (e.g. GK20A, GM20B) do not embed VRAM of their own and use the system memory as a backend instead. For such systems, allocating objects in VRAM results in errors since the kernel will not allow
VRAM objects allocations.

This patch adds a vram_domain member to struct nouveau_screen that can optionally be initialized to an alternative domain to use for VRAM allocations. If left untouched, NOUVEAU_BO_VRAM will be used for systems that embed VRAM, and NOUVEAU_BO_GART will be used for VRAM-less systems.

Code that uses GPU objects is then expected to use the NV_VRAM_DOMAIN() macro in place of NOUVEAU_BO_VRAM to ensure correct behavior on
VRAM-less chips.

f224068 nouveau: support for custom VRAM domains
src/gallium/drivers/nouveau/nouveau_screen.c | 10 ++++++++++
src/gallium/drivers/nouveau/nouveau_screen.h | 4 ++++
2 files changed, 14 insertions(+)

Upstream: cgit.freedesktop.org


  • Share