Commit 1ce46689 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/core: define FAULT subdev

This will be responsible for the handling of MMU fault buffers on GPUs
that support them.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 7bf5b70b
...@@ -22,6 +22,7 @@ enum nvkm_devidx { ...@@ -22,6 +22,7 @@ enum nvkm_devidx {
NVKM_SUBDEV_LTC, NVKM_SUBDEV_LTC,
NVKM_SUBDEV_MMU, NVKM_SUBDEV_MMU,
NVKM_SUBDEV_BAR, NVKM_SUBDEV_BAR,
NVKM_SUBDEV_FAULT,
NVKM_SUBDEV_PMU, NVKM_SUBDEV_PMU,
NVKM_SUBDEV_VOLT, NVKM_SUBDEV_VOLT,
NVKM_SUBDEV_ICCSENSE, NVKM_SUBDEV_ICCSENSE,
...@@ -123,6 +124,7 @@ struct nvkm_device { ...@@ -123,6 +124,7 @@ struct nvkm_device {
struct nvkm_bus *bus; struct nvkm_bus *bus;
struct nvkm_clk *clk; struct nvkm_clk *clk;
struct nvkm_devinit *devinit; struct nvkm_devinit *devinit;
struct nvkm_fault *fault;
struct nvkm_fb *fb; struct nvkm_fb *fb;
struct nvkm_fuse *fuse; struct nvkm_fuse *fuse;
struct nvkm_gpio *gpio; struct nvkm_gpio *gpio;
...@@ -194,6 +196,7 @@ struct nvkm_device_chip { ...@@ -194,6 +196,7 @@ struct nvkm_device_chip {
int (*bus )(struct nvkm_device *, int idx, struct nvkm_bus **); int (*bus )(struct nvkm_device *, int idx, struct nvkm_bus **);
int (*clk )(struct nvkm_device *, int idx, struct nvkm_clk **); int (*clk )(struct nvkm_device *, int idx, struct nvkm_clk **);
int (*devinit )(struct nvkm_device *, int idx, struct nvkm_devinit **); int (*devinit )(struct nvkm_device *, int idx, struct nvkm_devinit **);
int (*fault )(struct nvkm_device *, int idx, struct nvkm_fault **);
int (*fb )(struct nvkm_device *, int idx, struct nvkm_fb **); int (*fb )(struct nvkm_device *, int idx, struct nvkm_fb **);
int (*fuse )(struct nvkm_device *, int idx, struct nvkm_fuse **); int (*fuse )(struct nvkm_device *, int idx, struct nvkm_fuse **);
int (*gpio )(struct nvkm_device *, int idx, struct nvkm_gpio **); int (*gpio )(struct nvkm_device *, int idx, struct nvkm_gpio **);
......
#ifndef __NVKM_FAULT_H__
#define __NVKM_FAULT_H__
#include <core/subdev.h>
struct nvkm_fault {
struct nvkm_subdev subdev;
};
#endif
...@@ -35,6 +35,7 @@ nvkm_subdev_name[NVKM_SUBDEV_NR] = { ...@@ -35,6 +35,7 @@ nvkm_subdev_name[NVKM_SUBDEV_NR] = {
[NVKM_SUBDEV_BUS ] = "bus", [NVKM_SUBDEV_BUS ] = "bus",
[NVKM_SUBDEV_CLK ] = "clk", [NVKM_SUBDEV_CLK ] = "clk",
[NVKM_SUBDEV_DEVINIT ] = "devinit", [NVKM_SUBDEV_DEVINIT ] = "devinit",
[NVKM_SUBDEV_FAULT ] = "fault",
[NVKM_SUBDEV_FB ] = "fb", [NVKM_SUBDEV_FB ] = "fb",
[NVKM_SUBDEV_FUSE ] = "fuse", [NVKM_SUBDEV_FUSE ] = "fuse",
[NVKM_SUBDEV_GPIO ] = "gpio", [NVKM_SUBDEV_GPIO ] = "gpio",
......
...@@ -2420,6 +2420,7 @@ nvkm_device_subdev(struct nvkm_device *device, int index) ...@@ -2420,6 +2420,7 @@ nvkm_device_subdev(struct nvkm_device *device, int index)
_(BUS , device->bus , &device->bus->subdev); _(BUS , device->bus , &device->bus->subdev);
_(CLK , device->clk , &device->clk->subdev); _(CLK , device->clk , &device->clk->subdev);
_(DEVINIT , device->devinit , &device->devinit->subdev); _(DEVINIT , device->devinit , &device->devinit->subdev);
_(FAULT , device->fault , &device->fault->subdev);
_(FB , device->fb , &device->fb->subdev); _(FB , device->fb , &device->fb->subdev);
_(FUSE , device->fuse , &device->fuse->subdev); _(FUSE , device->fuse , &device->fuse->subdev);
_(GPIO , device->gpio , &device->gpio->subdev); _(GPIO , device->gpio , &device->gpio->subdev);
...@@ -2891,6 +2892,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func, ...@@ -2891,6 +2892,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
_(NVKM_SUBDEV_BUS , bus); _(NVKM_SUBDEV_BUS , bus);
_(NVKM_SUBDEV_CLK , clk); _(NVKM_SUBDEV_CLK , clk);
_(NVKM_SUBDEV_DEVINIT , devinit); _(NVKM_SUBDEV_DEVINIT , devinit);
_(NVKM_SUBDEV_FAULT , fault);
_(NVKM_SUBDEV_FB , fb); _(NVKM_SUBDEV_FB , fb);
_(NVKM_SUBDEV_FUSE , fuse); _(NVKM_SUBDEV_FUSE , fuse);
_(NVKM_SUBDEV_GPIO , gpio); _(NVKM_SUBDEV_GPIO , gpio);
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <subdev/bus.h> #include <subdev/bus.h>
#include <subdev/clk.h> #include <subdev/clk.h>
#include <subdev/devinit.h> #include <subdev/devinit.h>
#include <subdev/fault.h>
#include <subdev/fb.h> #include <subdev/fb.h>
#include <subdev/fuse.h> #include <subdev/fuse.h>
#include <subdev/gpio.h> #include <subdev/gpio.h>
......
...@@ -3,6 +3,7 @@ include $(src)/nvkm/subdev/bios/Kbuild ...@@ -3,6 +3,7 @@ include $(src)/nvkm/subdev/bios/Kbuild
include $(src)/nvkm/subdev/bus/Kbuild include $(src)/nvkm/subdev/bus/Kbuild
include $(src)/nvkm/subdev/clk/Kbuild include $(src)/nvkm/subdev/clk/Kbuild
include $(src)/nvkm/subdev/devinit/Kbuild include $(src)/nvkm/subdev/devinit/Kbuild
include $(src)/nvkm/subdev/fault/Kbuild
include $(src)/nvkm/subdev/fb/Kbuild include $(src)/nvkm/subdev/fb/Kbuild
include $(src)/nvkm/subdev/fuse/Kbuild include $(src)/nvkm/subdev/fuse/Kbuild
include $(src)/nvkm/subdev/gpio/Kbuild include $(src)/nvkm/subdev/gpio/Kbuild
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment