summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_display.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-08-10 04:10:28 +1000
committerBen Skeggs <bskeggs@redhat.com>2014-08-10 05:28:12 +1000
commit80bc340b3dd720c5b7818e21a9a1ee36e1d7ef30 (patch)
tree045d3cd23efc3ba26f2c7dbf954274260a397065 /drivers/gpu/drm/nouveau/nouveau_display.c
parentb76f15295eadd37405cdb4855351a6ceda0bd1b1 (diff)
drm/nouveau/disp: implement nvif event sources for vblank/connector notifiers
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index a5a1f298c00..62f969608c2 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -42,12 +42,12 @@
#include <nvif/event.h>
static int
-nouveau_display_vblank_handler(struct nvkm_notify *notify)
+nouveau_display_vblank_handler(struct nvif_notify *notify)
{
struct nouveau_crtc *nv_crtc =
container_of(notify, typeof(*nv_crtc), vblank);
drm_handle_vblank(nv_crtc->base.dev, nv_crtc->index);
- return NVKM_NOTIFY_KEEP;
+ return NVIF_NOTIFY_KEEP;
}
int
@@ -57,7 +57,7 @@ nouveau_display_vblank_enable(struct drm_device *dev, int head)
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
if (nv_crtc->index == head) {
- nvkm_notify_get(&nv_crtc->vblank);
+ nvif_notify_get(&nv_crtc->vblank);
return 0;
}
}
@@ -71,7 +71,7 @@ nouveau_display_vblank_disable(struct drm_device *dev, int head)
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
if (nv_crtc->index == head) {
- nvkm_notify_put(&nv_crtc->vblank);
+ nvif_notify_put(&nv_crtc->vblank);
return;
}
}
@@ -172,22 +172,22 @@ nouveau_display_vblank_fini(struct drm_device *dev)
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
- nvkm_notify_fini(&nv_crtc->vblank);
+ nvif_notify_fini(&nv_crtc->vblank);
}
}
static int
nouveau_display_vblank_init(struct drm_device *dev)
{
- struct nouveau_drm *drm = nouveau_drm(dev);
- struct nouveau_disp *pdisp = nvkm_disp(&drm->device);
+ struct nouveau_display *disp = nouveau_display(dev);
struct drm_crtc *crtc;
int ret;
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
- ret = nvkm_notify_init(&pdisp->vblank,
+ ret = nvif_notify_init(&disp->disp, NULL,
nouveau_display_vblank_handler, false,
+ NV04_DISP_NTFY_VBLANK,
&(struct nvif_notify_head_req_v0) {
.head = nv_crtc->index,
},
@@ -371,7 +371,7 @@ nouveau_display_init(struct drm_device *dev)
/* enable hotplug interrupts */
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
struct nouveau_connector *conn = nouveau_connector(connector);
- nvkm_notify_get(&conn->hpd);
+ nvif_notify_get(&conn->hpd);
}
return ret;
@@ -391,7 +391,7 @@ nouveau_display_fini(struct drm_device *dev)
/* disable hotplug interrupts */
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
struct nouveau_connector *conn = nouveau_connector(connector);
- nvkm_notify_put(&conn->hpd);
+ nvif_notify_put(&conn->hpd);
}
drm_kms_helper_poll_disable(dev);