summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
index 67254ce..b780ba1 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv04.c
@@ -22,6 +22,7 @@
* Authors: Ben Skeggs
*/
#include "priv.h"
+#include "head.h"
static const struct nvkm_disp_oclass *
nv04_disp_root(struct nvkm_disp *disp)
@@ -30,20 +31,6 @@ nv04_disp_root(struct nvkm_disp *disp)
}
static void
-nv04_disp_vblank_init(struct nvkm_disp *disp, int head)
-{
- struct nvkm_device *device = disp->engine.subdev.device;
- nvkm_wr32(device, 0x600140 + (head * 0x2000) , 0x00000001);
-}
-
-static void
-nv04_disp_vblank_fini(struct nvkm_disp *disp, int head)
-{
- struct nvkm_device *device = disp->engine.subdev.device;
- nvkm_wr32(device, 0x600140 + (head * 0x2000) , 0x00000000);
-}
-
-static void
nv04_disp_intr(struct nvkm_disp *disp)
{
struct nvkm_subdev *subdev = &disp->engine.subdev;
@@ -74,12 +61,22 @@ static const struct nvkm_disp_func
nv04_disp = {
.intr = nv04_disp_intr,
.root = nv04_disp_root,
- .head.vblank_init = nv04_disp_vblank_init,
- .head.vblank_fini = nv04_disp_vblank_fini,
};
int
nv04_disp_new(struct nvkm_device *device, int index, struct nvkm_disp **pdisp)
{
- return nvkm_disp_new_(&nv04_disp, device, index, 2, pdisp);
+ int ret, i;
+
+ ret = nvkm_disp_new_(&nv04_disp, device, index, pdisp);
+ if (ret)
+ return ret;
+
+ for (i = 0; i < 2; i++) {
+ ret = nv04_head_new(*pdisp, i);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
}
OpenPOWER on IntegriCloud