diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-21 02:14:25 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:55 +0300 |
commit | 9549c14b32295a483bbd7604c46aa7b7f2bc0a8b (patch) | |
tree | 3ed5e905fac14d713093cf4e77635fe11a7a6f53 /drivers/gpu/drm/nouveau/dispnv50/headc37d.c | |
parent | aabe253e382444996a20463c6822e8f6a0343b60 (diff) | |
download | linux-9549c14b32295a483bbd7604c46aa7b7f2bc0a8b.tar.xz |
drm/nouveau/kms/nv50-: convert core head_curs_set() 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.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c index d3e72344024b..89ac5d7e83c0 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c @@ -98,23 +98,23 @@ headc37d_curs_clr(struct nv50_head *head) } } -void +int headc37d_curs_set(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, 7))) { - evo_mthd(push, 0x209c + head->base.index * 0x400, 2); - evo_data(push, 0x80000000 | - asyh->curs.layout << 8 | - asyh->curs.format << 0); - evo_data(push, 0x000072ff); - evo_mthd(push, 0x2088 + head->base.index * 0x400, 1); - evo_data(push, asyh->curs.handle); - evo_mthd(push, 0x2090 + head->base.index * 0x400, 1); - evo_data(push, asyh->curs.offset >> 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, 7))) + return ret; + + PUSH_NVSQ(push, NVC37D, 0x209c + (i * 0x400), 0x80000000 | + asyh->curs.layout << 8 | + asyh->curs.format << 0, + 0x20a0 + (i * 0x400), 0x000072ff); + PUSH_NVSQ(push, NVC37D, 0x2088 + (i * 0x400), asyh->curs.handle); + PUSH_NVSQ(push, NVC37D, 0x2090 + (i * 0x400), asyh->curs.offset >> 8); + return 0; } int |