diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-20 02:20:17 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:53 +0300 |
commit | 6d6e11e2844015a5f6c3d0373966fd4a459add8b (patch) | |
tree | be9a3cf55f5ec297ceecd79b826993a9a5d82e2d /drivers/gpu/drm/nouveau/dispnv50/ovly907e.c | |
parent | 34838908f62a0160d2c12c12be6c3be910d17b85 (diff) | |
download | linux-6d6e11e2844015a5f6c3d0373966fd4a459add8b.tar.xz |
drm/nouveau/kms/nv50-: convert wndw image_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/ovly907e.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/ovly907e.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/ovly907e.c b/drivers/gpu/drm/nouveau/dispnv50/ovly907e.c index 73fb5d4eb343..6b83daff1560 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/ovly907e.c +++ b/drivers/gpu/drm/nouveau/dispnv50/ovly907e.c @@ -22,29 +22,29 @@ #include "ovly.h" #include "atom.h" -static void +#include <nvif/push507c.h> + +static int ovly907e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { - u32 *push; - if ((push = evo_wait(&wndw->wndw, 12))) { - evo_mthd(push, 0x0084, 1); - evo_data(push, asyw->image.interval << 4); - evo_mthd(push, 0x00c0, 1); - evo_data(push, asyw->image.handle[0]); - evo_mthd(push, 0x0100, 1); - evo_data(push, 0x00000002); - evo_mthd(push, 0x0400, 1); - evo_data(push, asyw->image.offset[0] >> 8); - evo_mthd(push, 0x0408, 3); - evo_data(push, asyw->image.h << 16 | asyw->image.w); - evo_data(push, asyw->image.layout << 24 | - (asyw->image.pitch[0] >> 8) << 8 | - asyw->image.blocks[0] << 8 | - asyw->image.blockh); - evo_data(push, asyw->image.format << 8 | - asyw->image.colorspace); - evo_kick(push, &wndw->wndw); - } + struct nvif_push *push = wndw->wndw.push; + int ret; + + if ((ret = PUSH_WAIT(push, 12))) + return ret; + + PUSH_NVSQ(push, NV907E, 0x0084, asyw->image.interval << 4); + PUSH_NVSQ(push, NV907E, 0x00c0, asyw->image.handle[0]); + PUSH_NVSQ(push, NV907E, 0x0100, 0x00000002); + PUSH_NVSQ(push, NV907E, 0x0400, asyw->image.offset[0] >> 8); + PUSH_NVSQ(push, NV907E, 0x0408, asyw->image.h << 16 | asyw->image.w, + 0x040c, asyw->image.layout << 24 | + (asyw->image.pitch[0] >> 8) << 8 | + asyw->image.blocks[0] << 8 | + asyw->image.blockh, + 0x0410, asyw->image.format << 8 | + asyw->image.colorspace); + return 0; } const struct nv50_wndw_func |