diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-21 02:22:47 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:55 +0300 |
commit | 2f819f2be061c984005020f8dc45aee1e6af19a4 (patch) | |
tree | 3218441b2047a8ed1b0eac958287efe70d41b6a2 /drivers/gpu/drm/nouveau/dispnv50/headc37d.c | |
parent | db2a20693ef9e3cd1d7a2b6c5695f572b29b1251 (diff) | |
download | linux-2f819f2be061c984005020f8dc45aee1e6af19a4.tar.xz |
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.c | 22 |
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 |