drm/nouveau/kms/nv50-: convert core wndw_owner() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
This commit is contained in:
Ben Skeggs 2020-06-20 17:12:16 +10:00
parent 203f6eaf41
commit b505935e56
2 changed files with 13 additions and 11 deletions

View File

@ -23,7 +23,7 @@ struct nv50_core_func {
int (*update)(struct nv50_core *, u32 *interlock, bool ntfy); int (*update)(struct nv50_core *, u32 *interlock, bool ntfy);
struct { struct {
void (*owner)(struct nv50_core *); int (*owner)(struct nv50_core *);
} wndw; } wndw;
const struct nv50_head_func *head; const struct nv50_head_func *head;
@ -64,7 +64,7 @@ int corec37d_new(struct nouveau_drm *, s32, struct nv50_core **);
int corec37d_caps_init(struct nouveau_drm *, struct nv50_disp *); int corec37d_caps_init(struct nouveau_drm *, struct nv50_disp *);
int corec37d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *); int corec37d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *);
int corec37d_update(struct nv50_core *, u32 *, bool); int corec37d_update(struct nv50_core *, u32 *, bool);
void corec37d_wndw_owner(struct nv50_core *); int corec37d_wndw_owner(struct nv50_core *);
extern const struct nv50_outp_func sorc37d; extern const struct nv50_outp_func sorc37d;
int corec57d_new(struct nouveau_drm *, s32, struct nv50_core **); int corec57d_new(struct nouveau_drm *, s32, struct nv50_core **);

View File

@ -28,18 +28,20 @@
#include <nouveau_bo.h> #include <nouveau_bo.h>
void int
corec37d_wndw_owner(struct nv50_core *core) corec37d_wndw_owner(struct nv50_core *core)
{ {
struct nvif_push *push = core->chan.push;
const u32 windows = 8; /*XXX*/ const u32 windows = 8; /*XXX*/
u32 *push, i; int ret, i;
if ((push = evo_wait(&core->chan, 2 * windows))) {
for (i = 0; i < windows; i++) { if ((ret = PUSH_WAIT(push, windows * 2)))
evo_mthd(push, 0x1000 + (i * 0x080), 1); return ret;
evo_data(push, i >> 1);
} for (i = 0; i < windows; i++)
evo_kick(push, &core->chan); PUSH_NVSQ(push, NVC37D, 0x1000 + (i * 0x080), i >> 1);
}
return 0;
} }
int int