linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] nouveau: support for custom VRAM domains
@ 2014-11-19  5:41 Alexandre Courbot
       [not found] ` <1416375705-14068-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandre Courbot @ 2014-11-19  5:41 UTC (permalink / raw)
  To: Ilia Mirkin
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, gnurou-Re5JQEeQqe8AvxtiuMwx3w,
	Alexandre Courbot

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-19  5:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19  5:41 [PATCH v2 0/3] nouveau: support for custom VRAM domains Alexandre Courbot
     [not found] ` <1416375705-14068-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-11-19  5:41   ` [PATCH v2 1/3] " Alexandre Courbot
2014-11-19  5:41   ` [PATCH v2 2/3] nvc0: use NV_VRAM_DOMAIN() macro Alexandre Courbot
     [not found]     ` <1416375705-14068-3-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-11-19  5:49       ` Ilia Mirkin
2014-11-19  5:59         ` Alexandre Courbot
2014-11-19  5:41   ` [PATCH v2 3/3] gk20a: use NOUVEAU_BO_GART as VRAM domain Alexandre Courbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).