drm/nouveau/kms/nv50-: convert wndw update() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
pull/496/merge
Ben Skeggs 2020-06-20 09:32:58 +10:00
parent 85bdfcd435
commit 3afb4db782
8 changed files with 29 additions and 39 deletions

View File

@ -15,7 +15,6 @@ int base507c_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *);
int base507c_sema_clr(struct nv50_wndw *);
int base507c_xlut_set(struct nv50_wndw *, struct nv50_wndw_atom *);
int base507c_xlut_clr(struct nv50_wndw *);
void base507c_update(struct nv50_wndw *, u32 *);
int base827c_new(struct nouveau_drm *, int, s32, struct nv50_wndw **);

View File

@ -32,15 +32,17 @@
#include "nouveau_bo.h"
void
int
base507c_update(struct nv50_wndw *wndw, u32 *interlock)
{
u32 *push;
if ((push = evo_wait(&wndw->wndw, 2))) {
evo_mthd(push, 0x0080, 1);
evo_data(push, interlock[NV50_DISP_INTERLOCK_CORE]);
evo_kick(push, &wndw->wndw);
}
struct nvif_push *push = wndw->wndw.push;
int ret;
if ((ret = PUSH_WAIT(push, 2)))
return ret;
PUSH_NVSQ(push, NV507C, 0x0080, interlock[NV50_DISP_INTERLOCK_CORE]);
return PUSH_KICK(push);
}
int

View File

@ -11,7 +11,6 @@ int ovly507e_acquire(struct nv50_wndw *, struct nv50_wndw_atom *,
void ovly507e_release(struct nv50_wndw *, struct nv50_wndw_atom *,
struct nv50_head_atom *);
int ovly507e_scale_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void ovly507e_update(struct nv50_wndw *, u32 *);
extern const u32 ovly827e_format[];
void ovly827e_ntfy_reset(struct nouveau_bo *, u32);

View File

@ -30,17 +30,6 @@
#include <nvif/event.h>
#include <nvif/push507c.h>
void
ovly507e_update(struct nv50_wndw *wndw, u32 *interlock)
{
u32 *push;
if ((push = evo_wait(&wndw->wndw, 2))) {
evo_mthd(push, 0x0080, 1);
evo_data(push, interlock[NV50_DISP_INTERLOCK_CORE]);
evo_kick(push, &wndw->wndw);
}
}
int
ovly507e_scale_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
@ -118,7 +107,7 @@ ovly507e = {
.image_set = ovly507e_image_set,
.image_clr = base507c_image_clr,
.scale_set = ovly507e_scale_set,
.update = ovly507e_update,
.update = base507c_update,
};
static const u32

View File

@ -83,7 +83,7 @@ ovly827e = {
.image_set = ovly827e_image_set,
.image_clr = base507c_image_clr,
.scale_set = ovly507e_scale_set,
.update = ovly507e_update,
.update = base507c_update,
};
const u32

View File

@ -58,7 +58,7 @@ ovly907e = {
.image_set = ovly907e_image_set,
.image_clr = base507c_image_clr,
.scale_set = ovly507e_scale_set,
.update = ovly507e_update,
.update = base507c_update,
};
static const u32

View File

@ -79,7 +79,7 @@ struct nv50_wndw_func {
int (*scale_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
int (*blend_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
void (*update)(struct nv50_wndw *, u32 *interlock);
int (*update)(struct nv50_wndw *, u32 *interlock);
};
extern const struct drm_plane_funcs nv50_wndw;
@ -89,6 +89,7 @@ int base507c_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *);
int base507c_ntfy_clr(struct nv50_wndw *);
int base507c_ntfy_wait_begun(struct nouveau_bo *, u32, struct nvif_device *);
int base507c_image_clr(struct nv50_wndw *);
int base507c_update(struct nv50_wndw *, u32 *);
void base907c_csc(struct nv50_wndw *, struct nv50_wndw_atom *,
const struct drm_color_ctm *);
@ -124,7 +125,7 @@ int wndwc37e_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *);
int wndwc37e_ntfy_clr(struct nv50_wndw *);
int wndwc37e_image_clr(struct nv50_wndw *);
int wndwc37e_blend_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void wndwc37e_update(struct nv50_wndw *, u32 *);
int wndwc37e_update(struct nv50_wndw *, u32 *);
int wndwc57e_new(struct nouveau_drm *, enum drm_plane_type, int, s32,
struct nv50_wndw **);

View File

@ -215,22 +215,22 @@ wndwc37e_sema_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
return 0;
}
void
int
wndwc37e_update(struct nv50_wndw *wndw, u32 *interlock)
{
u32 *push;
if ((push = evo_wait(&wndw->wndw, 5))) {
evo_mthd(push, 0x0370, 2);
evo_data(push, interlock[NV50_DISP_INTERLOCK_CURS] << 1 |
interlock[NV50_DISP_INTERLOCK_CORE]);
evo_data(push, interlock[NV50_DISP_INTERLOCK_WNDW]);
evo_mthd(push, 0x0200, 1);
if (interlock[NV50_DISP_INTERLOCK_WIMM] & wndw->interlock.data)
evo_data(push, 0x00001001);
else
evo_data(push, 0x00000001);
evo_kick(push, &wndw->wndw);
}
struct nvif_push *push = wndw->wndw.push;
int ret;
if ((ret = PUSH_WAIT(push, 5)))
return ret;
PUSH_NVSQ(push, NVC37E, 0x0370, interlock[NV50_DISP_INTERLOCK_CURS] << 1 |
interlock[NV50_DISP_INTERLOCK_CORE],
0x0374, interlock[NV50_DISP_INTERLOCK_WNDW]);
PUSH_NVSQ(push, NVC37E, 0x0200,((interlock[NV50_DISP_INTERLOCK_WIMM] &
wndw->interlock.data) ? 0x00001000 : 0x00000000) |
0x00000001);
return PUSH_KICK(push);
}
void