diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-22 12:54:50 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:58 +0300 |
commit | cd346a89d249a045f23aac28b9cc61db5f4d34d9 (patch) | |
tree | 3c25f6bd8aae06bc59bf892b77f6e739cb4bf98b /drivers/gpu/drm/nouveau/nouveau_chan.c | |
parent | 0d2bdf2b0a73170cf7bc814aa44852a1d37387da (diff) | |
download | linux-cd346a89d249a045f23aac28b9cc61db5f4d34d9.tar.xz |
drm/nouveau/chan: convert nvsw init 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/nouveau_chan.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_chan.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 27092a6933ee..b80e4ebf14a6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c @@ -21,8 +21,8 @@ * * Authors: Ben Skeggs */ +#include <nvif/push006c.h> -#include <nvif/os.h> #include <nvif/class.h> #include <nvif/cl0002.h> #include <nvif/cl006b.h> @@ -32,9 +32,6 @@ #include <nvif/clc36f.h> #include <nvif/ioctl.h> -/*XXX*/ -#include <core/client.h> - #include "nouveau_drv.h" #include "nouveau_dma.h" #include "nouveau_bo.h" @@ -482,12 +479,12 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) chan->dma.cur = chan->dma.put; chan->dma.free = chan->dma.max - chan->dma.cur; - ret = RING_SPACE(chan, NOUVEAU_DMA_SKIPS); + ret = PUSH_WAIT(chan->chan.push, NOUVEAU_DMA_SKIPS); if (ret) return ret; for (i = 0; i < NOUVEAU_DMA_SKIPS; i++) - OUT_RING(chan, 0x00000000); + PUSH_DATA(chan->chan.push, 0x00000000); /* allocate software object class (used for fences on <= nv05) */ if (device->info.family < NV_DEVICE_INFO_V0_CELSIUS) { @@ -497,13 +494,12 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) if (ret) return ret; - ret = RING_SPACE(chan, 2); + ret = PUSH_WAIT(chan->chan.push, 2); if (ret) return ret; - BEGIN_NV04(chan, NvSubSw, 0x0000, 1); - OUT_RING (chan, chan->nvsw.handle); - FIRE_RING (chan); + PUSH_NVSQ(chan->chan.push, NV_SW, 0x0000, chan->nvsw.handle); + PUSH_KICK(chan->chan.push); } /* initialise synchronisation */ |