From 246db5fd38b934fb6aefc31172e3afc3e613d20d Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 21 Jun 2020 09:25:19 +1000 Subject: drm/nouveau/kms/nv50-: convert core head_procamp() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/head907d.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/drm/nouveau/dispnv50/head907d.c') 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 -- cgit v1.2.3