summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50/head907d.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/head907d.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/head907d.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/head907d.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head907d.c b/drivers/gpu/drm/nouveau/dispnv50/head907d.c
index b7fda2284e17..b6b406d60b81 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head907d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head907d.c
@@ -48,17 +48,19 @@ head907d_or(struct nv50_head *head, struct nv50_head_atom *asyh)
}
}
-void
+int
head907d_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, 0x0498 + (head->base.index * 0x300), 1);
- evo_data(push, asyh->procamp.sat.sin << 20 |
- asyh->procamp.sat.cos << 8);
- 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, NV907D, 0x0498 + (i * 0x300), asyh->procamp.sat.sin << 20 |
+ asyh->procamp.sat.cos << 8);
+ return 0;
}
static int