summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/dispnv50/head917d.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/head917d.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/head917d.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head917d.c b/drivers/gpu/drm/nouveau/dispnv50/head917d.c
index 76958cedd51f..ec7511f47c71 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head917d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head917d.c
@@ -22,6 +22,8 @@
#include "head.h"
#include "core.h"
+#include <nvif/push507c.h>
+
static void
head917d_dither(struct nv50_head *head, struct nv50_head_atom *asyh)
{
@@ -36,12 +38,13 @@ head917d_dither(struct nv50_head *head, struct nv50_head_atom *asyh)
}
}
-static void
+static int
head917d_base(struct nv50_head *head, struct nv50_head_atom *asyh)
{
- struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
+ struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
+ const int i = head->base.index;
u32 bounds = 0;
- u32 *push;
+ int ret;
if (asyh->base.cpp) {
switch (asyh->base.cpp) {
@@ -56,11 +59,11 @@ head917d_base(struct nv50_head *head, struct nv50_head_atom *asyh)
bounds |= 0x00020001;
}
- if ((push = evo_wait(core, 2))) {
- evo_mthd(push, 0x04d0 + head->base.index * 0x300, 1);
- evo_data(push, bounds);
- evo_kick(push, core);
- }
+ if ((ret = PUSH_WAIT(push, 2)))
+ return ret;
+
+ PUSH_NVSQ(push, NV917D, 0x04d0 + (i * 0x300), bounds);
+ return 0;
}
int