diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-20 10:20:39 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:54 +0300 |
commit | 9ec5e8204053a46f9e0b6107844641eb4b3426a4 (patch) | |
tree | 94179876c75e32e85f1a567423dae622ace8957a /drivers/gpu/drm/nouveau/dispnv50/sor907d.c | |
parent | b505935e56b299a82e153ddd4cacebb8fc9697ec (diff) | |
download | linux-9ec5e8204053a46f9e0b6107844641eb4b3426a4.tar.xz |
drm/nouveau/kms/nv50-: convert core or_ctrl() 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/sor907d.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/sor907d.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/sor907d.c b/drivers/gpu/drm/nouveau/dispnv50/sor907d.c index 9577ccf1c809..ea5da300cc11 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/sor907d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/sor907d.c @@ -21,19 +21,23 @@ */ #include "core.h" -#include <nouveau_bo.h> #include <nvif/class.h> +#include <nvif/push507c.h> -static void +#include <nouveau_bo.h> + +static int sor907d_ctrl(struct nv50_core *core, int or, u32 ctrl, struct nv50_head_atom *asyh) { - u32 *push; - if ((push = evo_wait(&core->chan, 2))) { - evo_mthd(push, 0x0200 + (or * 0x20), 1); - evo_data(push, ctrl); - 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, NV907D, 0x0200 + (or * 0x20), ctrl); + return 0; } static void |