diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2022-06-01 12:46:38 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2022-11-09 01:44:27 +0100 |
commit | ffd2664114c8fb9f12c4d4fd09c6d57cc3f4d951 (patch) | |
tree | b517cb30c45ac38ebef079fbd5ceaa589b6d5e16 /drivers/gpu/drm/nouveau/nvif | |
parent | drm/nouveau/disp: switch vblank semaphore release to nvkm_event_ntfy (diff) | |
download | linux-ffd2664114c8fb9f12c4d4fd09c6d57cc3f4d951.tar.xz linux-ffd2664114c8fb9f12c4d4fd09c6d57cc3f4d951.zip |
drm/nouveau/disp: expose head event class
Also fixes vblank interrupts being left enabled when they're not meant
to be as a result of races/bugs in previous event handling code.
v2:
- use ?: (lyude)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvif/head.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/head.c b/drivers/gpu/drm/nouveau/nvif/head.c index 01deba462600..f00e01d232db 100644 --- a/drivers/gpu/drm/nouveau/nvif/head.c +++ b/drivers/gpu/drm/nouveau/nvif/head.c @@ -26,6 +26,16 @@ #include <nvif/class.h> #include <nvif/if0013.h> +int +nvif_head_vblank_event_ctor(struct nvif_head *head, const char *name, nvif_event_func func, + bool wait, struct nvif_event *event) +{ + int ret = nvif_event_ctor(&head->object, name ?: "nvifHeadVBlank", nvif_head_id(head), + func, wait, NULL, 0, event); + NVIF_ERRON(ret, &head->object, "[NEW EVENT:VBLANK]"); + return ret; +} + void nvif_head_dtor(struct nvif_head *head) { |