diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-20 17:04:57 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:50:53 +1000 |
commit | 5e691222eac66e730e0fa6bd10e7564f3db202d5 (patch) | |
tree | 9864a982e1ebc2218684135cc978f848e2012c10 /drivers/gpu/drm/nouveau/dispnv50/core507d.c | |
parent | 3afb4db782a3bf4e6f14912d7aeb534264d2d2e3 (diff) |
drm/nouveau/kms/nv50-: convert core 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/dispnv50/core507d.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/core507d.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/core507d.c b/drivers/gpu/drm/nouveau/dispnv50/core507d.c index 1d66f694b945..ce6f6494d445 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/core507d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/core507d.c @@ -23,6 +23,7 @@ #include "head.h" #include <nvif/cl507d.h> +#include <nvif/push507c.h> #include <nvif/timer.h> #include "nouveau_bo.h" @@ -76,15 +77,17 @@ core507d_caps_init(struct nouveau_drm *drm, struct nv50_disp *disp) return 0; } -void +int core507d_init(struct nv50_core *core) { - u32 *push; - if ((push = evo_wait(&core->chan, 2))) { - evo_mthd(push, 0x0088, 1); - evo_data(push, core->chan.sync.handle); - evo_kick(push, &core->chan); - } + struct nvif_push *push = core->chan.push; + int ret; + + if ((ret = PUSH_WAIT(push, 2))) + return ret; + + PUSH_NVSQ(push, NV507D, 0x0088, core->chan.sync.handle); + return PUSH_KICK(push); } static const struct nv50_core_func |