drm/nouveau/core: define GSP subdev
authorBen Skeggs <bskeggs@redhat.com>
Tue, 12 Feb 2019 12:28:13 +0000 (22:28 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 19 Feb 2019 22:59:58 +0000 (08:59 +1000)
Exact meaning of the acronym is unknown, but we need this for Turing ACR.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/Kbuild
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/Kbuild [new file with mode: 0644]

index 72e4dc1f02360ff6856a671048328f325718f994..642492344196c5339c95f5fae6f0321becad5e23 100644 (file)
@@ -28,6 +28,7 @@ enum nvkm_devidx {
        NVKM_SUBDEV_ICCSENSE,
        NVKM_SUBDEV_THERM,
        NVKM_SUBDEV_CLK,
+       NVKM_SUBDEV_GSP,
        NVKM_SUBDEV_SECBOOT,
 
        NVKM_ENGINE_BSP,
@@ -137,6 +138,7 @@ struct nvkm_device {
        struct nvkm_fb *fb;
        struct nvkm_fuse *fuse;
        struct nvkm_gpio *gpio;
+       struct nvkm_gsp *gsp;
        struct nvkm_i2c *i2c;
        struct nvkm_subdev *ibus;
        struct nvkm_iccsense *iccsense;
@@ -209,6 +211,7 @@ struct nvkm_device_chip {
        int (*fb      )(struct nvkm_device *, int idx, struct nvkm_fb **);
        int (*fuse    )(struct nvkm_device *, int idx, struct nvkm_fuse **);
        int (*gpio    )(struct nvkm_device *, int idx, struct nvkm_gpio **);
+       int (*gsp     )(struct nvkm_device *, int idx, struct nvkm_gsp **);
        int (*i2c     )(struct nvkm_device *, int idx, struct nvkm_i2c **);
        int (*ibus    )(struct nvkm_device *, int idx, struct nvkm_subdev **);
        int (*iccsense)(struct nvkm_device *, int idx, struct nvkm_iccsense **);
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
new file mode 100644 (file)
index 0000000..0044899
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __NVKM_GSP_H__
+#define __NVKM_GSP_H__
+#define nvkm_gsp(p) container_of((p), struct nvkm_gsp, subdev)
+#include <core/subdev.h>
+
+struct nvkm_gsp {
+       struct nvkm_subdev subdev;
+};
+#endif
index c61b467cf45e1c738dfc66670128d396f01fd4e3..245990de1e9031be825bd09a8bfe99d2380d2d3e 100644 (file)
@@ -39,6 +39,7 @@ nvkm_subdev_name[NVKM_SUBDEV_NR] = {
        [NVKM_SUBDEV_FB      ] = "fb",
        [NVKM_SUBDEV_FUSE    ] = "fuse",
        [NVKM_SUBDEV_GPIO    ] = "gpio",
+       [NVKM_SUBDEV_GSP     ] = "gsp",
        [NVKM_SUBDEV_I2C     ] = "i2c",
        [NVKM_SUBDEV_IBUS    ] = "priv",
        [NVKM_SUBDEV_ICCSENSE] = "iccsense",
index e6b962f664d87591c44af7ee9d6cefc275ea3148..5e8cb1dc54ddcffe77e29c126a584bb14dcffe67 100644 (file)
@@ -2567,6 +2567,7 @@ nvkm_device_subdev(struct nvkm_device *device, int index)
        _(FB      , device->fb      , &device->fb->subdev);
        _(FUSE    , device->fuse    , &device->fuse->subdev);
        _(GPIO    , device->gpio    , &device->gpio->subdev);
+       _(GSP     , device->gsp     , &device->gsp->subdev);
        _(I2C     , device->i2c     , &device->i2c->subdev);
        _(IBUS    , device->ibus    ,  device->ibus);
        _(ICCSENSE, device->iccsense, &device->iccsense->subdev);
@@ -3050,6 +3051,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
                _(NVKM_SUBDEV_FB      ,       fb);
                _(NVKM_SUBDEV_FUSE    ,     fuse);
                _(NVKM_SUBDEV_GPIO    ,     gpio);
+               _(NVKM_SUBDEV_GSP     ,      gsp);
                _(NVKM_SUBDEV_I2C     ,      i2c);
                _(NVKM_SUBDEV_IBUS    ,     ibus);
                _(NVKM_SUBDEV_ICCSENSE, iccsense);
index 253ab914a8ef84dbfca3eac1ecee4e72e1d34a3f..2a53e37dfa7a03aac238a63cfe0a3327594d4b42 100644 (file)
@@ -12,6 +12,7 @@
 #include <subdev/fb.h>
 #include <subdev/fuse.h>
 #include <subdev/gpio.h>
+#include <subdev/gsp.h>
 #include <subdev/i2c.h>
 #include <subdev/ibus.h>
 #include <subdev/iccsense.h>
index cfdffef1afb9ed81babf429831e9c2a9014fa672..a339fe03d4235baa5a14fe0a8e9e50e558853d01 100644 (file)
@@ -7,6 +7,7 @@ include $(src)/nvkm/subdev/fault/Kbuild
 include $(src)/nvkm/subdev/fb/Kbuild
 include $(src)/nvkm/subdev/fuse/Kbuild
 include $(src)/nvkm/subdev/gpio/Kbuild
+include $(src)/nvkm/subdev/gsp/Kbuild
 include $(src)/nvkm/subdev/i2c/Kbuild
 include $(src)/nvkm/subdev/ibus/Kbuild
 include $(src)/nvkm/subdev/iccsense/Kbuild
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/Kbuild b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/Kbuild
new file mode 100644 (file)
index 0000000..e69de29