This series is to allow NVIDIA chips with shared memory to operate more efficiently (and to operate at all once we disable VRAM from the kernel driver) by allowing nouveau_screen to specify a domain to use for objects originally allocated into VRAM. If the domain is not overridden, the default NOUVEAU_BO_VRAM is used. A NV_VRAM_DOMAIN() macro is then introduced to be used in place of NOUVEAU_BO_VRAM when allocating objects, so the right domain for the chip is used.
Doing so greatly simplifies the equation of memory management on shared- memory devices, since we don't have to simulate non-existent VRAM memory. In that respect it seems to be the right thing to do, and all things taken is not very intrusive. Tested on GK20A with Wayland and several EGL clients running, and working fine. Changes since v1: - When using GART as the VRAM domain, move all vidmem bindings to sysmem and set vidmem_bindings to 0. Alexandre Courbot (3): nouveau: support for custom VRAM domains nvc0: use NV_VRAM_DOMAIN() macro gk20a: use NOUVEAU_BO_GART as VRAM domain src/gallium/drivers/nouveau/nouveau_buffer.c | 6 ++--- src/gallium/drivers/nouveau/nouveau_screen.c | 6 +++++ src/gallium/drivers/nouveau/nouveau_screen.h | 4 ++++ src/gallium/drivers/nouveau/nv50/nv50_miptree.c | 4 ++-- src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 4 ++-- src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 8 +++---- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 27 +++++++++++++++++----- .../drivers/nouveau/nvc0/nvc0_shader_state.c | 2 +- .../drivers/nouveau/nvc0/nvc0_state_validate.c | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_tex.c | 2 +- src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 2 +- 13 files changed, 47 insertions(+), 24 deletions(-) -- 2.1.3 _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau