summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-21 09:22:47 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:50:55 +1000
commit2f819f2be061c984005020f8dc45aee1e6af19a4 (patch)
tree3218441b2047a8ed1b0eac958287efe70d41b6a2 /drivers/gpu/drm/nouveau/dispnv50/headc37d.c
parentdb2a20693ef9e3cd1d7a2b6c5695f572b29b1251 (diff)
downloadlinux-stable-2f819f2be061c984005020f8dc45aee1e6af19a4.tar.gz
linux-stable-2f819f2be061c984005020f8dc45aee1e6af19a4.tar.bz2
linux-stable-2f819f2be061c984005020f8dc45aee1e6af19a4.zip
drm/nouveau/kms/nv50-: convert core head_dither() 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.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
index 2ecfcf45f8a8..0accc19991a4 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
@@ -70,18 +70,20 @@ headc37d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
}
}
-void
+int
headc37d_dither(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, 2))) {
- evo_mthd(push, 0x2018 + (head->base.index * 0x0400), 1);
- evo_data(push, asyh->dither.mode << 8 |
- asyh->dither.bits << 4 |
- asyh->dither.enable);
- 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, 2)))
+ return ret;
+
+ PUSH_NVSQ(push, NV907D, 0x2018 + (i * 0x400), asyh->dither.mode << 8 |
+ asyh->dither.bits << 4 |
+ asyh->dither.enable);
+ return 0;
}
int