diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-21 09:20:29 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:50:55 +1000 |
commit | db2a20693ef9e3cd1d7a2b6c5695f572b29b1251 (patch) | |
tree | d8997d0d5efffed1c4128541530780afaa19856f /drivers/gpu/drm/nouveau/dispnv50/head507d.c | |
parent | 93f7f054574271a9254d90e2906a34520d59b722 (diff) | |
download | linux-db2a20693ef9e3cd1d7a2b6c5695f572b29b1251.tar.bz2 |
drm/nouveau/kms/nv50-: convert core head_ovly() 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 | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head507d.c b/drivers/gpu/drm/nouveau/dispnv50/head507d.c index 3e56c3da504b..16598e100795 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/head507d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/head507d.c @@ -51,12 +51,13 @@ head507d_dither(struct nv50_head *head, struct nv50_head_atom *asyh) } } -void +int head507d_ovly(struct nv50_head *head, struct nv50_head_atom *asyh) { - struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; + struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push; + const int i = head->base.index; u32 bounds = 0; - u32 *push; + int ret; if (asyh->ovly.cpp) { switch (asyh->ovly.cpp) { @@ -71,11 +72,11 @@ head507d_ovly(struct nv50_head *head, struct nv50_head_atom *asyh) bounds |= 0x00000100; } - if ((push = evo_wait(core, 2))) { - evo_mthd(push, 0x0904 + head->base.index * 0x400, 1); - evo_data(push, bounds); - evo_kick(push, core); - } + if ((ret = PUSH_WAIT(push, 2))) + return ret; + + PUSH_NVSQ(push, NV507D, 0x0904 + (i * 0x400), bounds); + return 0; } int |