diff options
Diffstat (limited to 'nvkm/engine/disp')
-rw-r--r-- | nvkm/engine/disp/base.c | 19 | ||||
-rw-r--r-- | nvkm/engine/disp/nv04.c | 1 | ||||
-rw-r--r-- | nvkm/engine/disp/nv50.c | 1 | ||||
-rw-r--r-- | nvkm/engine/disp/nvd0.c | 1 | ||||
-rw-r--r-- | nvkm/engine/disp/priv.h | 1 |
5 files changed, 23 insertions, 0 deletions
diff --git a/nvkm/engine/disp/base.c b/nvkm/engine/disp/base.c index d1df0ce99..22d55f6cd 100644 --- a/nvkm/engine/disp/base.c +++ b/nvkm/engine/disp/base.c @@ -24,6 +24,7 @@ #include <core/os.h> #include <nvif/unpack.h> +#include <nvif/class.h> #include <nvif/event.h> #include "priv.h" @@ -93,6 +94,24 @@ nouveau_disp_hpd_func = { }; int +nouveau_disp_ntfy(struct nouveau_object *object, u32 type, + struct nvkm_event **event) +{ + struct nouveau_disp *disp = (void *)object->engine; + switch (type) { + case NV04_DISP_NTFY_VBLANK: + *event = &disp->vblank; + return 0; + case NV04_DISP_NTFY_CONN: + *event = &disp->hpd; + return 0; + default: + break; + } + return -EINVAL; +} + +int _nouveau_disp_fini(struct nouveau_object *object, bool suspend) { struct nouveau_disp *disp = (void *)object; diff --git a/nvkm/engine/disp/nv04.c b/nvkm/engine/disp/nv04.c index 9f0ae05f7..366f315fc 100644 --- a/nvkm/engine/disp/nv04.c +++ b/nvkm/engine/disp/nv04.c @@ -112,6 +112,7 @@ nv04_disp_ofuncs = { .init = nouveau_object_init, .fini = nouveau_object_fini, .mthd = nv04_disp_mthd, + .ntfy = nouveau_disp_ntfy, }; static struct nouveau_oclass diff --git a/nvkm/engine/disp/nv50.c b/nvkm/engine/disp/nv50.c index 858386bdd..2703910a0 100644 --- a/nvkm/engine/disp/nv50.c +++ b/nvkm/engine/disp/nv50.c @@ -1142,6 +1142,7 @@ nv50_disp_base_ofuncs = { .init = nv50_disp_base_init, .fini = nv50_disp_base_fini, .mthd = nv50_disp_base_mthd, + .ntfy = nouveau_disp_ntfy, }; static struct nouveau_oclass diff --git a/nvkm/engine/disp/nvd0.c b/nvkm/engine/disp/nvd0.c index 9c2ac1390..a4bb3c774 100644 --- a/nvkm/engine/disp/nvd0.c +++ b/nvkm/engine/disp/nvd0.c @@ -716,6 +716,7 @@ nvd0_disp_base_ofuncs = { .init = nvd0_disp_base_init, .fini = nvd0_disp_base_fini, .mthd = nv50_disp_base_mthd, + .ntfy = nouveau_disp_ntfy, }; static struct nouveau_oclass diff --git a/nvkm/engine/disp/priv.h b/nvkm/engine/disp/priv.h index 5506d119b..dbd43ae9d 100644 --- a/nvkm/engine/disp/priv.h +++ b/nvkm/engine/disp/priv.h @@ -42,5 +42,6 @@ extern struct nouveau_oclass *nvkm_connector_oclass; int nouveau_disp_vblank_ctor(void *data, u32 size, struct nvkm_notify *); void nouveau_disp_vblank(struct nouveau_disp *, int head); +int nouveau_disp_ntfy(struct nouveau_object *, u32, struct nvkm_event **); #endif |