diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-21 01:14:25 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 10:50:55 +0200 |
commit | 9549c14b32295a483bbd7604c46aa7b7f2bc0a8b (patch) | |
tree | 3ed5e905fac14d713093cf4e77635fe11a7a6f53 /drivers/gpu/drm/nouveau/dispnv50/head907d.c | |
parent | drm/nouveau/kms/nv50-: convert core head_core_clr() to new push macros (diff) | |
download | linux-9549c14b32295a483bbd7604c46aa7b7f2bc0a8b.tar.xz linux-9549c14b32295a483bbd7604c46aa7b7f2bc0a8b.zip |
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/head907d.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/head907d.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head907d.c b/drivers/gpu/drm/nouveau/dispnv50/head907d.c index 2e2b33b84c57..32dd0de81219 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/head907d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/head907d.c @@ -144,20 +144,22 @@ head907d_curs_clr(struct nv50_head *head) } } -void +int head907d_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, 5))) { - evo_mthd(push, 0x0480 + head->base.index * 0x300, 2); - evo_data(push, 0x80000000 | asyh->curs.layout << 26 | - asyh->curs.format << 24); - evo_data(push, asyh->curs.offset >> 8); - evo_mthd(push, 0x048c + head->base.index * 0x300, 1); - evo_data(push, asyh->curs.handle); - 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, 5))) + return ret; + + PUSH_NVSQ(push, NV907D, 0x0480 + (i * 0x300), 0x80000000 | + asyh->curs.layout << 26 | + asyh->curs.format << 24, + 0x0484 + (i * 0x300), asyh->curs.offset >> 8); + PUSH_NVSQ(push, NV907D, 0x048c + (i * 0x300), asyh->curs.handle); + return 0; } int |