On 10/30/2014 12:29 AM, Ilia Mirkin wrote:
On Mon, Oct 27, 2014 at 6:34 AM, Alexandre Courbot <acour...@nvidia.com> wrote:
GK20A does not have dedicated VRAM, therefore allocating in VRAM can be
sub-optimal and sometimes even harmful. Set its VRAM domain to
NOUVEAU_BO_GART so all objects are allocated in system memory.

Signed-off-by: Alexandre Courbot <acour...@nvidia.com>
---
  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 10 ++++++++++
  1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index ac5823e4a8d5..ad143cd9a140 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -620,6 +620,16 @@ nvc0_screen_create(struct nouveau_device *dev)
        return NULL;
     pscreen = &screen->base.base;

+   /* Recognize chipsets with no VRAM */
+   switch (dev->chipset) {
+   /* GK20A */
+   case 0xea:
+      screen->base.vram_domain = NOUVEAU_BO_GART;

I think you also want to set vidmem_bindings = 0... although
potentially after the |= that's done below. Although I guess that
constbuf + command args buf need to be |='d into the sysmem_bindings
for this to work out well.

Thanks for pointing this out ; I didn't know about vidmem_bindings to be honest. Will update and resend.

Apart from this detail, are you ok with the changes brought by these patches?

Cheers,
Alex.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to