summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/dispnv50/wndw.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-21 02:19:40 +0200
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 10:50:51 +0200
commitbea8395ccf175b599fd3e36df56dd8a67adcea9e (patch)
tree497a1da9cdd252b08295fc7f56487e947d6a9855 /drivers/gpu/drm/nouveau/dispnv50/wndw.h
parentdrm/nouveau/kms/nv50-: wrap existing command submission in nvif_push interface (diff)
downloadlinux-bea8395ccf175b599fd3e36df56dd8a67adcea9e.tar.xz
linux-bea8395ccf175b599fd3e36df56dd8a67adcea9e.zip
drm/nouveau/kms/nv50-: convert wimm point() 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/wndw.h')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/wndw.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.h b/drivers/gpu/drm/nouveau/dispnv50/wndw.h
index a7412b9d3a98..53e496bfbc9d 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndw.h
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.h
@@ -91,7 +91,7 @@ void base907c_csc(struct nv50_wndw *, struct nv50_wndw_atom *,
const struct drm_color_ctm *);
struct nv50_wimm_func {
- void (*point)(struct nv50_wndw *, struct nv50_wndw_atom *);
+ int (*point)(struct nv50_wndw *, struct nv50_wndw_atom *);
void (*update)(struct nv50_wndw *, u32 *interlock);
};
@@ -99,6 +99,13 @@ struct nv50_wimm_func {
extern const struct nv50_wimm_func curs507a;
bool curs507a_space(struct nv50_wndw *);
+static inline __must_check int
+nvif_chan_wait(struct nv50_dmac *dmac, u32 size)
+{
+ struct nv50_wndw *wndw = container_of(dmac, typeof(*wndw), wimm);
+ return curs507a_space(wndw) ? 0 : -ETIMEDOUT;
+}
+
int wndwc37e_new(struct nouveau_drm *, enum drm_plane_type, int, s32,
struct nv50_wndw **);
int wndwc37e_new_(const struct nv50_wndw_func *, struct nouveau_drm *,