summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-20 02:24:21 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 11:50:53 +0300
commit0a4693e80dc9a57f2133439e58a697f2d7730c4d (patch)
tree610a4e7b5b1d805220ecf80aaa9c37a3c4b1cc84 /drivers/gpu/drm/nouveau/dispnv50/ovly507e.c
parent8944d8b37ac9eecfff5706e9a11d5fcb3df64dbb (diff)
downloadlinux-0a4693e80dc9a57f2133439e58a697f2d7730c4d.tar.xz
drm/nouveau/kms/nv50-: convert wndw scale_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/ovly507e.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/ovly507e.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c b/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c
index 1460dc529420..77f3c9789717 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/ovly507e.c
@@ -41,17 +41,19 @@ ovly507e_update(struct nv50_wndw *wndw, u32 *interlock)
}
}
-void
+int
ovly507e_scale_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
- u32 *push;
- if ((push = evo_wait(&wndw->wndw, 4))) {
- evo_mthd(push, 0x00e0, 3);
- evo_data(push, asyw->scale.sy << 16 | asyw->scale.sx);
- evo_data(push, asyw->scale.sh << 16 | asyw->scale.sw);
- evo_data(push, asyw->scale.dw);
- evo_kick(push, &wndw->wndw);
- }
+ struct nvif_push *push = wndw->wndw.push;
+ int ret;
+
+ if ((ret = PUSH_WAIT(push, 4)))
+ return ret;
+
+ PUSH_NVSQ(push, NV507E, 0x00e0, asyw->scale.sy << 16 | asyw->scale.sx,
+ 0x00e4, asyw->scale.sh << 16 | asyw->scale.sw,
+ 0x00e8, asyw->scale.dw);
+ return 0;
}
static int