summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-21 02:00:52 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 11:50:54 +0300
commit4fbf03a32fd8625749059b21a1b3e6501d4912d4 (patch)
tree175ef510232b7a701c3874ff96f7cf5c66ce4a12 /drivers/gpu/drm/nouveau/dispnv50/headc57d.c
parenta5df76301caedcb60bc5db6909547391277e7950 (diff)
downloadlinux-4fbf03a32fd8625749059b21a1b3e6501d4912d4.tar.xz
drm/nouveau/kms/nv50-: convert core head_olut_clr() to new push macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/headc57d.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/headc57d.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
index 2f90a249b948..a39f7447c8a8 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
@@ -75,16 +75,18 @@ headc57d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
}
}
-void
+static int
headc57d_olut_clr(struct nv50_head *head)
{
- struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
- u32 *push;
- if ((push = evo_wait(core, 2))) {
- evo_mthd(push, 0x2288 + (head->base.index * 0x400), 1);
- evo_data(push, 0x00000000);
- evo_kick(push, core);
- }
+ struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
+ const int i = head->base.index;
+ int ret;
+
+ if ((ret = PUSH_WAIT(push, 2)))
+ return ret;
+
+ PUSH_NVSQ(push, NVC57D, 0x2288 + (i * 0x400), 0x00000000);
+ return 0;
}
static int