drm/nouveau/kms/nv50-: wait for FIFO space on PIO channels
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
ed3d1489d2
commit
374b55802c
@ -24,21 +24,36 @@
|
|||||||
#include "head.h"
|
#include "head.h"
|
||||||
|
|
||||||
#include <nvif/cl507a.h>
|
#include <nvif/cl507a.h>
|
||||||
|
#include <nvif/timer.h>
|
||||||
|
|
||||||
#include <drm/drm_atomic_helper.h>
|
#include <drm/drm_atomic_helper.h>
|
||||||
#include <drm/drm_plane_helper.h>
|
#include <drm/drm_plane_helper.h>
|
||||||
|
|
||||||
|
bool
|
||||||
|
curs507a_space(struct nv50_wndw *wndw)
|
||||||
|
{
|
||||||
|
nvif_msec(&nouveau_drm(wndw->plane.dev)->client.device, 2,
|
||||||
|
if (nvif_rd32(&wndw->wimm.base.user, 0x0008) >= 4)
|
||||||
|
return true;
|
||||||
|
);
|
||||||
|
WARN_ON(1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
curs507a_update(struct nv50_wndw *wndw, u32 *interlock)
|
curs507a_update(struct nv50_wndw *wndw, u32 *interlock)
|
||||||
{
|
{
|
||||||
nvif_wr32(&wndw->wimm.base.user, 0x0080, 0x00000000);
|
if (curs507a_space(wndw))
|
||||||
|
nvif_wr32(&wndw->wimm.base.user, 0x0080, 0x00000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
curs507a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
|
curs507a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
|
||||||
{
|
{
|
||||||
nvif_wr32(&wndw->wimm.base.user, 0x0084, asyw->point.y << 16 |
|
if (curs507a_space(wndw)) {
|
||||||
asyw->point.x);
|
nvif_wr32(&wndw->wimm.base.user, 0x0084, asyw->point.y << 16 |
|
||||||
|
asyw->point.x);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct nv50_wimm_func
|
const struct nv50_wimm_func
|
||||||
|
@ -25,14 +25,17 @@
|
|||||||
static void
|
static void
|
||||||
cursc37a_update(struct nv50_wndw *wndw, u32 *interlock)
|
cursc37a_update(struct nv50_wndw *wndw, u32 *interlock)
|
||||||
{
|
{
|
||||||
nvif_wr32(&wndw->wimm.base.user, 0x0200, 0x00000001);
|
if (curs507a_space(wndw))
|
||||||
|
nvif_wr32(&wndw->wimm.base.user, 0x0200, 0x00000001);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
|
cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
|
||||||
{
|
{
|
||||||
nvif_wr32(&wndw->wimm.base.user, 0x0208, asyw->point.y << 16 |
|
if (curs507a_space(wndw)) {
|
||||||
asyw->point.x);
|
nvif_wr32(&wndw->wimm.base.user, 0x0208, asyw->point.y << 16 |
|
||||||
|
asyw->point.x);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct nv50_wimm_func
|
static const struct nv50_wimm_func
|
||||||
|
@ -97,6 +97,7 @@ struct nv50_wimm_func {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern const struct nv50_wimm_func curs507a;
|
extern const struct nv50_wimm_func curs507a;
|
||||||
|
bool curs507a_space(struct nv50_wndw *);
|
||||||
|
|
||||||
int wndwc37e_new(struct nouveau_drm *, enum drm_plane_type, int, s32,
|
int wndwc37e_new(struct nouveau_drm *, enum drm_plane_type, int, s32,
|
||||||
struct nv50_wndw **);
|
struct nv50_wndw **);
|
||||||
|
Loading…
Reference in New Issue
Block a user