From 33ace5544e755b74ac7c02a7d590f3c64139cc3a Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 16 Feb 2016 07:56:44 +1000 Subject: [PATCH] nvc0: initial support for GM20x GPUs Signed-off-by: Ben Skeggs Acked-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 2 ++ src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp | 1 + src/gallium/drivers/nouveau/nv_object.xml.h | 1 + src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 6 ++++++ src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c | 1 + 5 files changed, 11 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index de39be872e4..d877c253a17 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -968,6 +968,7 @@ GCRA::coalesce(ArrayList& insns) case 0xf0: case 0x100: case 0x110: + case 0x120: ret = doCoalesce(insns, JOIN_MASK_UNION); break; default: @@ -2231,6 +2232,7 @@ RegAlloc::InsertConstraintsPass::visit(BasicBlock *bb) texConstraintNVE0(tex); break; case 0x110: + case 0x120: 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 ae0a8bb61d1..89d3a08937f 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp @@ -143,6 +143,7 @@ Target *Target::create(unsigned int chipset) STATIC_ASSERT(Elements(operationClass) == OP_LAST + 1); switch (chipset & ~0xf) { case 0x110: + case 0x120: 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 0a0e187dc02..61c7b32ea56 100644 --- a/src/gallium/drivers/nouveau/nv_object.xml.h +++ b/src/gallium/drivers/nouveau/nv_object.xml.h @@ -192,6 +192,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define NVF0_3D_CLASS 0x0000a197 #define NVEA_3D_CLASS 0x0000a297 #define GM107_3D_CLASS 0x0000b097 +#define GM200_3D_CLASS 0x0000b197 #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 ec7471c9672..9413d350a35 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -603,6 +603,7 @@ nvc0_screen_init_compute(struct nvc0_screen *screen) case 0xf0: case 0x100: case 0x110: + case 0x120: return 0; default: return -1; @@ -665,6 +666,7 @@ nvc0_screen_create(struct nouveau_device *dev) case 0xf0: case 0x100: case 0x110: + case 0x120: break; default: return NULL; @@ -733,6 +735,7 @@ nvc0_screen_create(struct nouveau_device *dev) PUSH_DATA (push, screen->nvsw->handle); switch (dev->chipset & ~0xf) { + case 0x120: case 0x110: case 0x100: case 0xf0: @@ -784,6 +787,9 @@ nvc0_screen_create(struct nouveau_device *dev) PUSH_DATA (push, screen->fence.bo->offset + 16); switch (dev->chipset & ~0xf) { + case 0x120: + obj_class = GM200_3D_CLASS; + break; case 0x110: obj_class = GM107_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 c44424f4f4a..598ffcbd069 100644 --- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c +++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c @@ -122,6 +122,7 @@ nouveau_drm_screen_create(int fd) case 0xf0: case 0x100: case 0x110: + case 0x120: init = nvc0_screen_create; break; default: -- 2.30.2