diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-21 09:14:25 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:50:55 +1000 |
commit | 9549c14b32295a483bbd7604c46aa7b7f2bc0a8b (patch) | |
tree | 3ed5e905fac14d713093cf4e77635fe11a7a6f53 /drivers/gpu/drm/nouveau/dispnv50/head507d.c | |
parent | aabe253e382444996a20463c6822e8f6a0343b60 (diff) |
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/head507d.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/head507d.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head507d.c b/drivers/gpu/drm/nouveau/dispnv50/head507d.c index f062cd1b19df..2cdbf498c555 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/head507d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/head507d.c @@ -117,18 +117,21 @@ head507d_curs_clr(struct nv50_head *head) } } -static void +static int head507d_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, 3))) { - evo_mthd(push, 0x0880 + head->base.index * 0x400, 2); - evo_data(push, 0x80000000 | asyh->curs.layout << 26 | - asyh->curs.format << 24); - 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, 3))) + return ret; + + PUSH_NVSQ(push, NV507D, 0x0880 + (i * 0x400), 0x80000000 | + asyh->curs.layout << 26 | + asyh->curs.format << 24, + 0x0884 + (i * 0x400), asyh->curs.offset >> 8); + return 0; } int |