[Mesa-dev] [PATCH 2/3] nvc0: add compute support for GM107

Ilia Mirkin imirkin at alum.mit.edu
Sat Feb 13 23:43:10 UTC 2016


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

On Sat, Feb 13, 2016 at 6:31 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> 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 at gmail.com>
> ---
>  src/gallium/drivers/nouveau/nv_object.xml.h     | 1 +
>  src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 5 ++++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/nv_object.xml.h b/src/gallium/drivers/nouveau/nv_object.xml.h
> index 0a0e187..ac2845e 100644
> --- a/src/gallium/drivers/nouveau/nv_object.xml.h
> +++ b/src/gallium/drivers/nouveau/nv_object.xml.h
> @@ -200,6 +200,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
> diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> index 31b571d..b2f1f2b 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> @@ -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;
> @@ -124,7 +127,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 ! */
> --
> 2.6.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list