linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Alexandre Courbot
	<acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH v2 0/3] nouveau: support for custom VRAM domains
Date: Wed, 19 Nov 2014 14:41:42 +0900	[thread overview]
Message-ID: <1416375705-14068-1-git-send-email-acourbot@nvidia.com> (raw)

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

             reply	other threads:[~2014-11-19  5:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19  5:41 Alexandre Courbot [this message]
     [not found] ` <1416375705-14068-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-11-19  5:41   ` [PATCH v2 1/3] nouveau: support for custom VRAM domains 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416375705-14068-1-git-send-email-acourbot@nvidia.com \
    --to=acourbot-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).