diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-21 09:28:36 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:50:55 +1000 |
commit | ff37116ea421ed62e99e310b793214f95f1f8eb0 (patch) | |
tree | 0deb943362bea27a7f97af097191a606532457fe /drivers/gpu/drm/nouveau/dispnv50/head907d.c | |
parent | 246db5fd38b934fb6aefc31172e3afc3e613d20d (diff) |
drm/nouveau/kms/nv50-: convert core head_or() 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.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head907d.c b/drivers/gpu/drm/nouveau/dispnv50/head907d.c index b6b406d60b81..3be63f09dfa6 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/head907d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/head907d.c @@ -31,21 +31,24 @@ #include <nvif/push507c.h> -void +int head907d_or(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, 3))) { - evo_mthd(push, 0x0404 + (head->base.index * 0x300), 2); - evo_data(push, asyh->or.depth << 6 | - asyh->or.nvsync << 4 | - asyh->or.nhsync << 3 | - asyh->or.crc_raster); - evo_data(push, 0x31ec6000 | head->base.index << 25 | - asyh->mode.interlace); - 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, 3))) + return ret; + + PUSH_NVSQ(push, NV907D, 0x0404 + (i * 0x300), asyh->or.depth << 6 | + asyh->or.nvsync << 4 | + asyh->or.nhsync << 3 | + asyh->or.crc_raster, + 0x0408 + (i * 0x300), 0x31ec6000 | + head->base.index << 25 | + asyh->mode.interlace); + return 0; } int |