summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2016-07-09 10:06:44 +1000
committerBen Skeggs <[email protected]>2016-07-12 10:56:35 +1000
commit0d911a720da9677ad0410fdfeab8e81546427102 (patch)
treea71816b979c939d5155cd5fcb686b46a9afd256e /src
parent9bc083284f3d4eb6148237eec3d9032d32ff1451 (diff)
nvc0: initial support for GP100 GPUs
Signed-off-by: Ben Skeggs <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp2
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp1
-rw-r--r--src/gallium/drivers/nouveau/nv_object.xml.h1
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_screen.c16
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c1
5 files changed, 16 insertions, 5 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index 5bb6f7849b1..63fe9c0fb6b 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -969,6 +969,7 @@ GCRA::coalesce(ArrayList& insns)
case 0x100:
case 0x110:
case 0x120:
+ case 0x130:
ret = doCoalesce(insns, JOIN_MASK_UNION);
break;
default:
@@ -2234,6 +2235,7 @@ RegAlloc::InsertConstraintsPass::visit(BasicBlock *bb)
break;
case 0x110:
case 0x120:
+ case 0x130:
texConstraintGM107(tex);
break;
default:
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp
index cc98d325c71..08aac00e536 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp
@@ -150,6 +150,7 @@ Target *Target::create(unsigned int chipset)
switch (chipset & ~0xf) {
case 0x110:
case 0x120:
+ case 0x130:
return getTargetGM107(chipset);
case 0xc0:
case 0xd0:
diff --git a/src/gallium/drivers/nouveau/nv_object.xml.h b/src/gallium/drivers/nouveau/nv_object.xml.h
index fe4982aa9fd..c7e0a397d67 100644
--- a/src/gallium/drivers/nouveau/nv_object.xml.h
+++ b/src/gallium/drivers/nouveau/nv_object.xml.h
@@ -193,6 +193,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NVEA_3D_CLASS 0x0000a297
#define GM107_3D_CLASS 0x0000b097
#define GM200_3D_CLASS 0x0000b197
+#define GP100_3D_CLASS 0x0000c097
#define NV50_2D_CLASS 0x0000502d
#define NVC0_2D_CLASS 0x0000902d
#define NV50_COMPUTE_CLASS 0x000050c0
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index d22150a0b99..f6816314bdc 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -232,10 +232,11 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_CULL_DISTANCE:
case PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES:
case PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR:
- case PIPE_CAP_COMPUTE:
case PIPE_CAP_TGSI_VOTE:
case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
return 1;
+ case PIPE_CAP_COMPUTE:
+ return (class_3d < GP100_3D_CLASS);
case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
@@ -657,6 +658,8 @@ nvc0_screen_init_compute(struct nvc0_screen *screen)
case 0x110:
case 0x120:
return nve4_screen_compute_setup(screen, screen->base.pushbuf);
+ case 0x130:
+ return 0;
default:
return -1;
}
@@ -719,6 +722,7 @@ nvc0_screen_create(struct nouveau_device *dev)
case 0x100:
case 0x110:
case 0x120:
+ case 0x130:
break;
default:
return NULL;
@@ -731,10 +735,8 @@ nvc0_screen_create(struct nouveau_device *dev)
pscreen->destroy = nvc0_screen_destroy;
ret = nouveau_screen_init(&screen->base, dev);
- if (ret) {
- nvc0_screen_destroy(pscreen);
- return NULL;
- }
+ if (ret)
+ FAIL_SCREEN_INIT("Base screen init failed: %d\n", ret);
chan = screen->base.channel;
push = screen->base.pushbuf;
push->user_priv = screen;
@@ -787,6 +789,7 @@ nvc0_screen_create(struct nouveau_device *dev)
PUSH_DATA (push, screen->nvsw->handle);
switch (dev->chipset & ~0xf) {
+ case 0x130:
case 0x120:
case 0x110:
case 0x100:
@@ -839,6 +842,9 @@ nvc0_screen_create(struct nouveau_device *dev)
PUSH_DATA (push, screen->fence.bo->offset + 16);
switch (dev->chipset & ~0xf) {
+ case 0x130:
+ obj_class = GP100_3D_CLASS;
+ break;
case 0x120:
obj_class = GM200_3D_CLASS;
break;
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
index 598ffcbd069..f90572f2f48 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
@@ -123,6 +123,7 @@ nouveau_drm_screen_create(int fd)
case 0x100:
case 0x110:
case 0x120:
+ case 0x130:
init = nvc0_screen_create;
break;
default: