nvc0: add compute support for GM107
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 13 Feb 2016 23:19:13 +0000 (00:19 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 16 Feb 2016 20:39:00 +0000 (21:39 +0100)
Fortunately, compute support on GM107 is very close to GK110, except
the GK110_COMPUTE.UNK02C4 which is invalid and should not be used.

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/nve4_compute.c

index 61c7b32ea560e51f476d2ebe41ae19ae3882c3a8..3479c343261d64c07cad3e38a52d27a2fdff4863 100644 (file)
@@ -201,6 +201,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVC8_COMPUTE_CLASS                                     0x000092c0
 #define NVE4_COMPUTE_CLASS                                     0x0000a0c0
 #define NVF0_COMPUTE_CLASS                                     0x0000a1c0
+#define GM107_COMPUTE_CLASS                            0x0000b0c0
 #define NV84_CRYPT_CLASS                                       0x000074c1
 #define BLOB_NVC0_PCOPY1_CLASS                                 0x000090b8
 #define BLOB_NVC0_PCOPY0_CLASS                                 0x000090b5
index ac31aae0a73660d836ed636de0fc0ce96e85c663..c741616458c2a8b5169cfc2e8960db744f2b9b65 100644 (file)
@@ -51,6 +51,9 @@ nve4_screen_compute_setup(struct nvc0_screen *screen,
    case 0xe0:
       obj_class = NVE4_COMPUTE_CLASS; /* GK104 */
       break;
+   case 0x110:
+      obj_class = GM107_COMPUTE_CLASS;
+      break;
    default:
       NOUVEAU_ERR("unsupported chipset: NV%02x\n", dev->chipset);
       return -1;
@@ -128,7 +131,7 @@ nve4_screen_compute_setup(struct nvc0_screen *screen,
    BEGIN_NVC0(push, NVE4_COMPUTE(TEX_CB_INDEX), 1);
    PUSH_DATA (push, 0); /* does not interefere with 3D */
 
-   if (obj_class >= NVF0_COMPUTE_CLASS)
+   if (obj_class == NVF0_COMPUTE_CLASS)
       IMMED_NVC0(push, SUBC_COMPUTE(0x02c4), 1);
 
    /* MS sample coordinate offsets: these do not work with _ALT modes ! */