nvc0: allow to use compute support on GM200
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 13 Apr 2016 22:46:50 +0000 (00:46 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 14 Apr 2016 19:01:51 +0000 (21:01 +0200)
This works like a charm but please not that NVF0_COMPUTE have to be set
because compute support is still not enabled by default on GK110+. This
will require more testing to make sure it won't break the 3D state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv_object.xml.h
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/nouveau/nvc0/nve4_compute.c

index 3479c343261d64c07cad3e38a52d27a2fdff4863..fe4982aa9fd8c5fe5e997f0c2f3b61edcd39ac2a 100644 (file)
@@ -202,6 +202,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVE4_COMPUTE_CLASS                                     0x0000a0c0
 #define NVF0_COMPUTE_CLASS                                     0x0000a1c0
 #define GM107_COMPUTE_CLASS                            0x0000b0c0
+#define GM200_COMPUTE_CLASS                            0x0000b1c0
 #define NV84_CRYPT_CLASS                                       0x000074c1
 #define BLOB_NVC0_PCOPY1_CLASS                                 0x000090b8
 #define BLOB_NVC0_PCOPY0_CLASS                                 0x000090b5
index 9a34007c6e513c58dfbb426578d5bca5d5faad91..f6d05aaf9d4d21e8f0bc2fcdd1b991a7e13d7ac4 100644 (file)
@@ -644,10 +644,9 @@ nvc0_screen_init_compute(struct nvc0_screen *screen)
    case 0xf0:
    case 0x100:
    case 0x110:
+   case 0x120:
       if (debug_get_bool_option("NVF0_COMPUTE", false))
          return nve4_screen_compute_setup(screen, screen->base.pushbuf);
-   case 0x120:
-      return 0;
    default:
       return -1;
    }
index 4d069df983e06cc24226e00c11a20f45781553e8..3d0190928e3667c26ec43a36f92d0f21f9861327 100644 (file)
@@ -54,6 +54,9 @@ nve4_screen_compute_setup(struct nvc0_screen *screen,
    case 0x110:
       obj_class = GM107_COMPUTE_CLASS;
       break;
+   case 0x120:
+      obj_class = GM200_COMPUTE_CLASS;
+      break;
    default:
       NOUVEAU_ERR("unsupported chipset: NV%02x\n", dev->chipset);
       return -1;