[Nouveau] [PATCH xf86-video-nouveau] Add Pascal family support, identical to Maxwell

Ilia Mirkin imirkin at alum.mit.edu
Wed Mar 22 01:28:54 UTC 2017


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---

Untested.

 src/nouveau_copy.c    | 2 ++
 src/nouveau_exa.c     | 1 +
 src/nv_accel_common.c | 1 +
 src/nv_driver.c       | 3 +++
 src/nv_type.h         | 1 +
 src/nvc0_accel.c      | 6 ++++++
 6 files changed, 14 insertions(+)

diff --git a/src/nouveau_copy.c b/src/nouveau_copy.c
index 7118a7a..7fbcc87 100644
--- a/src/nouveau_copy.c
+++ b/src/nouveau_copy.c
@@ -42,6 +42,7 @@ nouveau_copy_init(ScreenPtr pScreen)
 		int engine;
 		Bool (*init)(NVPtr);
 	} methods[] = {
+		{ 0xc1b5, 0, nouveau_copya0b5_init },
 		{ 0xc0b5, 0, nouveau_copya0b5_init },
 		{ 0xb0b5, 0, nouveau_copya0b5_init },
 		{ 0xa0b5, 0, nouveau_copya0b5_init },
@@ -84,6 +85,7 @@ nouveau_copy_init(ScreenPtr pScreen)
 		break;
 	case NV_KEPLER:
 	case NV_MAXWELL:
+	case NV_PASCAL:
 		ret = nouveau_object_new(&pNv->dev->object, 0,
 					 NOUVEAU_FIFO_CHANNEL_CLASS,
 					 &(struct nve0_fifo) {
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index 0f02b99..55df6f8 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -515,6 +515,7 @@ nouveau_exa_init(ScreenPtr pScreen)
 	case NV_FERMI:
 	case NV_KEPLER:
 	case NV_MAXWELL:
+	case NV_PASCAL:
 		exa->CheckComposite   = NVC0EXACheckComposite;
 		exa->PrepareComposite = NVC0EXAPrepareComposite;
 		exa->Composite        = NVC0EXAComposite;
diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c
index 5d12dd8..5561708 100644
--- a/src/nv_accel_common.c
+++ b/src/nv_accel_common.c
@@ -723,6 +723,7 @@ NVAccelCommonInit(ScrnInfoPtr pScrn)
 	case NV_FERMI:
 	case NV_KEPLER:
 	case NV_MAXWELL:
+	case NV_PASCAL:
 		INIT_CONTEXT_OBJECT(3D_NVC0);
 		break;
 	case NV_TESLA:
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 61940a8..3afd42e 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -945,6 +945,9 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 	case 0x120:
 		pNv->Architecture = NV_MAXWELL;
 		break;
+	case 0x130:
+		pNv->Architecture = NV_PASCAL;
+		break;
 	default:
 		return FALSE;
 	}
diff --git a/src/nv_type.h b/src/nv_type.h
index 6c3e339..a0c40e3 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -23,6 +23,7 @@
 #define NV_FERMI    0xc0
 #define NV_KEPLER   0xe0
 #define NV_MAXWELL  0x110
+#define NV_PASCAL   0x130
 
 struct xf86_platform_device;
 
diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c
index 6c2bae8..1047d36 100644
--- a/src/nvc0_accel.c
+++ b/src/nvc0_accel.c
@@ -250,6 +250,12 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn)
 	} else if (pNv->dev->chipset < 0x130) {
 		class  = 0xb197;
 		handle = 0x0000906e;
+	} else if (pNv->dev->chipset == 0x130) {
+		class  = 0xc097;
+		handle = 0x0000906e;
+	} else if (pNv->dev->chipset < 0x140) {
+		class  = 0xc197;
+		handle = 0x0000906e;
 	} else {
 		xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 			   "No 3D acceleration support for NV%X\n",
-- 
2.10.2



More information about the Nouveau mailing list