summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-21 02:25:19 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 11:50:55 +0300
commit246db5fd38b934fb6aefc31172e3afc3e613d20d (patch)
tree99fb3c90d826b0111a55b1ad462b01cd2f931aa3 /drivers/gpu/drm/nouveau/dispnv50/headc37d.c
parent2f819f2be061c984005020f8dc45aee1e6af19a4 (diff)
downloadlinux-246db5fd38b934fb6aefc31172e3afc3e613d20d.tar.xz
drm/nouveau/kms/nv50-: convert core head_procamp() 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/headc37d.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/headc37d.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
index 0accc19991a4..20d3ce45c00f 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
@@ -56,18 +56,20 @@ headc37d_or(struct nv50_head *head, struct nv50_head_atom *asyh)
}
}
-static void
+static int
headc37d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
{
- struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
- u32 *push;
- if ((push = evo_wait(core, 2))) {
- evo_mthd(push, 0x2000 + (head->base.index * 0x400), 1);
- evo_data(push, 0x80000000 |
- asyh->procamp.sat.sin << 16 |
- asyh->procamp.sat.cos << 4);
- 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, NVC37D, 0x2000 + (i * 0x400), 0x80000000 |
+ asyh->procamp.sat.sin << 16 |
+ asyh->procamp.sat.cos << 4);
+ return 0;
}
int