summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-10-15 13:42:29 +1000
committerBen Skeggs <bskeggs@redhat.com>2014-10-20 16:00:08 +1000
commitfd3e5b6194e5ab27e7b5e25dc0ea5d8ccc08a422 (patch)
tree4401ff9636d5b52baa59ed4f6d0f8ad7f7f499b2
parent6bbc72b198ea7e9f8bc3d67b5d92836f3c65ffdc (diff)
downloadnouveau-fd3e5b6194e5ab27e7b5e25dc0ea5d8ccc08a422.tar.gz
gr/gt215: fix initialisation on gddr5 boards
The binary driver modifies the default context to have this value, rather than 0x3d0040, *after* it's filled the buffer with the usual golden data. We don't really have anything in place to locate the correct offset to do these type of modifications outside of the generation function, so this will have to do. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--nvkm/engine/graph/ctxnv50.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nvkm/engine/graph/ctxnv50.c b/nvkm/engine/graph/ctxnv50.c
index 552fdbd45..1d0e33fb5 100644
--- a/nvkm/engine/graph/ctxnv50.c
+++ b/nvkm/engine/graph/ctxnv50.c
@@ -113,6 +113,8 @@
#define IS_NVA3F(x) (((x) > 0xa0 && (x) < 0xaa) || (x) == 0xaf)
#define IS_NVAAF(x) ((x) >= 0xaa && (x) <= 0xac)
+#include <subdev/fb.h>
+
/*
* This code deals with PGRAPH contexts on NV50 family cards. Like NV40, it's
* the GPU itself that does context-switching, but it needs a special
@@ -569,8 +571,12 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx)
gr_def(ctx, 0x407d08, 0x00010040);
else if (device->chipset < 0xa0)
gr_def(ctx, 0x407d08, 0x00390040);
- else
- gr_def(ctx, 0x407d08, 0x003d0040);
+ else {
+ if (nouveau_fb(device)->ram->type != NV_MEM_TYPE_GDDR5)
+ gr_def(ctx, 0x407d08, 0x003d0040);
+ else
+ gr_def(ctx, 0x407d08, 0x003c0040);
+ }
gr_def(ctx, 0x407d0c, 0x00000022);
}