diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-21 02:17:11 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:55 +0300 |
commit | bc5af56a8f184dd8acdaa7faea245cdf677f4a03 (patch) | |
tree | aa285f3c3076fc3dad4f80cd851746a4a215d733 /drivers/gpu/drm/nouveau/dispnv50/headc37d.c | |
parent | 9549c14b32295a483bbd7604c46aa7b7f2bc0a8b (diff) | |
download | linux-bc5af56a8f184dd8acdaa7faea245cdf677f4a03.tar.xz |
drm/nouveau/kms/nv50-: convert core head_curs_clr() 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 | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c index 89ac5d7e83c0..2ecfcf45f8a8 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c @@ -84,18 +84,19 @@ headc37d_dither(struct nv50_head *head, struct nv50_head_atom *asyh) } } -void +int headc37d_curs_clr(struct nv50_head *head) { - struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; - u32 *push; - if ((push = evo_wait(core, 4))) { - evo_mthd(push, 0x209c + head->base.index * 0x400, 1); - evo_data(push, 0x000000cf); - evo_mthd(push, 0x2088 + head->base.index * 0x400, 1); - evo_data(push, 0x00000000); - 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, 4))) + return ret; + + PUSH_NVSQ(push, NVC37D, 0x209c + (i * 0x400), 0x000000cf); + PUSH_NVSQ(push, NVC37D, 0x2088 + (i * 0x400), 0x00000000); + return 0; } int |